

History of the TLE
From time to time i make a special backup of the source code. This happens whenever i think we made enough progress to keep a snapshot of this new version. I always keep a small changelog whenever i backup such a snapshot. The collected changelogs can be seen here:
12.07. 2004
I spent some serious amount of time lately to further develop our tiny little engine and it's really coming along pretty well. Hmmm, sort of. What i'm really happy about is the fact that i made progress at two contrary (well, most of time) points: Integrating new features on the one hand and consolidation of the existing code on the other hand.
The latter came at a prize though (time this is - see below). But lets see whats bigger, better, nicer this time:
-
I added basic support for GLSlang. Basic means just that: The engine is capable of loading a pair of vertex / fragment shaders, compile, link and use it. Shaders can be rebound at runtime making shader development fairly easy. But there is no high level material / shader management system right now.
And i don't really know if we will need a very sophisticated shader management. Featurewise the shading is now set to: Per pixel lighting (Lambert / Phong) using either an interpolated vertex normal or a normal map, base + decal Texture, a gloss / specular map and a user color.
Since you can define identity elements for all of these inputs, we can get away with (2 (interpolated normal or normal map) * amount of different light types) shaders. Of course this approach would waste a lot of performance. Why sample from an identity decal texture if this texture doesn't add anything to the final result?
So if i implement a shader system, i think it will just create all the permutations of shaders and find the best shader for a given material (somehow goes into the direction of Halflife2 / Source Engine).
A few words on GLSlang: This is really, really a LOT of fun. I just upgraded to the latest Ati Catalyst 4.7 which gave a significant performance boost as well as ironed out some serious bugs , which caused the engine to crash at the rebinding of a shader (Engine crashed on the 9th call of glCompileShader, no matter how trivial the given shader was).
-
Since GLSlang works so well, the engine dropped support for EXT_vertex_shader and ATI_fragment_shader.
-
Support for multiple colored light sources and the ability to interact with them (create one, delete it, move it around). Oh, we're limited to point lights right now but this will change as soon as we have a proper shader management system.
-
I rewrote the .3ds max loader from scratch - it took a lot of time, don't ask me why. But i guess it was worth it.
There is now a much better interface between the raw data from the .3ds file and Object3D. And Object3D sorts the vertex data by the used material, which results in larger batches and better performance.
-
A better texture managing using a small proxy class for Texture, which acts like some kind of smartpointer, manipulating a reference counter of the texture whenever it's created or destroyed. This little helper also made it possible to throw away this stupid "use glTexImage2D to update an animated texture" approach. Quite a performance boost.
-
A lot of refactoring all over the place. I started using the stl, string and vector in particular. Wrote a lot of missing copy constructors and assignement operators. This is boring and takes a lot of time but simply needs to be done if tiny little engine shouldn't become tiny little bug collection.
We made a todo list recently and it's horrible to look at it - so much needs to be done :-(. My focus is still on consolidation. Make the existing code as stable and robust as possible so we have a solid foundation for the game itself. There is a folder called "game" in my source code directory for about a year now, but it's still empty. Hope we can change that soon.
17.04. 2004
After a long break (about a year, my goodness and all because of the almighty implementation of Gobang - ok i admit it - and me being bored of 3d stuff), there are some news to report:
-
Refactoring of the existing code
-
Implemented lighting, which is pretty simple using the fixed function pipeline. Normals are auto generated and interpolated for geometry loaded from .3ds files.
-
Implemented support of multitexturing.
-
Better animated textures. An ascii meta file stores the information of images and times.
-
Support for EXT_VERTEX_SHADER and ATI_FRAGMENT_SHADER. Horrible apis but a lot of fun to play with the programmable pipeline. The next revision will drop the support for these exentensions in favor of glslang. This will be the primary target plattform from now on. An old fixed function multitexturing path will stay in the code, so i can still develop on my laptop if needed.
02.05. 2003
Another "milestone"... so whats new, better, more, nicer...?
-
A better menu, with a nice class hierarchy. Not yet finished, but whats there looks promising. This is for a kind of main menu only at the moment, in the end i want this to be so flexible it can be used for every kind of menu we will ever need (context menus for game world objects come to mind).
-
A console within the 3d window. With a transparent overlay, it shows the last 30 log messages and features a command prompt (with a history of course).
-
The ability to pick objects using the backbuffer. Which means a special "Pickframe" is rendererd in the backbuffer (invisible to the user) using object id's as the color. After reading back the pixel underneath the mousecursor, i can then reconstruct the object id from the pixel's color. The obvious drawback to this solution is the inability to pick hidden object....who cares :-).
-
To show the currently selected object, a rectangle is drawn around it. The size of this rectangle is computed using all vertices of an object at the moment, later i want to use a bounding box for this (which will allways be transformed to the current position of the object unlike the objects vertex data).
-
A rough version of the "InEngine Profiler" from "Game Programming Gems 3" has been included into the engine. It seems to work but i didn't want to spend to much time on this, so its far from perfect (you can't even navigate the tree of profiling data).
-
As this profiler uses the tsc to measure performance, i'm now able to measure time with clockcycle precision (quite a difference compared to the lousy windows GetTickCount).
-
A big performance improvement: vertex arrays. In fact, using them is pretty easy and the same frame using vertex arrays just needs one third of the time compared to the imidiate mode (glBegin / glEnd). It's still not yet perfect and there remains a strange bottleneck at about 60k triangles / frame... most possible my gpu and maybe it's fillrate limit due to the lack of mip mapping in the current build.
-
Animated textures: Just a little hack i programmed being bored... it works, looks nice but its not a final solution.
Thats it. The next thing will be refactoring the existing code. And maybe better object management... hey game, we're coming :-).
28.03. 2003
Ok, where to start?
-
The engine now has a wireframe mode, useful for debugging purposes.
-
It counts the number of triangles drawn, the frames drawn (still event based, so no permanent drawing...) and the time (in ms) for the last frame. Ah, and all this is shown in the title of our window so you get to see it :-).
-
For happier debugging, the log window is able to save all the messages to a txt file. There are also the first exception handling routines in the code, so errors don't fade away silently (for example textures not found in the file system, etc).
-
The most important one, which took me about a week: We are now able to load 3D Studio max files and display the objects they contain (hoooray...). This code is still a mess but it does the job (for now). I will come back to it as soon as possible, for better error checking and more efficient parsing of the file.
Thanx a lot to Jakob aka "Fragdieb" for helping me a lot on this one by providing custom models and also .3ds versions of his now famous Turbot.
-
A first class for a generic 3d model. It's horrible inefficient, as it saves all vertices as a single object. This is definitly just a temporarly solution. In the long run, I will change this to a kind of indexed vertex array, which can be directly passed to the graphics api.
-
I started a class hierarchy for 2d Bitmaps. Bitmap is now an abstract super class which defines basic get methods (width, height, data, etc) and a static factory method to load a bitmap. This method checks the given filename and instanciates the corresponding subclass (like BmpFile, TgaFile).
-
While the old .bmp routines were just moved into a new class, the tga stuff is new :-). It was about time to be able to load files with an alpha channel.
-
I started working on a menu system and experimented with alpha blending (which works just fine).
A lot of stuff done, but a long way to go. Some of the new stuff needs reworking and we are still far away from having something you can call a game. The next big thing is interactivity. The menu is only the first step, with the next hmmm 'milestone worth a backup' i want to have a mouselistener able to select objects in the 3d world. Let's see how this works...
03.03. 2003
Better prototype. Switched to c++. Code is rather clean (added 12.07. 2004: hahaha, you fool), most parts of the renderer have been converted to classes like bitmap, vertex, etc.
Screenshot bug finally fixed (watch your alignment :-)).
15.02. 2003
Old c version. Very early prototype to lern opengl / windows programming.
