Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Morgana retro Dungeon Crawler (uses Tilengine)
#36
Hi there!

Sorry for the long delay in updates. I had periods of inactivity and rebooted the source code development, porting it from C to C++.

Port is going well, except for a very insidious bug.

I have no memory leaks, because I switched all raw pointers yo shared_ptr's. I analyzed the code with CppCheck and corrected some issues. I will do more g++ checks such as the -Weffc++ option and others.

But let me explain, maybe you have some idea. Everything works fine, you start walking and navigating the labyrinth, all works fine for a while but it progressively slows down. You walk slower and slower, and when you bump on a wall the animation that pops up is each time slower.

This continues until the game crashes.

Maybe I spawn Tilengine sprites somehow and they draw on top of each other unnoticed. Hmn.. There's not a function of Tilengine to check the number of sprites used? GetNextAvailable can return low values, its not a substitute for getting the total of sprites used by the engine in a given moment.

It is an accumulative error, because if I start the player at the other end of the labyrinth, where it crashed the last time then everything works fine until you walk too much. For solving this problem ideally I think I could print each frame: "number of sprites used: xxx" and check how it accumulates over time..

Hmn.. I think I will have to dissect the code carefully to see where the drawing function leaks or bleeds and what causes this accumulative problem. What do you think megamarc from your perspective? If an animation works fine in your engine and after a while it plays slow, what could be stressing the engine? Just the number of sprites used, right?
Reply


Messages In This Thread
WOW!!! - by PerspexSphinx - 11-19-2019, 07:39 AM
Morgana game (uses Tilengine) - by JaumeAlcazo - 01-02-2020, 04:23 AM
RE: Morgana retro Dungeon Crawler (uses Tilengine) - by JaumeAlcazo - 10-04-2021, 05:45 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)