Spacesimulator.net's 3d Engine Programming Tutorials


IMPORTANT NEWS: Because of lack of free time starting from January 2014 I will not support the tutorials and forum anymore. This means that there will be not updates and I will not answer to questions on tutorials. Sorry for this :(

You can ask questions to any developer's forum like for example the good one on the gamedev.net website. I thank so much all the people that these years have supported this website. I've known nice and talented people all around the world! I wish you happy coding and that all your coding dreams will come true ;) Damiano




In these lessons I will explain step by step how to construct a 3d engine in C using OpenGL. I assume that you already have a basic knowledge of C. The engine that we are going to build will be structured to account for open environments, include features suitable for space simulators (after all, we are at spacesimulator.net). I will proceed gradually from the most elementary concepts to the more complex ones.

The code was originally developed using Visual C Version 6 for Windows, but I think you won't have too many problems using other compilers.

You can find several Libraries and Resources following this link: Tutorials Libraries and Resources

I am currently working on my own Space Flight Simulator, check it out here: Univoyager Project

Screenshot Tutorial Add-Ons Source Code
Scrsht tut 3dengine.jpg The 3D Engine
Basic definitions: 3d engine, vertices and polygons. The first step to create the data structure for a 3d engine.
Dutch | English | Finnish | French | German | Italian | Portuguese | Spanish
C/C++
Scrsht tut openglandglut.jpg OpenGL and GLUT Framework
Here we analyze the rendering pipeline, the graphic library OpenGL and the utility library GLUT. At the end of this lesson we will be able to show a rotating solid object!
English | French | Italian | Mexican | Spanish
OpenGL 3.3 Porting
English
Linux
MacOS
MacOSX(Cocoa)
SDL
Windows(VC6)
Windows(VC.NET)(OpenGL3.3)
Scrsht tut texturemapping.jpg Texture Mapping
How to load an image and use it to cover an object. This technique is called texture mapping and is the most responsible for the realism of the scene.
English | Italian
OpenGL 3.3 Porting
English
Linux
MacOS
MacOSX(Cocoa)
Windows(VC6)
Windows(VC.NET)(OpenGL3.3)
Scrsht tut 3dsloader.jpg 3ds Loader
The data structure for a complex object can't be written by hand. There are a lot of programs that help to create 3d meshes in a very quick way. In this lesson we study how to load a 3ds file, a format that is really famous on the net.
English | German | Italian
OpenGL 3.3 Porting
English
Linux
MacOS
MacOSX(Cocoa)
SDL
Windows(VC6)
Windows(VC.NET)(OpenGL3.3)
Scrsht tut lighting.jpg Vectors, Normals and OpenGL Lighting
Lighting is the other important thing, after texture mapping, that adds to the scene further realism. Without lights all the objects seems flat. We will study also Vectors and normals because they are indispensable to make lighting calculations.
English | German | Italian
OpenGL 3.3 Porting
English
Linux
MacOSX(Cocoa)
Windows(VC6)
Windows(VC.NET)(OpenGL3.3)
Scrsht tut matrices.jpg Matrices and multi-objects loading
In this lesson we will improve and extend our object structure, we will be able to load some objects in our scene and manage their positions and rotations using matrices.
Italian
OpenGL 3.3 Porting
English
Linux
MacOSX(Cocoa)
Windows(VC6)
Windows(VC.NET)(OpenGL3.3)
Scrsht tut camera.jpg Camera and 3d freedom
Of course our biggest aim is to explore the universe by moving ourselves through it as we like, making the monitor a free moving video camera. How can we do this? Simple: with the videocamera tutorial!
(Not yet written)
OpenGL 3.3 Porting
English
Linux
MacOSX(Cocoa)
Windows(VC6)
Windows(VC.NET)(OpenGL3.3)
Scrsht tut fonts.jpg Print fonts using display lists
All this advanced graphic programming and then? We forgot to print simple fonts on the screen! We will do this using a bitmapped font, the best way to develop multiplatform games!
(Not yet written)
OpenGL 3.3 Porting
English
Linux
Windows(VC6)
Windows(VC.NET)(OpenGL3.3)
Scrsht tut iniparser.jpg INI configuration files - Parser
Where can we store all our Universe settings? Ini files are the best choice! Very useful and portable library to read/write INI files!
(Not yet written)
OpenGL 3.3 Porting
English
Linux
Windows(VC6)
Windows(VC.NET)(OpenGL3.3)
Scrsht tut sdl.jpg SDL Framework and FPS calculation
This os-platform independent framework will give us the possibility to manage all the boring stuff that a videogame needs: graphic context, sound and input.
(Not yet written)
OpenGL 3.3 Porting
English
Linux
Windows(VC6)
Windows(VC.NET)(OpenGL3.3)
Scrsht tut physics.jpg Physics: Dynamics, Acceleration and Force
Physics, the secret to give life to our spaceships. In this tutorial we will add the essential rules to our engine to simulate a real universe.
(Not yet written)
OpenGL 3.3 Porting
English
Linux
Windows(VC6)
Windows(VC.NET)(OpenGL3.3)
Scrsht tut collisions.jpg Physics: Collision Detection and Collision Response
Another tutorial on Physics: this time we will learn basic collisions detection and collision response.
(Not yet written)
OpenGL 3.3 Porting
English
Linux
Windows(VC6)
Windows(VC.NET)(OpenGL3.3)