Thursday 20 December 2012

DrumPuzzle: Source Code Released (Only RgsEngine)

My mission of creating a cool DrumPuzzle game for mobile has taken a turn with no more 'reinventing the wheels'. After squeezing lot of time from my personal life with going to the very basics to produce a creative work from scratch, I have realized that, I can be much more productive and creative if instead of going from scratch, I do connect existing pieces/open source/free software to create new solutions.

So I am freezing the coding/modelling everything for DrumPuzzle here, instead I am going to start using existing free/open source 3D SDK/Frameworks (I have few of them in my list) which provides easy port for multiple platforms including mobile with short learning curve. Will post separatly.


Details of the RgsEngine:
I created a basic engine with lot of goals in my mind earlier (Listed in my previous post) but with short of time could implemented the neccessary ones.


1. Load OBJ files exported by blender.
2. I couldnt invest time on integrating blender loader in the engine, so, created a naming convention for blender exported OBJ models to specify more information as an example:
rs=1;cs=0;sh=1;ctl=btn0;en=1;tag=sound_label;grp=options;
sh: Shader type
ctl: Control type
tag: Key to find specific model
grp: Group .e.g. to hide all controls falling in same group.

3. Texture based Shadowing technique to provide realism.
4. Mouse/Touch based 3D selection. The menu screen with the engine demos mouse click buttons and actions to give a 3D GUI experience
5. RenderTexture to update texture for various effects. Currently render texture is used for Shadows. Also I planned to add custom text rendering logic using RTs but I will do it in a different way with my next solution.
6. Portable on iOS/Android.  Though couldnt not build again for iOS/Android but I am sure there wont be issues other than shaders compilation, as GLES 2.0 emulators on different platforms are not so strict with producing  compilation errors.


NOTE: No Memory leaks checked, couldnt get time to clean/review the code.

The source code of the engine can be downloaded here:  Source: RgsEngine 
I have attached the source code with all the resources:  textures, models, blender, shaders etc. I have built and tested on Windows with VS 2008.

The code is small and easy to understand, almost 70-80% engine code is  fresh with few pieces imported from free/Open source software.



A brief intro about the implementation of the first screen shipped with RgsEngine: 

1. Each screen shown on a button click is a separate OBJ model.
2. Since GUI is not designed with generic design, so all other screens are hidden initially. When user clicks a button the other screens are hidden.
3. On Mode button click, screen shows option for multiple modes which sets a uniform variable to make a button appear selected.
4. Picture button shows 2 separate meshes on left and right walls with same texture ID assigned to both. One to show in selection screen, other to show currently selected/active picture.
5. Play button code is commented. This should trigger a scene change (in case of cocos2D).


The source code is free for any purpose. Idea is to share and spread knowledge. 



Sunday 9 December 2012

Drum Puzzle Progress update 2



Kind of final layout of the first screen (menu) of the DrumPuzzle game. Check Title carefully. This scene has most of the GUI logic implemented.
I have tried many effects like Bump Mapping/Reflections/Projections separately, all look awesome and after game is complete with required functionality, I will add those some  effects. Each button will have a glow effect in the first final version.

I have designed and implemented the core graphics engine part from scratch with special mesh naming convention to easily import .OBJ files in the engine exported by blender.
cocos2D-x cross platform 2D graphics/game engine provides the platform independence part which saves lot of energy from writing platform specific code.

Currently doing development on Windows 7.

Wednesday 14 November 2012

DrumPuzzle Progress update I

A snapshot of the game play but will have much better graphics. 


The game play is very simple. Unlike other tile puzzles where user swaps the tiles, here user will also be able to rotate a strip tile by tile by swiping over any strip.

The game will showcase a much better gameplay with superior 3D graphics not seen before.

Monday 5 November 2012

DrumPuzzle First Update

The very first screenshots of the DrumPuzzle graphics. 
I am using cocos2D-x cross platform 2D graphics/game engine (http://www.cocos2d-x.org/).
Instead of using any other 3D engine (there are so many available for mobile platforms), I decided to write entire (90-95%) 3D rendering code from scratch. This includes
1. Wavefront OBJ model loader.
2. Matrix/Vector classes
3. Shadow generation involving multi-pass rendering using shadow maps technique.
4. Reflection against standard planes. (Reflection against arbitrary planes is just a bit of little more mathematics)
5. Texture Projections for additional special effects.
6. Modeling using Blender 2.62.
7. I am also planning to add more cool effects like video playback using render to texture (in case EGLImageKHR object is easily available), + ripple effect depending on the performance of the devices and looking for more.  

Once I have a first version of working game with some menu navigation, I am going to post the design + code snippets of the shading used for this game.  
Also I will be compiling the code for both iOS and Android later to check the performance.

Wednesday 31 October 2012

Oh I know little of Blender + LuxRender

I I love drawing specially using digital tools. Blender is my favorite, but with many other rendering tools I tried, Luxrender is superior with superior quality of the rendered output.

Above scene was modeled using Blender 2.62 and rendered using compatible Luxrender.
I believe Blender is one of the best tool a programmer should definitely add to the skills  to do 3D modelling for prototyping purposes.

DrumPuzzle proposal


DrumPuzzle is a new game that I am working for a while. This game is mainly a Drum version of Jigsaw classic puzzles. I coined this name for a similar game I used to play in my childhood.

It is a very interesting and a new unique game going to be available at the end of 2012 sometime on App stores both for iOS and Android.
This game is visually rich with special shading effects including Shadows, Reflections, Projected textures, Bump Mapping, vector graphics effects using GLES2 rendering using Cairo etc.