Thread: Main Discussion
View Single Post
  #33  
Old 2008-12-17, 11:07
David's Avatar
David David is offline
Magic Ball Master
 
Join Date: Dec 2008
Location: Barcelona
Posts: 1,683
Quote:
Originally Posted by RobG View Post
I'm glad you like what I've done so far! Thanks!

I think the delay on the camera really add a nice feel, try it in yours and see how it goes!

I load every possible unique tile in the level into a large "tile sheet" texture, then I build the entire level, with every tile as 2 triangles, in one big vertex buffer (Not sure what its called in OpenGL). Then I can draw the entire level in one call. Of course I could split up the buffer into smaller parts, but it didnt affect the performance.

When I make each tile for the vertex buffer I position them differently on the Z axis depending on their "depth" in the level. Then the character is actually rendered offscreen into a texture that gets rendered with it's own Z Depth so it can interact with the tiles. So I don't need to do any manual sorting.

The best method I have found so far is actually to render each tile as a 6 triangle "box". Using this method you can add really cool lighting effects/shadows: http://www.youtube.com/watch?v=5RVmKOtA3Mk - this level was rendered only using LBA2 tiles and this technique (Also a Twinsen from LBA1).



There is documentation on the LBA character file format, you should look at getting that into your engine too.

So where do you plan on taking all of this, and what are you going to do with it?
I've just watched the vids with shadows, it's amazing ! How you do that ? How can I add shadows to my engine ?
I think the method you exposed for depth sorting is the equivalent to display list in opengl.
Actually that was my first method. Instead of displaying 3 polygons (or 6 for shadowing ??) for each bricks I was drawing the whole brick in one time as a simple rectangle at a certain depth, getting the texture from a unic big texture like you do.
The goal was to fill the depth buffer bricks by bricks. Display list are for static scenes only but it works great ... until a certain number of bricks. Combined with the character display I couldn't get the 60 fps or even 30 fps on every 3D cards. As I plan to display more than one character, I had to find another method, the alpha channel. Works great for complex scene with a maximum of 256 different depths. The bad point is I can't perform any shadowing...
Yes I've seen the work for getting original meshes from LBA but I prefer to work with new meshes like the one made by Jasiek. It has to be animated and textured, and also it has to be compatible with blender. Jasiek didn't answered to the mail I sent to him via this forum, dont know if he actually received it.
By now my plans are to import home made meshes and not comercial ones, correcting black lines bug, adding chasing camera, add collision detection. That's a lot !
__________________
Little Script Adventure[thread][download]
Reply With Quote