Cleanup more or less done, ready to start shading

Published May 03, 2010
Advertisement
So last week was cleanup week. At crunch-time I noticed some issues that I listed in the report of delivery, and I went through that list and did some changes.

I didn't get time for all of them, because RL got in the way some.

1) I ended up implementing a lib3ds wrapper. Rewriting the ms3d loader into a proper vbo format took too much time to figure out for me. lib3ds does support animations as well, so will look into how this works later, but for now the animated models will stay ms3d and have faulty texcoords + normals, while all static models will be implemented through the 3ds loader with correct normals and texcoords. Hopefully I'll have time to fix the last remaining issues (like get the monesters converted to 3ds with animations)

2) I've optimized the VBO usage and loading of data into memory in general. Now I only use 2 vbos for each renderInfo type, while earlier I used 5 vbos for each node with renderInfo. This is a huge optimization that affects both loading time and performance! I've also added history to the texture loader, mesh loaders and renderInfo factory, so that only one instance of the same data is loaded into memory, and then reused. So several nodes can share the same data. This is ok, because from now on I should not change vertex data or nothing on the C++ side anyway, this should happen in shaders.

3) I added reservation on the std::vector lists for loading where I could, which should improve loading times a bit.

4) I didn't get time to add in the FSM part yet. But this is something I have to do in order to bind together systems without unnecessary coupling. It can wait though, as this is mostly related to gameplay logic, and not the shader pipeline implementation / rendering.

5) This is done, like I said in #2.

6) I will rewrite for Glew usage now that I start the shader pipeline implementation!

7) I've thought a lot about how the object relationships are set up right now, and maybe this is not so bad after all. Seperating objects like I have gives a lot of flexibility. For the tower especially, since I have 3 modules which are seperated into objects and loaded by a common Tower object. This allows me to set seperate components on each module, so that the base of the tower doesn't need the same functionality as the gun or head.

8) This hack I haven't had time to fix yet, but I'll throw in the fix before I start the shader implementation today.

At any rate, 3ds loading works now, and I also have translucent objects working. Here's an example of a test I ran. On this project I want the terrain to get a boost in detail, including clutter objects like stones, bushes and trees.

0 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement