Hey guys, So my super custom 2D game engine is taking shape nicely. Reasons for making a custom engine are:
- Learning stuff {Well this is a HUGE reason}
- No good 2D C++ game engines out there, well at least I don't like any of them. Cocos2D-x has both HORRIBLE architecture and documentation.
- Current 2D engines have just "fancy Views" or "frameworks" to display a bunch of images on the screen. I wanted something that does a LOT more heavy lifting under the hood such as Actor, Memory, Process, Event etc management.
- Portability. Currently I don't know of any good C++ engines which are widely portable to as much platforms as possible.
- Apart from supporting many platforms, I wanted to have a dynamic solution for the game to run on almost all device resolutions and densities.
- Absolute 1337 (skeletal) animation support.My Custom 2D Game Engine (I call it FEngine)
Main features: (Currently supported)
-- Almost all code is platform independent C++
- Supports C++ delegate functions
- Smart pointers, unfortunately BOOST :S. Will change in future.
-- Dynamic Letter-boxing and Content scale factor:
- The engine is able to run the game on almost any game screen resolution, properly preserving aspect ratio and adding letter-boxing where appropriate
- Resizes the graphics automatically depending on screen resolution and screen pixel density. For higher pixel densities it dynamically selects high-res artwork.
-- Sprite Batching
- The game engine dynamically batches the sprites into one huge array before sending it to the GPU in a single Draw call.
- Supports translation, tinting, rotation, scaling, opacity etc
- OpenGL ES 2.0 (will add other renderers in future)
-- Process Manager
- Simple yet VERY POWERFUL co-operative multi-tasking system.
- You can animate, tween, synchronise, background tasks, almost ANYTHING you can imagine.
-- Event Manager
- Event notification system based on "observer design pattern".
- Multi-buffered event queues.
- C++ Delegate Functions
-- State manager
- A fully object oriented game state manager. I guess bit of an over-kill in the presence of process manager. I'll check it out what to do with it next time.
-- Resource Cache
- A central hub for managing all of the game resources.
-- Sound Manager
- Supports Ogg/Vorbis file format.
- OpenAL powered !
-- External dependencies:
|----- libPNG
|----- zlib
|----- ogg/vorbis
|----- glm
|----- tinyxml
|----- PennerEasing
|----- FastDelegate
|----- BOOST
Platforms that i would like port my current C++ code base onto in near future: (currently Windows, iOS, Android and BlackBerry will be supported)
|----- Windows [PowerRVR OpenGL ES2 bindings]
|----- Mac OS X [PowerRVR OpenGL ES2 bindings]
|----- Linux [PowerRVR OpenGL ES2 bindings]
|----- iOS
|----- Android
|----- Blackberry
|----- Windows Phone [Angel project OpenGL ES2 wrappers around DirectX]
|----- HTML5 / WebGL [using Emscripten]
|----- Flash / Stage 3D [using Crossbridge]
|----- Nook
|----- Kindle fire
|----- Chrome NaCl
Near Future plans:
Implement Actor manager, Scene graph, basic GUI.
Following screenshots demonstrate the game running on various iOS devices in various orientations:
- iPhone 4s 640x960
- iPhone 6 Plus 1242x2208
- iPad retina 2048x1536, landscape mode