Jump to content

  • Log In with Google      Sign In   
  • Create Account

pozitiffcat

Member Since 13 Aug 2012
Offline Last Active Aug 30 2012 10:03 PM

#4974034 Object Oriented Graphics 3D Engine for Casual Game development

Posted by pozitiffcat on 28 August 2012 - 03:03 AM

Hello.
I uploaded the new version. It's beta 2!
Changes:
+ added timers
/ improved perfomance, up to 33% on Android devices
+ two lib's version, release and debug
/ String is now dynamic
/ little fixes
/ left-handed matrix by default
/ eclipse wizard now requires .NET 2.0 (previously was required .NET 4)

download


#4969339 Object Oriented Graphics 3D Engine for Casual Game development

Posted by pozitiffcat on 14 August 2012 - 01:04 AM

I hope, that everything is clear. I don't use translate.google.com for translate first chapter.
Introduction.
This file is official book of OCGE (engine). Engine designed by Malchenko Alexey of Togliatti city – it’s me. I decided to make easy and handy engine with tools for crossplatfom compile your source. The basic idea, to make portable source code between Windows, Linux or Android OS, and to write a clear documentation. In additional there is a documentation for all engine functions. I will try to describe the features of engine and indoor mechanisms at work him.
The engine designed for write a small casual indy games, but if the programmers has experience then may write a larger project. May be have to agree some moments with me, that would I may add to required functionality. On 1 august 2012, my site is http://malcdevelop.ru. Please asking question in me forum.
The engine has self-model and image format. It is also same included shaders – with lighting and texturing, with lighting non-textured, with shadows. You don’t care for switch this standard shaders, engine make it for you. You shouldn't cares for switching this standard shaders, engine make it for you.
It is book will have general principles of work on this engine.

CHAPTER 1 – BASICS
In this book I would like bring to you the basics of this engine, I will do it in this chapter.
Initialization algorithm.
To write logic, to need initialize system. That would make this, setup the IDE, call wizard or handy setup for include paths. Then get instance class of engine and make window of the right size. Then depending on platform, call event listener of window in cycle, render scene and call signal of end draw.
From theory to practice:
#include <ocge.h>
For saving portability for source code, we will create two functions is createEngine and drawEngine. These two functions will be called sequentially, from main function of our program. If you compile on Android OS, then this functions to call in appropriate JNI functions.
Declate the global variables:
[source lang="cpp"]ocge::IEngine* engine = 0;ocge::ISceneManager* smgr = 0;ocge::ICamera* camera = 0;[/source]

createEngine function:
[source lang="cpp"]void createEngine(int width, int height){engine = ocge::createEngine();engine->init(width, height);smgr = engine->createSceneManager("smgr");}[/source]
ocge::createEngine() returned pointer to engine. Don’t call it again. What happened at running this function: creating a new instance of engine and transferred to programmer.
engine->init(width, height) initialize of system. What happened at running this function: is remembered projection matrix, creating a window (if non Android OS), setting up viewport and loading standard shaders.
smgr = engine->createSceneManager("smgr") creating new scene manager. Scene manager need for create new objects and render scene on screen. What happened at running this function: creating a new scene manager and adding at scene manager list, of engine.
drawEngine function
[source lang="cpp"]void drawEngine(){smgr->render();engine->endDraw();}[/source]
smgr->render() perform render scene. Inside that is a very hard mechanism. What happened at this function: setting up self in state (for domestic purposes), if called non renderToTexture function then generate shadowmaps for first available light source. Remembers the viewProjection matrix and view matrix for domestic purposes, then setting up skybox position, clear screen and draw IEntity.
The rendering process a IEntity: binding a shader of object, if shader not binded. Binding textures and setting up uniforms, call callback function onEntityRender at shader, setting up buffers and draw object. Then process behaviours and particle systems.
engine->endDraw() draw finished and displays to screen.
Binding of one. For windows it may be as follows:
[source lang="cpp"]int main(){createEngine(640, 480);while(engine->loop()) drawEngine();return 0;}[/source]
engine->loop() calling event listener at window (process messages at windows, linux, macOSX) and update deltatime variable.
But for Android OS a little bit differently. Process messages works on Java code. In turn java code starts the native jni functions, which creating window and openGL context.
An example of how this might look like:
[source lang="cpp"]void Java_com_example_hello_DemoRenderer_JNIOnSurfaceChanged(JNIEnv *vm, void *reserved, int w, int h){ createEngine(w, h);}void Java_com_example_hello_DemoRenderer_JNIOnDrawFrame(JNIEnv *vm, void *reserved){engine->loop(); drawEngine();}[/source]
As you can see, there is no cycle.


#4969036 Object Oriented Graphics 3D Engine for Casual Game development

Posted by pozitiffcat on 13 August 2012 - 06:31 AM

I decided that this thread is best suited for me post.
I wish that you would rate me project, and testing.
Me engine is crossplatform. At the moment aviable Android and windows.
The OCGE is Object Oriented Graphics 3D Engine for write Casual games on C++. This engine is crossplatform and uses for Windows and Android (may be linux).
Features:
cg3d models (exporter from 3DS MAX)
oi images (converter from any image formats)
media source may be *.zip archive with compression
C++ classes and callbacks classes
Scene managers
Texture fonts
Render to texture
Particle callback builder
Data class for any nodes
Shaders
Post effects
Shader callback at every entity
and more...
Distributive has PDF book with tutorials of the OCGE.
Official web site: http://malcdevelop.ru

If you have any questions, please visit my forum: http://forum.malcdevelop.ru
I'm sorry if i write in the wrong thread


PARTNERS