Today's work

Today I added proper "3D" fixture (shapes) management to our game objects. Up until now, we've had issues with 3D fixtures not being properly removed from the world. When a 3D fixture is created, it's added to a global list of renderables, so if the fixture isn't disposed properly, its 3D model will remain in the world forever and ever and ever. I did a pass over all the level objects and made sure that they're being disposed properly. This solved a couple of problems, like a breakable wall not being removed properly when broken through.

Although we're writing the game in Java which (for good or bad) has a garbage collector, we still need to be very careful with memory allocations because the Box2D binding of LibGDX is actually a native library running in C++. Hence, all the rules of C++ applies, meaning we need to allocate and deallocate things manually most of the time.

Comments

Popular posts from this blog

3D graphics work

Last stretch