Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I have decided to make a simple engine for a new game I'm working on, and now, I'm wondering: what are the essential features of a 2D game engine? Or, a game engine in general?

share|improve this question

closed as primarily opinion-based by Josh Petrie Dec 5 '13 at 21:19

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise.If this question can be reworded to fit the rules in the help center, please edit the question.

1  
Bane, I'm sure you know this already but, discussion based questions are not a good fit for the site. "What other things should I add?" does not have a right answer. –  Byte56 Jun 23 '12 at 14:19
1  
I did think about that, but I phrased the question to include the (key) word "essential". I thought that there is a set of things every 2D engine needs, thus, the question wouldn't be discussion based. But I guess you're right, "what other things should I add" does kinda leed to a discussion... I'll try to reword the question so it specifically asks about the essential features, is that OK? –  jco Jun 23 '12 at 14:33
1  
Thanks for trying to fix it! That's closer :) I think there's certainly still some ambiguity with "essential" since that's up to the needs of the user. I guess we'll see what the community as a whole decides. You may be interested in this question: What should a game engine do? –  Byte56 Jun 23 '12 at 14:45

2 Answers 2

up vote 12 down vote accepted

Add whatever your game needs. Not every engine needs every feature and I strongly recommend you to focus on the ones used by your game, if you ever want to finish working on it.

It's as easy to get lost in collecting engine features as it is to be frustrated later when figuring out that the gain of all this work turned out to be void because those engine features were never put to good use.

In general, I'd say that the following 2d engine components are quite common:

  • Scene Management
  • Resource Management
  • Sprites, Tilemaps, Sprite Fields (probably combined with some kind of parallax layering technique or even "3d coordinates")
  • Particle systems
  • Sound / Music handling
  • Input handling
  • Collision detection / Physics
share|improve this answer
    
Particles in 2D games? –  jco Jun 23 '12 at 11:52
7  
@Bane Of course. Particle systems are not a pure 3D game engine feature - a lot of 2D games use them as well. After all, it would be a waste of potential, not to: Fire, smoke, splashes of water, explosions, debris, magical spells and a lot more effects are usually achieved through more or less primitive particle systems. –  Adam Jun 23 '12 at 12:00

There aren't that many essential features for a game engine. It all depends on for what kind of game the engine is.

Well, the few features pretty much any 2D engine needs:

  • Loading and displaying sprites (including animations)
  • Loading and playing sounds
  • Loading and playing music
  • Rendering Text
  • Resource Management (in a HTML 5/JS engine the browser takes care of this)
  • Input handling

Everthing else really depends a lot on the kind of game the engine is made for. Particle effects might be useful for a action game, but maybe not so much for a strategy game. Same for physics. Some games work best with tile maps, while others may work better with some kind of polygon landscape or a landscape made of decals. Story heavy games need a proper way for handling cutscenes. A jump and run engine would need the functionality to handle slopes. etc. etc.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.