Jump to content
  • Advertisement
Sign in to follow this  

Most needed features of 2D game engines?

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

When you look around for middleware in the 2D area, there is quite a lot of stuff out there. However, most of it is very specialized (RTS engines, Isometric RPG engines, etc.).

When you look for stuff that is a bit more generic, you often get something like a basic graphics + audio + input package (and if you're lucky, +networking), but very few things on top of that. Here and there maybe you get a nice particle system or a tilemap engine, but that's usually it.

I'm planning to write an easy to use, yet high performance 2D engine (simply as a hobby project). I will not start from scratch, but will instead mostly refactor code of an engine I finished a couple of months ago. Meeshoo correclty pointed out that I should list the features that I already implemented, just to help you help me finding new features that are on the top of your wish-list.

(I'm just looking through the source code and listing everything halfway high-level that I see)

  • quadtree for space partitioning
  • collision detection algorithms for AABB/AABB, AABB/OBB, OBB/OBB, Ray/Ray, Ray/AABB, Ray/OBB (based on SAT)
  • Custom settings file parser (this is super ugly, but hey it's there and easy to use)
  • Content management. Load textures/soundfiles/shaders/everything through one generic class. Easily extensible (custom loaders) using template specialization.
  • gamestate managament. transitions between gamestates, have multiple gamestate running at once (render everything, update and respond to input only in "top gamestates" and features like that)
  • renderer that centralizes all drawing and does some basic optimizations, but can also do dynamic 2d hard-shadows (with an arbitrary number of light sources).
  • path finding using A*.
  • animation system (simple spritesheet based keyframe animations)
  • camera system
  • math utilities (mostly stuff for 2d vectors, but also things like fast inverse sqrt in there)
  • ingame console (you can type lua-script one-liners in it and it will execute it. you still have to bind your code to lua manually, though)
  • entity/component system.
  • tilemap engine. you can construct tilemaps with the TILED map editor and load it with the tilemap engine. you can give tiles properties that match properties in the engine, like "solid" which makes the tile collide with things, you can give tiles scripts to execute on collision, etc.

    That's basically it. There's some other (lower-level) stuff in there, but it isn't really worth mentioning, since it's just used to make the higher-level stuff work.

    So what are some other features that you'd like to see the most, because they're usually missing in other engines?

Share this post

Link to post
Share on other sites
I hope I'm not rude, but I think you will fail in this task if you start with that mindset. There are several engines that fail because they were developed from scratch to be an engine and not with a certain game or game genre/types in mind. Of course such engines exist, but they are either lower level, to allow a lot of flexibility for the user, or higher level, in which case they have to be huge and they cannot be done by one person (examples: Unity). Most of the greater engines out there have started as being part of a game, and then re-engineered to be more generic, and then improved over years to add more specific stuff towards specific game genres, but they were not built from scratch like that, they evolved.

Share this post

Link to post
Share on other sites
Well, I think you're wrong.

The main reason for that is that I'm not starting from scratch. I'm going to base everything off a code-base of another engine I wrote a couple of months ago (my own codebase for it is about 11.000 lines of code).

It contains a lot of very generic things, which are not genre specific at all, like: a data structure for broad-phase searches (quadtree, this could be expaned by other data structures), collision detection for arbitrary convex shapes, A* path finding, entity-attribute-behavior system (attribute-behavior is just components taken further apart), gamestate managament ("gamestate stack" and transitioning between gamestates, etc.), resource management, tilemap engine (I think probably half of all 2D games use some form of tiles in their world, regardless of genre), lots of other stuff.

I want to basically rewrite the engine because many things in it are based on code that I wrote more than a year ago, and is therefor pretty ugly (code-wise) and slow. It also lacks a lot of features that could be added, not only code-wise, but also tool-chain wise (the current engine lacks any tools whatsoever, and it's very hard to influence it from the outside of hard c++ code, meaning it's not very data driven which is bad)

The main goal of this thread was to find out about things that I should prioritize during development, and if I'm lucky, I will get some mentions of things that I haven't even thought of myself.

Share this post

Link to post
Share on other sites
Well, why didn't you said so the first time. Well, if you could list the features you already have, I will try to add to those.

Share this post

Link to post
Share on other sites
Well, the most important I would want to see added are:

  • cross-platform
  • all engine functionality exposed through scripting, so I can do all scripting in Lua or other scripting language
  • animation editor (pick-up sprites, edit the animation timing and method, all visual with preview)
  • physics engine (all you enumerated there regarding collisions and stuff must be abstracted into an easy to use physics engine)
  • scriptable AI "agents" / entity system
  • the ability to write custom shaders for surfaces used in games

    That is all that came into my mind.

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!