• Register

This member has provided no bio about themself...

RSS My Blogs

Custom 2D Engine updates

fakhir Blog


Some Cool Updates:

Time to show off a very initial stage tech demo for my "Custom Super Uber 1337 2D Game Engine" :) . I've successfully ported the engine to iOS, Android and HTML5 {download links below}. Everything appears to be working perfectly on all platforms, even the sound and filing system. This tech demo makes heavy use of Processes {cooperative multitasking}. There still a LOT of missing stuff but I call it a day for the engine and really want to work on the actual gameplay. For the first game i'll keep it something very very simple.

Feel free to try out the demos and give feedback. Since I don't have a developer blog yet, you can follow my Facebook profile for future updates, I'll make gamedev related posts public.

As mentioned above the Engine is on really diverse platforms : iOS, Android and HTML5. It works on almost All resolutions by creating letter boxes around gameplay screen. In theory porting to Windows, MacOS, Linux, even blackberry should not be that hard once a very tiny amount of glue code is written. I'll do that in the next game, not this time!

Currently present engine features:

1) Sprite batching
2) Texture Atlas
3) Game state management
4) Process manager
5) Message Manager
6) I/O Manager {small glue codes for various platforms}
7) Resource Manager
8) OpenAL based sound manager {which appears to be working everywhere lol }

Missing engine features:

Lot of features are missing but i'll implement them after releasing a simple game.
1) Scene graph management
2) Actor management
3) Particle system
4) Far more efficient rendering pipeline
5) Proper pipeline for creating animations. Right now I just used raw processes. They are extremely powerful but.. well... RAW, hence very PAINFUL!
6) Importing skeletal animations, or even tweeted 2D animations directly from the all powerful Blender 3D's animation editor {that is: writing a collada parser !}
7) Use Blender 3D as a level editor

Demos:
Feel free to try out and give feedback

iOS (Only Video available):
Vimeo.com

Android APK:
Fakhir.heliohost.org

HTML5 WebGL: This may take a while to load, to please be patient
Fakhir.heliohost.org

Happy coding.. and now let's finish the DAMN game !!!

Compiling OpenAL, ogg/vorbis and libpng for Android

fakhir Blog

Saturday update:
So I've successfully compiled OpenAL-soft, ogg/vorbis decoder and ligpng on Android platform. That makes it very cross platform-ish. You can now use the same C++/OpenGL/OpenAL code for iOS, Android, Blackberry, PC, Mac, WebGL etc.

Basic idea is to write custom callbacks for ogg/vorbis and libpng in order to override their default file input system. The custom callbacks redirect file I/O calls from ogg/vorbis and libpng to memory streams.

ogg sound format is open source and patent free. png files are also used almost everywhere in games.

Tiny bit platform specific wrappers have to be written specially for android's weird asset management, but all that has been included in the source code below.

Note: While developing this module I did research on the net and used maybe small amount of GLP3 code somewhere {I think links are given where appropriate}. So please use this code as a study guide ONLY and then maybe write your own for final release.

Try out the android apk:
Fakhir.heliohost.org

Download the source code:
Github.com

Progress report: My custom C++ game engine

fakhir Blog

Hey guys, So my super custom 2D game engine is taking shape nicely. Reasons for making a custom engine are:

  1. Learning stuff {Well this is a HUGE reason}
  2. 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.
  3. 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.
  4. Portability. Currently I don't know of any good C++ engines which are widely portable to as much platforms as possible.
  5. Apart from supporting many platforms, I wanted to have a dynamic solution for the game to run on almost all device resolutions and densities.
  6. 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 640x960iPhone 4s 640x960

- iPhone 6 Plus 1242x2208iPhone 6 Plus 1242x2208

- iPad retina 2048x1536, landscape mode
iPad retina 2048x1536, landscape mode