Tuesday, August 09, 2011

Exploding objects

Few months have passed and I've basically rewritten all internals of the engine. Now there is much more generic scenegraph with nodes that reference to objects that then may have one or multiple meshes. While cleaning things up I removed a lot of unnecessary calls bringing some performance up and making it simpler to test more complex scenes. There is a factory class to create terrains and tunnels dynamically and in the future possible other meshes. I also wrote freetype2 support so that it is easy to test and use different fonts.


I started to write 'effect' support which in practice means that scene will pick a particular shader program attached to the node and animate its attributes, offsets and so on. First I started to work on 'explosion' that animates vertices along face normal with an offset. I'm pretty satisfied with the results so far. Plan is to either fade away pieces while making them smaller, or possibly just let them hit the floor after initial 'radial' movement.


Monday, May 23, 2011

Normal tricks

I just spent some time rewriting the model loader. Old one was originally done to a software rasterizer and did not handle per vertex normals correctly. Now that I *finally* rewrote it, I can remove quite a lot of code that just sit there because of dependency reasons with the old SW engine :) Now mesh can have 2 modes, one with face normals that make the object look a bit like a sculpted wooden statue and another mode with per vertex normals that implement Blinn-Phong 'correctly'.

Wood statue :

For wood statue each vertex in a face gets the face normal, so each vertex normal points to the same direction.

Blinn-Phong :



For Blinn-Phong each vertex normal is the normalized sum of normals of all adjacent faces to the vertex.

Saturday, May 14, 2011

Light scattering

I got bored with the engine and decided to just play with effects for now. Here is real time light scattering, like explained in in Fabien Sanglard's blog. I plan to mix this with the earlier bloom shader and see if the thing still runs 60fps. It seems Acer laptop did not like light scattering though, both CPU and GPU temperature peaked very high and my laptop powered off itself, maybe some optimizations needed, eh :)

Tuesday, May 03, 2011

Hairy Balls!


I started to try out a bit more experimental things and implemented sort of a grass effect by abusing the normal data and drawing some GL_LINES per vertex. Looks nice, needs some more touch though ... more on that hopefully later.

Friday, April 29, 2011

Happy Buddha


Lighting is now fixed and speculars are finally moving according to camera and light position. In the end bug was simple but hard to notice, I forgot to normalize camera vector in the shader which made it *very* big compared to light vector in the lighting equation so light movement did not cause any changes and only camera did. Also pick feature got fixed on the way while porting recent changes to win32 build. Now it is time for new features and optimize the mesh loader, it takes ages to load buddha model :)

Thursday, April 28, 2011

tiger power


I rewrote my model loader and now there is support for multiple polygon groups and texture coordinates. Thanks to models and nice texture atlases from http://www.kunzhou.net/tex-models.htm I'm able to test that engine works. And then the bad news, while doing all this I noticed that lighting does not actually work, picking does not work anymore and some other misc stuff, but it was necessary price to get rid of old obj loader, time to fix these things.

Thursday, April 21, 2011

let there be light


Took a step forward to more 'game engine' approach and implemented a first person camera control with mouse and strafe with keyboard. Added terrain and much more sophisticated lighting and material model.

Wednesday, April 20, 2011

Teddybears


Dear diary, once again I started to build a small 3D engine, this time with OpenGL (ES) 2.0. Engine works fine with Linux PVR SDK, MESA software GLES 2.0 and MS Windows Nvidia OpenGL SDK. Engine contains a simple scene with objects (supports only .obj format at the moment) and a final full screen postprocessing pass. Objects are stored in VBOs and simple light model + bloom/blur is implemented using shaders. Engine provides a resource hash and memory management for shaders, textures, FBOs and other GL resources. Picking support (red teddy has been selected) now uses FBO and renders one extra frame with simple color shader. The end goal is currently to have a simple sandbox where to test different OpenGL features.

Monday, February 11, 2008

Ultima VI

Last weekend I bought Ultima VI for my Amiga 1200 from recycling center for 5 euros :-) It runs very well from disks but hard-disk installation requires booting to non-AGA mode from early startup screen (toggle both mouse buttons when booting) + game hangs after character generation and startup movies :-/ Game itself is really nice still, it's old age does not really show up as graphics are good, only thing that really bothers is the amount of disk-swapping ...

Sunday, November 18, 2007

PS3

I *finally* went to shop on last friday and bought PS3! So far, I'm *very* satisfied with the thing, Motorstorm rocks and really shows what is possible on nowadays consoles, lots and lots of details and shader effects. Apple bt-keyboard paired nicely however it did not like the one button mouse, time to buy better one :) Looking forward to install Linux into it on some upcoming weekend!

Sunday, July 08, 2007

Commodore + SNES


Sometimes it is hard to connect dots! I bought a Commodore monitor month ago to have it for my C-128 ... never got it to actually work. Only now I realized that I have a composite video cable for my SNES and tried it out ... WOW it works :-) Snes-mouse is there just for curiousity ... maybe you did not know it exists ?-)

Thursday, November 09, 2006

A glass of whiskey


It's probably been too long time since I spent evening hacking and drinking 'Famous Grouse' ... (don't think I don't know better whiskeys, I just like to have them cheap). I have left 'libenkine' for awhile and gone back on GL (but on my minimac this time :-). I think I'll spend some time thinking how to make a simple landscape attractive ... flatshading should be enough for everyone, right? Well ... I'm having textures there, I've made a simple API to update textures which seems to be fast enough for small purposes but now it's bugging .... urgh .. I guess it's time to goto sleep!

Thursday, August 03, 2006

libenkine

yesterday I spent my evening hacking on hedgehopper game (https://garage.maemo.org/projects/hedgehopper/) and (as was originally planned) started to separate game-engine as a library called 'libenkine'. libenkine will contain tilemap and spriteclasses + engineclass to handle these (and other stuff) but also primitive drawing + surface manipulation, so it can also serve as a simple graphics API. the ultimate goal is to make game development a simple task, basically just building a tilemap level with editor and producing a textfile which describes what sprites it will contain. yep, I know there must be dozen game api's done on top of SDL and propably it sounds crazy to implement another one ... but when checking out the existing ones I find them complex to use. one big goal for libenkine is to provide a minimalistic api to have a game running + lots of additional tweaking functions to modify behaviour of sprites but only if one wants to do so. I will test libenkine on 770 and try to have it working for GP2X aswell.

Thursday, May 04, 2006

rescue set

Just wanted to note that if you experience problems with 770 , don't worry! Rescue Set is on it's way! :-)

Thursday, March 09, 2006

*winter games*


Long time no sea ... I thought to post some photos here to show that I'm still alive and kicking! It's winter finally .... that photo has been taken weeks ago though :) Here's a more fresh one :



Walking in the ice of baltic sea ...

Wednesday, January 18, 2006

gp2x

Yesterday I visited my friend Subjik who is a lucky owner of a gp2x handheld console. Very nice machine for handheld-gaming ... 320x240 is quite enough and the controller is very good. What is the coolest thing for me is that this is actually the first handheld which you can use to play commodore-64 games without pain. The controller feels almost like analog joystick, SID emulation rocks and Frodo emulator menu is nicely designed. In fact I liked the controller more than the one in PSP. Only thing missing is wlan for network gaming :-/

Sunday, January 15, 2006

playing roles part ][

Our journey continued, my elven fighter/thief 'Ermil' managed to raise a level after some successful bashing of a very evil man :) We took a visit to a Duergar lair and managed to escape before getting slaughtered! Also played quite much of 'Donkey Kong Country 3', which is one of the best platformers ever ... especially if you have played DKC2 it will make you laugh and enjoy!

Monday, January 02, 2006

more colors

OK ... I have to admit that this is just too much fun. I also added a poor man's blurring-effect but it does not look nice enough yet ...

Thursday, December 29, 2005

growing trees


I like Darwinia a lot. That's a game you *have* to try if you haven't done it yet! I could not resist to start making own procedural graphics stuff :) The web is full of nice tutorials and explanations how this is done. Recommended to read : new science. Very big fat book but contains useful algorithms and nice pictures.

Thursday, December 22, 2005

<3 OpenGL


Listening to Boards of Canada and playing around with OpenGL ... Mirror-effect is done by simply copying the whole framebuffer as a texture (glCopyTexImage2D) and blitting one quad with a slight drop of blue in it. Flares are nice, I think I'll write some kind of intro/demo when I have more ideas :-) BTW Texture used in cube is from one of my favourite anime movies .. Laputa : Castle in the sky.