First Release

I just uploaded the first release of my game engine Aether3D. At the moment it's only good for learning purposes, but I'm actively developing it so it can be used in indie games some day. Get it here.


Nearing a release and iOS fun

While my new engine Aether3D is not yet as feature-complete as my old engine, I will soon make its first release. The engine now works on iOS. That's right, I tested it on my iPod Touch 4th gen. and it works without any decrease in quality when compared to the other OS's. Porting was very easy. I just created an iOS OpenGL Xcode project and added the engine's GL portion into it. Then I converted the generated file extensions from .m to .mm so that I could use the engine's classes in the test program. My engine's code is in C++, but I had to configure Xcode to compile it as Objective-C++ because texture loading functions and several other functionality now uses Objective-C in the iOS project. Input uses the gyroscope and it was fun to play with.


Game Engine Update

Since I rebooted my game engine Aether3D I've done a lot of new code into it. It now works fine on Windows (D3D and OpenGL), Linux and Mac OS X. I've also compiled it on iOS, but it needs more code to work.

OpenGL 2.1 without using anything that is deprecated in OpenGL 3 or 4. Direct3D 9. Model file format is my own, but converters exist for .obj and COLLADA. I also began coding a Blender exporter plugin.

DLL System
DLL (or .so) system is implemented by having the core engine classes exporting virtual methods that are implemented by the DLLs. Hence, if the engine has method Renderer::clearScreen(), it's implemented in the OpenGL using glClear( GL_DEPTH_BUFFER_BIT ); and in the Direct3D using d3ddev->Clear(...);

Shaders are stored in asset subfolder as GLSL or HLSL source code. The engine determines which shader to use depending on material properties. At the startup, all shaders are loaded from the disk and cached.

At the moment, OpenGL backend is more optimized than D3D, but I will optimize both much more. Objects are cached when loaded from the disk so loading the same object many times is fast. When rendering, view frustum culling is performed. TODO: distance culling and sorting meshes by texture or shader.


Aether3D restart

I restarted my 3D engine Aether3D from the scratch. Now it's DLL based (.so on Linux) and platform specific stuff is abstracted away so it can and does support SDL/OpenGL and Direct3D. End-users need not to worry about rendering API and they can switch it without recompiling. I also moved on to modern OpenGL, so now there are no deprecated/removed function calls. The context, though, is still version 2.1, or whatever SDL 1.2 sets by default, but I will move on to SDL 1.3 some day when it gets more mature/widespread. On the project management side, I'm now using Doxygen comments and SVN. The new engine is still in its infancy and only renders text at the moment.


Aether3D current status

Aether3D now supports render-to-texture using GL_EXT_framebuffer_object and traditional glCopyTexSubImage2D() for older chips/drivers. Camera's view can be used as a texture, but I'm going to implement some kind of GUI system or something so we can have usable computers in the test scene.

Model loading is now a lot faster, because their data arrangement now resembles more the actual vertex buffer format. Considerable loading speed-up was evident on slower computers and in the scene editor (which is coded in Python/Qt, more about it in later posts).


Atlas Shrugged

I recently finished reading Atlas Shrugged by Ayn Rand, published in 1957.

This review contains spoilers, but I've tried to keep them at the minimum. The book describes a dystopian United States where socialism has become mainstream. Heavy government regulations are driving the country to its downfall when industries cannot make profit and eventually go bankrupt. At the same time the most brilliant minds of the country are mysteriously disappearing, and the government assigns jobs to people not based on their skill, but need. Everyone is asking, "who is John Galt?" and no one remembers where the question originally came from.

Dagny Taggart is a businesswoman running a railroad company with her brother James Taggart. The story clearly shows how regulations make their business harder and harder by the day.

Francisco d'Anconia is Dagny's childhood friend and is running a copper industry. He is smart, but intentionally makes bad business decisions.

Hank Rearden is running a steel company and has invented a new type of metal that is cheaper and stronger than any other metal, but the government does not like him and tries to prevent the metal from getting into market. Dagny Taggart is his biggest customer.

John Galt is a man who doesn't like the current society and wants "to stop the motor of the world", and leaves the society and builds his own secret society with other intelligent, productive people.

Main themes of the book include morality of capitalism, property rights, individualism, objectivism and rational thinking. There are many reasons for the downfall of the country. The society glorifies mediocrity and it's believed that no one can truly know anything about the reality. People talk using vague terms, restrictions can be broken if you have social status, and people try to get value from others without giving any value back.

The secret society is a free market and free mind utopia. Everything a man owns is earned through his own work. There is no government and thus no regulations on productivity. Every man is in charge of his own happiness. People value their life and work and produce high quality products and make new inventions.

Before I read this book, I read the Fountainhead. Atlas Shrugged contains many same themes but explores them in more detail. I liked the book very, very much. It's immensely deep when dealing with things like morality and property rights. Seven virtues are explained: rationality, honesty, justice, independence, integrity, productiveness, and pride. Every one of them helps man survive. The Fountainhead contains only one strong individual, but Atlas Shrugged contains many. John Galt and his friends are portrayed as men who are perfectly in control of their life, emotions and happiness. Every decision they make is based on rational thinking and they never violate their own moral code.