Game Development Community

Game Slow Down

by Sventhors · in Torque Game Engine · 06/18/2006 (11:45 pm) · 1 replies

Cheers, I am designing a game and I have coming close to the complete design of the world/environment and right know I am working on the game play.

Here are some early pics from the game. 6 months old(sorry) and I have a lot more details to it.
http://www.ripongame.com/

The world runs fine for 20 minutes and then it starts to major slow down and slows down dracistlly. When I add some AI to it , it sharply slows down. Also, it crashes around 5 minutes when I add AI to it.

I have kept very low poly count for each item. Is there sorten amount poly count I''m alllowed for each level or any suggestions. Or is there sorten amonut objects that is allowed in the game. Is there general rule for game design for this. is there way to check of the total amount poly count in the world and is there way to check how it works smoothly.

Can anyone give me advice how to make run more smoothly and how to check for crashes and help it not to crash. I have look at the dump file and does not give any info on the crashes. Is there also a way how to debug this and to see when it goes slow.

I have long way to go for this game.

Thanks:)

#1
06/19/2006 (11:02 am)
The issue you described sounds like a memory leak, which slowly eats up your memory until you need to use a very slow swap file. If I were you, I would look through any new code you added to the engine, and look for pointers which could be referencing null memory, or arrays of objects which havnt been deleted.

A good way to start this, is to run the engine in debug mode, and trigger the crash you mentioned from your AI. Examine your variables and your call stack, and it should give you a pretty good idea of whats going wrong, and you can fix it up.

If that doesn't lead you to all of your memory leaks, you can use this guide: www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=6552

That should list out a bunch of info on whats leaking in your program.

Memory leaks are the programmer's bane, as they are so hard to track down. The best way to avoid them is to make sure you deal with your pointers and arrays accordingly, and slow down to analyze what could possibly happen with your code.

-Griff