• Advertisement
Sign in to follow this  

Attempting a 2D Game Engine

This topic is 3739 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

Hi, I make software, and I make games, and I wanted to try and make a Game Engine. I know there are some game engines out there, HGE, Torque, but I was wondering do they use an SDK and just wrap around it by making a special library to make it easier for code. And what exactly is in a game engine? I have been thinking about this, and this is what I have come up with. -Loading, drawing, rendering, and freeing up any 2d graphics of any type on screen -Loading, Playing, looping, and freeing up and sound files -Input for controllers, keyboards, etc... -AI for enemies for either A* Path finding, fuzzy logic, etc... -Physics for calculating gravity, collision detection, forces, etc... -Level editing - loading, scrolling, creating, destroying -Object creation creating game objects with variables, and task associate with em. -Networking having the ability to have the game online through UDP, TCP, etc.. My only worry is that if I make this game engine wouldn't I have to specify a type of game that I'm working toward like a 2d RTS game engine could with much work make a 2D Adventure scroll engine game like mario, but then you would ask why do I have the Network capability if I'm not going to use it? So could someone give me som *pointers on how I should go about researching, designing, and start the development of my very own 2d game engine please? Oh, and if it helps I was going to use the SDL library with SDL_ttf, SDL_image, SDL_net, etc... Unless I have to use just Dx, and OpenGL which I'm pretty sure I can use SDL since it's not a game engine, but a library for media! Thanks, c.s. Finch

Share this post


Link to post
Share on other sites
Advertisement
For the pointers... all I've got is... to be able to call something a "really useful engine" you have to have two or more games written on top of it to prove that it works.

Basically you factor out all the stuff that is common between the two games and call that part the engine.



The other make it or break it part for me to have a sweet engine is... that it's got to be easier to use it then to not use it... I work with a bunch of knuckleheads that are constantly making up framework type code and calling it a framework... and their typical 10-50 files of 2000 lines of code each require a 150 page manual to use at minimum...


/Thats just my opinion on the topic, because I've got a hard bias because I expect an "engine" to do much of the work for me because I would not want to be doing it myself.



Share this post


Link to post
Share on other sites
Keep things practical - don't just make an engine for the sake of it. You'll have to know what you want to do with it before you can even create an average engine or framework. Remember, engines are made to save people time and are built to handle tedious, often recurring work. Setting up game windows, loading, managing and flushing textures, models, sound, handling user input, network code, and so on, depending on what your game needs.

You don't need to call something an engine or framework to save yourself the trouble of rewriting such code. It's not about writing an engine. It's about what's the best solution for your particular situation.


I'm currently building a Flash game. I'm not writing an engine, because that would only distract me for now. However, while building the game, I'm already creating a sort of framework that I can reuse in later games. I have copied the code, stripped away stuff specific to this game and there's my framework. I have already used it effectively to start up another game for a school project. Saved me a lot of time, and while I don't have a perfect, shiny and polished engine ready now, I do have a game that's going pretty good, another one that's well on schedule, and a usable framework as a by-product. And I can refactor this framework as I develop more games and find better solutions.

Much better than my previous attempts to write a solid engine beforehand. I wrote some cool functionality, added some stuff and eventually got bored with it and lost motivation because I did't have a game done, only a half-finished, over-engineered foundation.

Also, there are various existing engines already. Why not use one of them? They likely provide most, if not all, you need.

Share this post


Link to post
Share on other sites
Well, I know that with the experience I do have, and the work I have done flash, java, and some C++ games math I have been in, and the libraries I have learned it is time for me to learn what is involved in building a game engine. I'm not out be no means to build some outstanding over engineered game engine that everyone will use. No, that is John Carmack's job. I'm simply just doing this for the purpose of experience, learning how game engines work, what is involved in making them, what it is to say that a game engine is bad, or good, and for the sole purpose of me making one. That is all!

Share this post


Link to post
Share on other sites
Thanks for the article.

I thought you know, what is the point of me making a game engine? I mean even if I am making a game engine that would dramatically simplify making a network game from computer to computer, and if I could make one with arena what would the point of it be? i have no time to make documentation, and upon that I can't write to save my life.

Thanks for the article, I'll just make games that everybody will enjoy.

Share this post


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

  • Advertisement