Tex2D Rotating Header Image



This is my current project right now. I had the chance to get the source code and assets of an old game: Resurrection, the return of the Black Dragon. And I wondered “wouldn’t be fun to upgrade its rendering algorithms and that stuff to something more up to date”? And well, that’s my pet project at home. When the other more serious projects allow me, or when I simply want to do something funny, I spent some hours with it.

Here do you have a gameplay of the original game (yep, some people still play to games from 1999), and later a peek of where I’m now.

[youtube J6pdj36brMQ Original Resurrection]

And what have I done on the code? Well, when I took it it had a fixed pipeline forward shading renderer, and that was my start point. Currently it is a opengl 3.3 (formerly OpenGL 4.5 but the port to osx on a macbook from 2009 forced me to go down to 3.3) deferred renderer with omni shadowmapping and an exagerated SSAO :). Ah! and I don’t draw transparent meshes yet :)

The shadows are simple Shadowmapping with no filter yet, and the lighting it’s still a lambertian/blinn. Easy peasy, but I have to admit it’s funny to dive into the code and find ways to improve the rendering.

Here is the little video I’ve recorded this morning. Just the character moving, and I enable/disable the SSAO, otherwise no one would notice it’s there.

It’s embarassing but I admit that 1999 resurrection still looks better than mine, but give me time :)

[vimeo 227532668 Reborn (AKA Resurrection Resurrected)]



Intellij 13 eap

If you have this error when  starting up intellij 13 ultimate EAP on linux 64 bits:

[YourKit Java Profiler 12.0.3] Log file: /home/casa/.yjp/log/IntelliJIdea13-2942.log
/usr/lib/jvm/java-7-oracle/bin/java: symbol lookup error: /home/casa/.java/jayatana/1.2.0/amd64/libjayatana.so: undefined symbol: gdk_threads_enter

Add this line to idea64.vmoptions


It worked flawlessly for me and I can keep coding.


Status Update

Yesterday was a happy day :) As I stated in my previous post, I hadn’t tested any of all the code i had written, so yesterday (and the day before yesterday, and in fact the whole weekend) I was commited to test the loader and the shiny new math library.

Obviously it had bugs, several bugs. I spent a whole day with the quaternion class, unit testing it, and testing and testing again. I’m not able to visualize quaternions so it’s hard for me to test them or knowing what to expect when i set a watch in a quaternion during a debugging session :(.

I’m a firm believer that when you’re going to test something, start with simple cases, and later on, you can test harder and more complicated things. So being sure that quaternions were wrong, and that if i tried to test the md5 models i would be completely lost, on monday I decided to add the “feature” of being able to generate simple geometry on the fly (currently only cubes :) and start the testing session.

Da cuba man!

Da cuba man!

Yeah, i know, it’s not impressive, but it helped me to test if rotations were working ok (which weren’t) and if translation obeyed my commands (which, surprisingly, didn’t either). Once everything seemed ok I thought “Toni, it’s time to load the jeep md5 model” . And I did, and … the result was less impressive, or probably for some abstract artists, pure art :P

Abstract art

Abstract art

Ok, there was some problems there, so I went back to quaternions and they were ok, I looked at the loader, and seemed ok, I even wrote several debugging functions to get the state of the mesh… everythin ok. So where was the problem? Mesh indexes seemed to be completely messed up :| so I fixed that and…. Voilá

A wired jeep

A wired jeep

Ok, it’s not shaded and … it looks a bit… clumpsy :) but I like it :) now I can move forward to my deferred renderer, but first I will need to import md5 materials :)

And here end my status update, stay tuned!

Status update

Well, interesting times….

I’ve just removed a dependency :) GLM Math library is an excellent templated library, honest, use it if you want power and a nice syntax. Unlucky for me, I was using an old version (from 2007 IIRC) and it had several bugs. I decided to update the library to its last version, downloaded it, and then … then I realized i only use three math classes: Vec4, Mat4 and Quaternion, so I coded those classes and now i have one less dependency :)

I want to be honest here XDD I haven’t tested them and even when I will use unit testing on them (thank you for point me that possibility shash ;) I’m pretty sure that it won’t work on the first try hehehe.

More! Yes I have more! :D The md5 loader is almost complete, and working… well, after changing the math library, perhaps it’s not working anymore, but it’s there, waiting to load shiny md5 models! :)

Finally, I designed a useful notification system :) I use it in order to gather information from the application, I’m preparing a full article on that because I think it can be useful to somebody :)

And that’s all.. stay tuned :)

Back from the graveyard

After a long period of inactivity, i’ve just decided to resurrect my components based engine.

The first thing i’m going to do is remove as many dependencies as possible.

Stay tuned!