What should a 2D game engine have?

Started by
9 comments, last by MrCpaw 15 years, 3 months ago
Like the title says, I am puting together a list of things that a 2D game engine should contain since I am writing one at the moment. What features should it contain? Thx in advance!
Advertisement
It should contain the features that you need for the game that you are planning on developing with it.
I know that, but what if it was intended for others to be able to use it as well? Like a free 2D engine libary?
Quote:Original post by LostSnow25
I know that, but what if it was intended for others to be able to use it as well? Like a free 2D engine libary?
Creating a general 2-D or 3-D game engine/library/toolset is one of the more difficult projects one can undertake, and requires a considerable amount of experience with both game development and software design. Furthermore, it's already been done many times over.

I'm not saying you shouldn't pursue it, but it might be a good idea to first ask yourself what your end goal is, and why you think developing a game engine is a good idea.

Is this a school assignment? Do you have a particular game in mind and feel that writing an engine would be a good first step towards creating that game? Do you just want to contribute something to the community? If you can tell us a little more about your goals, we'll be better able to offer useful advice.
Because you have to ask what a 2d engine should include, and you are doing so in the "For Beginners" section it seems to me you would benefit from this advice.

Make games, not engines.

You'll thank yourself for doing so and you'll be well on your way to beginning an engine based off the experience you gain making your games.
_______________________"You're using a screwdriver to nail some glue to a ming vase. " -ToohrVyk
Right now, I just want to focus on making an engine so I can use it to test things out for my game. I prefer engines over games or rather I love making tools and effects rather than the game itself.

Sorry if my first post was misleading, I did not meen for it to sound like I wanted to create a libary from scratch like SDL or DirectX or anything else. What I ment was how do I fully go about creating an engine from scratch. The engine that Im messing with is the one that comes with the book Advanced 2D Game Development. But it's in DirectX and I want to stay away from that for awhile in tell I am good enough to now what all the g_Engine->ect... do's and why they are good to use.

Question 2:
Also, I was wondering how to create a lib file? Since my engine so far creates 2 obj files and I need to have my program output a lib file so I can link to it.

So how many games have you made already? Games and engines require the same thing; the same kind of code doing the same kinds of things. The difference is that engines are more generalized (usually) than any given game. So the way you learn to write engines is to write games.

If you've written a few games already, go look over their code and start to identify common aspects and refactor them out into a base framework. Rinse, repeat.
Quote:Original post by LostSnow25
Question 2:
Also, I was wondering how to create a lib file? Since my engine so far creates 2 obj files and I need to have my program output a lib file so I can link to it.


Don't worry about linking to your engine in this way until the design is done and you are ready to produce a game with it. The reason is because it adds more complexity to the debugging and development process of the engine. What you should be doing is just develop the engine in its own set of source and header files and including them in your project.

When you are ready to make a library file, all you do is create a new Static Library project in Visual Studio, make sure it is an Empty project, and then simply copy the source and header files of the engine into the project. When you build the engine, you will get a .lib. You will have to use the header files along with the .lib in another program as well. Easy, right?

If you wait until the engine is done and the API is solid and ready to use, then actually making the .lib is really simple. If you try developing the engine as a library, you will run into nothing but trouble, especially if you have never made a library before.

Good luck on your project!
Quote:Original post by jpetrie
So how many games have you made already? Games and engines require the same thing; the same kind of code doing the same kinds of things. The difference is that engines are more generalized (usually) than any given game. So the way you learn to write engines is to write games.

If you've written a few games already, go look over their code and start to identify common aspects and refactor them out into a base framework. Rinse, repeat.


I have limited experience but I have to agree with everyone who says write games not engines.

When I started working on little graphical games I was making classes to handle all the stuff like text, graphics, sound, etc...then I realized I was pretty much creating the "engine" as it was reusable, flexible (for small and simple stuff:) ) I realized that as you make the games the engines almost write themselves.
Thx for the replys! I see now what I must do :)

This topic is closed to new replies.

Advertisement