Jump to content
  • Advertisement
Sign in to follow this  
  • entries
    3
  • comment
    1
  • views
    5477

About this blog

awesome gamedev adventures

Entries in this blog

 

Custom 2D Engine updates

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
9) 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):
https://vimeo.com/114033140

Android APK:
http://fakhir.heliohost.org/demo/enginetest1/Game-debug.apk

HTML5 WebGL: This may take a while to load, to please be patient
http://fakhir.heliohost.org/demo/enginetest1/Game.html

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

fakhirshaheen

fakhirshaheen

 

Compiling OpenAL, ogg/vorbis and libpng for Android

Saturday update:

So I've successfully compiled OpenAL-soft, ogg/vorbis decoder and libpng 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:
http://fakhir.heliohost.org/download/AndroidALOgg-debug.apk

Download the source code:
https://github.com/fakhirsh/android-AL-ogg

fakhirshaheen

fakhirshaheen

 

Progress report: My custom C++ game engine

[color=rgb(51,51,51)][font='Trebuchet MS']Hey guys, So my super custom 2D game engine is taking shape nicely. Reasons for making a custom engine are:[/font][/color]
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:[color=rgb(51,51,51)][font='Trebuchet MS'] (Currently supported)[/font][/color]
-- 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:
[color=rgb(51,51,51)][font='Trebuchet MS']|----- libPNG[/font][/color]
[color=rgb(51,51,51)][font='Trebuchet MS']|----- zlib[/font][/color]
[color=rgb(51,51,51)][font='Trebuchet MS']|----- ogg/vorbis[/font][/color]
[color=rgb(51,51,51)][font='Trebuchet MS']|----- glm[/font][/color]
[color=rgb(51,51,51)][font='Trebuchet MS']|----- tinyxml[/font][/color]
[color=rgb(51,51,51)][font='Trebuchet MS']|----- PennerEasing[/font][/color]
[color=rgb(51,51,51)][font='Trebuchet MS']|----- FastDelegate[/font][/color]
[color=rgb(51,51,51)][font='Trebuchet MS']|----- BOOST[/font][/color]

[color=rgb(51,51,51)][font='Trebuchet MS']Platforms that i would like port my current C++ code base onto in near future: (currently Windows, iOS, Android and BlackBerry will be supported)[/font][/color]
[color=rgb(51,51,51)][font='Trebuchet MS']|----- Windows [PowerRVR OpenGL ES2 bindings][/font][/color]
[color=rgb(51,51,51)][font='Trebuchet MS']|----- Mac OS X [PowerRVR OpenGL ES2 bindings][/font][/color]
[color=rgb(51,51,51)][font='Trebuchet MS']|----- Linux [PowerRVR OpenGL ES2 bindings][/font][/color]
[color=rgb(51,51,51)][font='Trebuchet MS']|----- iOS [/font][/color]
[color=rgb(51,51,51)][font='Trebuchet MS']|----- Android [/font][/color]
[color=rgb(51,51,51)][font='Trebuchet MS']|----- Blackberry [/font][/color]
[color=rgb(51,51,51)][font='Trebuchet MS']|----- Windows Phone [Angel project OpenGL ES2 wrappers around DirectX][/font][/color]
[color=rgb(51,51,51)][font='Trebuchet MS']|----- HTML5 / WebGL [using Emscripten][/font][/color]
[color=rgb(51,51,51)][font='Trebuchet MS']|----- Flash / Stage 3D [using Crossbridge][/font][/color]
[color=rgb(51,51,51)][font='Trebuchet MS']|----- Nook[/font][/color]
[color=rgb(51,51,51)][font='Trebuchet MS']|----- Kindle fire[/font][/color]
[color=rgb(51,51,51)][font='Trebuchet MS']|----- Chrome NaCl[/font][/color]

Near Future plans:
[color=rgb(51,51,51)][font='Trebuchet MS']Implement Actor manager, Scene graph, basic GUI etc[/font][/color]

[color=rgb(51,51,51)][font='Trebuchet MS']Following screenshots demonstrate the game running on various iOS devices in various orientations:[/font][/color]
- iPhone 4s 640x960




- [font=inherit]iPhone 6 Plus 1242x2208[/font]




- iPad retina 2048x1536, landscape mode


fakhirshaheen

fakhirshaheen

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!