Jump to content
  • Advertisement
Sign in to follow this  
LostSnow25

What should a 2D game engine have?

This topic is 3538 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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!

Share this post


Link to post
Share on other sites
Advertisement
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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!

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!