Update 76

A lot of bug fixing this week and optimization, I have replaced the unordered_maps with less than 35 elements with vectors of pairs.

Q: Where did you find the number of 35?
A: Should you be using something instead of what you should use instead?

This change introduced some new bugs with the lifetime of some objects, and invalid iterators, but overall the speed and the memory footprint is improved.

The level progress well, but there is still a lot of work before it’s complete but mostly the game is at the end of its development. Let’s compare the number of lines of code of the current project vs the old one.

Some of the libraries in C are included in the project such as NFont, SDL_FontCache, theoraplay, and the code generated with glLoadGen. The c++ code has 17269 lines instead of 7360 lines at the time I was working on the big level 4, and I have added a lot of content since then. The functionalities are in C++ and the content is in XML, as you can see now 5476 lines instead of 460 lines. The project becoming more and more complex and “heavy” the debugging is becoming more difficult, but hopefully, I have also improved my skills since the beginning of the game.

 

Leave a Reply

Your email address will not be published. Required fields are marked *