CRYENGINE – about Lua programming – part 1.

First I make this tutorial because lua language is used not only CryEngine …
Most game engines used this language programming.
Because I used the 64 bits into Cry Engine I will use the LuaCompiler from this folder :
About Lua if you read the official website you will see this :
Lua is a powerful, fast, lightweight, embeddable scripting language.
Lua combines simple procedural syntax with powerful data description constructs based on associative arrays and extensible semantics. Lua is dynamically typed, runs by interpreting bytecode for a register-based virtual machine, and has automatic memory management with incremental garbage collection, making it ideal for configuration, scripting, and rapid prototyping.

Also you can read about lua and windows OS here :
Now let’s make a simple example with this programming language.
First we need to deal with three file type: .cgf , .lua and .ent .
The .cgf cry engine file is a file will load into game.
The .lua file is a lua program file.
… and .ent file is a cry engine file ( entity file ).
So I make this files : test001.ent and test001.lua.
I save the test001.ent with this path : C:\CRYENGINE\GameSDK\Entities
and test001.lua come with this path: C:\CRYENGINE\GameSDK\Scripts\Entities\Physics
The content of the test001.ent:

The content of the test001.lua:

The next step is to open your Cry Engine Editor and will see your script working.
Now about the lua script ( test001.lua) is very simple to understand how it’s working.
First line is the name , in this case is test001.
All about this is store with {} and after that will come the functions: OnInit , OnReset and PhysicalizeThis.
Because all this functions come from test001 then the syntax is: test001:your_function() and will end with this word: end.
Also be advice about ; and , under Properties and after that is need to see how is the diff when we use:
self: and self.
All of this tips can be found if you read the test001.lua and try to understand that script.
Also you need to following prefixes on the value name…
Prefix Type
b – boolean
f – float
i – integer
s – string
clr – color
object_ – an object compatible with CryENGINE: a CFG, CGA, CHR or CDF file

You also can read this webpage.

Ogre 3D and Code::Blocks – first part unfinished

My son has 2 years old.

I had to make a little game to keep him busy.

Little known to push so I used the arrow keys to make it more interesting.

This is the source code.

When you run the project, you will see the following picture:

ogre 3d
The result is :
First Ogre 3D tutorial from Catalin Festila on Vimeo.

Is first try to use Ogre 3D …

Writing a basic game with C++ and OpenGL libs – part 1 .

This is a first part tutorial about linux game using C++ and OpenGL libs.

Writing a C++ game can be difficult.

You will need to focus on program structure and then to know how to create the necessary classes.

Let’s see the files I used:

The main.cpp file is the main program.

This file will make the window program and will deal with the user.

Also this file use OpenGL libs.

Let’s see the source code:

The next two files : display.cpp and display.hpp is used to display the game objects.

I use just one class : Display.

Let’s see the header file display.hpp

… and display.cpp.

You can see the OpenGL source code to make a rectangle.

The next files game.cpp and game.hpp is used to make all game engine working.

The header file game.hpp is:

… and also game.cpp.

Let’s make the Makefile.

This can done well if you know how working g++ compiler.

Use the command to make the binary file:

The resul is this:

simplegame tutorial c++

Old tips and tricks with Ogre and Blender.

Blender is an open source 3D content creation suite.

Ogre 3D is an 3D library for multiple desktop and mobile platforms.

But is a problem between this tow way.

The last Blender 3D not have yet a script to export the mesh to last Ogre 3D.

What we can do ?. It’s a simple way to make all working.

Use old version of this two and you can also use old video cards.

After you make all settings of code::blocks to use all Ogre librarys, you need to use some tricks.

First , in your source code you need to tell about this:

This means the all three files is using by 3D engine.

On Linux first file – plugins.cfg it is on my distro:

But is because I use an very old video card.

Let’s see the next file – ogre.cfg.

As we see it’s easy way to set some settings like 600 x 400.

The ogre.log it’s use to show the problems.

Let’s see another step in source code:

This load the file – resources.cfg.

Let’s see this file:

The YOUR-USER is your user home folder.

The YOUR-PROJECT it is the folder of project code::blocks.

The OGRE-FOLDER-MEDIA is folder of all files is export by Blender 3D.

Let me show my simple example using NVIDIA FX video card.

The next image show us one 3D object wich is a mesh object.

ogre blend

After I make all materials and mesh with same name.

I use the script to export ogre mesh using the 2.49a version.

ogre blend

The next two images show the settins I need to make to have a mesh.

ogre blend
ogre blend

Also you keep just the object you need to export.

You can use a simple C++ source code to render with Ogre Engine.

ogre blend

Irrlicht – 3D Engine – Part 1

What is Irrlicht Engine ?

The Irrlicht Engine is an open source 3D engine.
This engine is written and usable in C++ and also available for .NET.
The engine is completely cross-platform using D3D and OpenGL.

How works ?

Download the irrlicht from
I will show how this working on Linux. I use Fedora 12.
In this tutorial I will show how to used Irrlicht 1.6 .
The new version – irrlicht 1.7 is used in same manner.
First i install libs of OpenGL and g++.
See below , i used yum command in super user mode:

Now in same manner,you will install g++:

First, i downloaded both arhives of irrlicht–1.6.1 and irrlicht–1.7.1, see this command:

Now, go and write on console this commands :

You will see something like this:

This will take a time…

As you see , this will build all examples.
Finally you see some errors , don’t worry.

In this moment you can run all examples (see /irrlicht-1.6.1/bin/Linux/).
Let’s try one:


If you will try to run all examples and you have a old graphic card not all will run properly.

Some examples run only on console because you need to select driver.
You will see this message :

The tools from Irrlicht

The Irrlicht has some tools to helps users.
The directories from tools folder is :

Only GUIEditor, newFontTool and MeshConverter works on Linux.

See now how compile the GUIEditor

When you compiling GUIEditor you see some errors:

But, GUIEditor running well.


See now how compile the newFontTool.

The output file is Fontool on /bin/Linux/


See now how compile the MeshConverter.

The Irrlicht 1.7.1 will be installed in the same way.
I tried that.