IndieLib-快速游戏开发(译文)
By robot-v1.0
本文链接 https://www.kyfws.com/games/indielib-fast-game-development-zh/
版权声明 本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议。转载请注明出处!
- 8 分钟阅读 - 3564 个词 阅读量 0IndieLib-快速游戏开发(译文)
原文地址:https://www.codeproject.com/Articles/25147/IndieLib-Fast-Game-Development
原文作者:Loover
译文由本站 robot-v1.0 翻译
前言
IndieLib is a C++ 2.5d engine for game development and fast game prototyping in a really easy way.
IndieLib是一个C ++ 2.5d引擎,用于以非常简单的方式进行游戏开发和快速游戏原型制作.
介绍(Introduction)
你好!(Hello!)
我非常高兴地宣布第一版(I’m really excited to announce the first release of)独立库(IndieLib)游戏引擎.在我从事此项目的几年中,这是很多艰苦的工作.从业余爱好开始,就已经变成了一个强大的2d引擎,我认为这对游戏社区特别是独立游戏开发商来说非常有用.因此,我想免费提供给所有人,希望对您中的某些人有用.(game engine. It has been a lot of hard work for several years during which I have been working on this project. What started as a hobby has become quite a robust 2d engine that I think can be useful for the gamming community, specially for the indie game developers. Because of that, I want to offer it to all of you for free, hopefully it will be useful for some of you.)
IndieLib的主要目的是使游戏开发人员更轻松,特别是对于那些喜欢尝试新的游戏机制和快速游戏原型的人们.我对实验游戏项目的勇敢家伙以及每天在TigSource或这些论坛上看到的东西感到非常震惊.在看到这些开发人员在短短一周内可以完成的工作后,我决定在一个名为(The main purpose of IndieLib is to make things easier for the game developer, especially for those of you that love trying new game mechanics and fast game prototyping. I was really shocked for the brave guys of the Experimental Gameplay Project and the things that I see everyday on TigSource or in these forums. After seeing what these developers were able to do in just one week, I decided to start working again in an old project called) LooverLib
并尝试在同一个引擎中包含许多有用的功能,以便能够使用C ++真正快速地制作游戏.我想要的是,只要懂一点编程的人都可以更快,更轻松地表达自己的想法.我知道第一个发行版还没有完全达到这个目的,但是我希望能以正确的方式进行.(and tried to pack in the same engine a lot of useful features for being able to make games really quickly using C++. What I wanted was that anybody that knows a little bit of programming would be able to give expressions to their ideas faster and more easily. I know this first release hasn’t accomplished completely this purpose, but I hope to be on the correct way.)
IndieLib是一个C ++ 2.5d开源引擎,用于以非常简单的方式进行游戏开发和快速游戏原型制作.在内部,它使用Direct3d进行硬件加速,但不使用DirectDraw或ID3DXSprite,而是直接在多边形上绘制纹理.该引擎专注于快速2d渲染,但也允许您使用3d模型.在这里,您可以看到具有主要功能的列表:(IndieLib is a C++ 2.5d OpenSource engine for game development and fast game prototyping in a really easy way. Internally it uses Direct3d for hardware acceleration, but doesn’t use DirectDraw or ID3DXSprite, it directly draws textures on polygons. The engine is focused on fast 2d rendering, but also allows you to use 3d models. Here you have a list with the main features:)
-
简单的界面和极大的便捷性:使用真正的快速原型制作游戏,为每个图形对象使用实体并更改其属性.所有方法都简单到"(Simple interface and extreme easiness: really fast game prototyping using entities for each of the graphical objects and changing their attributes. All the methods are as simple as “)
SetPos
“,"(”, “)SetCollisionArea
“,"(”, “)SetFade
“,"(”, “)SetTransparency
“等(”, etc.) -
精灵的平移,旋转,镜像和缩放.(Translations, rotation, mirroring and scaling of sprites.)
-
Sprite的Alpha混合,透明度,着色和褪色.(Alpha blending, transparency, tinting and fading of sprites.)
-
渲染任何大小的图像(不仅是2的幂).您可以加载最大10000x10000像素的图像,并且IndieLib会在内部将其切成较小的块.此外,IndieLib会自动丢弃屏幕上的所有块,即使您的精灵已变形并且相机进行缩放或旋转,也只有您看到的内容才会被渲染.(Render images of any size (not only power of two). You can load images as big as 10000x10000 pixels or more, and IndieLib will cut them internally in smaller blocks. Furthermore, IndieLib will automatically discard all the blocks out of the screen, also if your sprites are transformed and the camera making a zoom or rotated, only what you see is what is going to be rendered.)
-
SetGrid
方法,以便为子画面创建网格.稍后,您可以移动每个网格点,以产生许多不同的效果,例如波浪(如在Aquaria游戏中),变形等.(感谢Alec的忠告:)).(method in order to create grids for your sprites. Later you can move each grid point in order to make a lot of different effects like waves (like in Aquaria game), deformations, etc. (Thanks Alec for the advice :)).) -
2d和3d摄像机概念,完全独立于图形对象.平移,旋转或缩放相机的简便方法.(2d and 3d camera concepts, completely independent of the graphical objects. Easy methods to translate, rotate or zoom you camera.)
-
轻松创建多个视口.使用分配给它们的不同摄像机,只需创建所需的视口即可.这对于制作宽屏游戏等非常有用.(Easily creation of several viewports. Just create as many viewports as you want using different cameras assigned to them. This is really useful for making widescreen games, etc.)
-
任意大小的滚动条,具有自动块丢弃功能.(Scrolls of any size, with automatic block discarding.)
-
动画系统使用XML动画脚本,用于定义帧和序列.(Animation system using XML animation scripts, for defining the frames and sequences.)
-
先进的碰撞系统.创建一个XML文件,使用圆形,矩形或三角形定义每个精灵的碰撞区域.您可以根据需要定义任意数量的碰撞组,每个碰撞组都有不同的名称.将此文件连接到实体对象,并检查其他实体的碰撞组之间的碰撞.不必担心转换,旋转或缩放实体,碰撞组将始终完美适合您的实体.您还可以具有精灵动画,其中每个帧具有不同的碰撞组(在"街头霸王"类型的游戏中想象此功能).(Advanced collision system. Create an XML file defining your collision areas per sprite using circles, rectangles or triangles. You can define as many collision groups as you want, each one with a different name. Join this file to an entity object and check collision between the collision groups of other entities. Don’t worry about translating, rotating or scaling your entities, the collision groups will always fit perfectly your entity. You can also have sprite animations in which each frame has different collision groups (imagine this feature in a “Street Fighter” type game).)
-
位图字体系统,用于绘制使用MudgeFont for IndieLib创建的字体的图形文本.轻松更改对齐方式,字符间距和行间距.(Bitmap font system, for drawing graphical texts of fonts created with MudgeFont for IndieLib. Change the alignment, char spacing and line spacing easily.)
-
3d网格的渲染(您可以轻松混合2d和3d).您还可以对其应用转换(旋转,缩放,淡入淡出等).这将使您可以制作” New Super Mario Bros"之类的游戏,其中角色为3d模型,场景为2d.(Rendering of 3d Meshes (you can mix 2d and 3d easily). You can also apply transformations to them (rotation, scaling, fading, etc). This will allow you to make games like “New Super Mario Bros” in which the characters are 3d models and the scenario is 2d.)
-
灯光管理器,用于为3D模型照明.启用/禁用灯光,更改其属性等.(Light manager, for lighting your 3d models. Enable / Disable lights, change their attributes, etc.)
-
计时器.启动,停止,轻松暂停它们.(Timers. Start, stop, pause them easily.)
-
用于2d和3d对象的实体类,以一种非常简单的方式管理图形对象.只需创建一个实体,将图形对象与其连接,然后更改其属性(空间转换,颜色转换等).(Entity class, for both 2d and 3d objects, for managing the graphical objects in a really easy way. Just create an entity, join a graphical object to it, an change its attributes (space transformations, color transformations, etc.).)
-
图像类,用于加载/保存不同类型的图像文件以及直接访问位图.您还可以将过滤器应用于图像,例如高斯,噪声,均衡,饱和度等.(Image class, for loading / saving different types of image files and for accessing the bitmaps directly. You can also apply filters to the images like gaussian, noise, equalize, saturation, etc.)
-
直接绘制图元(矩形,圆形,多边形,直线等).(Direct blitting of primitives (rectangles, circles, polygons, lines, etc.).)
-
鼠标和键盘输入(使用SDL).检查是否已按下,正在按下或已按下n个毫秒以上的任何按键/按钮.检查同时按下的按键/按钮组合.(Mouse and keyboard input (using SDL). Check if any key/button has been pressed, is being pressed or has been pressed more than n milliseconds. Check combination of keys/buttons that are pressed at the same time.) 在(There are more things explained in the) 常问问题(FAQ) 您可以从LGPL许可下获取源代码(and you can get the source code under LGPL license from the) 资料库(repository) .(.) 您想看到引擎运转吗?好吧,你可以检查一下(Do you want to see the engine in action? Well, you can just check some) 屏幕截图(screenshots) 或下载(or to download the) IndieLib_SDK(IndieLib_SDK) 并运行已经编译并准备尝试的教程(您无需了解任何有关编程的知识,只需单击(and to run the tutorials that are already compiled and ready to try (you don’t need to know anything about programming for clicking the)**.可执行程序(.exe)**并查看演示教程;),请尝试按箭头键和鼠标按钮/滚轮,因为其中一些是交互式的.(and see the demo tutorials ;), try to press arrow keys and mouse buttons / wheel, because some of them are interactive).) 但是,没有文档,引擎就一无所获.为此,我花了很多时间来记录所有方法(我希望我不会在英语上犯太多错误)并编写一些教程(这几个月会更多):(But an engine is nothing without documentation. For that, I spent a lot, a lot of hours documenting all the methods (I hope I didn’t make too many mistakes in English) and making some tutorials (more will come along these months):)
-
Wiki教程(Wiki tutorials) -(目前只有9个)(- (only 9 by now)) 我真的希望该引擎对您中的某些人有用,并希望您使用它来制作出令人难以置信的游戏.我邀请大家加入我们(I really hope that the engine will be useful for some of you and that you will make incredible games using it. I invite all you to join our) 论坛(forum) ,如果你们中有人愿意为我提供帮助,我将感到非常高兴.(, and I would be really happy if some of you want to contribute in helping me.) 只需单击并下载最新的(Just click and download the latest) IndieLib_SDK(IndieLib_SDK) (它包括IndieLib二进制文件,教程源代码和((It includes the IndieLib binaries, the tutorials source code and).可执行程序(.exe),以及文档).开始制作游戏!(, and the documentation). Start making games!) 问候,(Regards,) 哈维尔`洛佩斯(JavierLópez)(Javier López) 附注:对不起,我确定自己犯了错误,我的英语不太好.(P.S.: Sorry for the mistakes I’m sure I made, I’m not very good at English.)
历史(History)
许可
本文以及所有相关的源代码和文件均已获得The Code Project Open License (CPOL)的许可。
VC7.0 VC7.1 VC8.0 C++ VC6 新闻 翻译