3
\$\begingroup\$

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?

\$\endgroup\$
3
  • 1
    \$\begingroup\$ 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. \$\endgroup\$
    – MichaelHouse
    Jun 23 '12 at 14:19
  • 1
    \$\begingroup\$ 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? \$\endgroup\$
    – jcora
    Jun 23 '12 at 14:33
  • 1
    \$\begingroup\$ 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? \$\endgroup\$
    – MichaelHouse
    Jun 23 '12 at 14:45
12
\$\begingroup\$

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
\$\endgroup\$
2
  • \$\begingroup\$ Particles in 2D games? \$\endgroup\$
    – jcora
    Jun 23 '12 at 11:52
  • 7
    \$\begingroup\$ @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. \$\endgroup\$
    – Adam
    Jun 23 '12 at 12:00
3
\$\begingroup\$

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.

\$\endgroup\$

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