Game Engine 184MB?! Please help
Whackojack
Member, PRO Posts: 20
Hi, I've been running into an issue lately. My game has recently started slowing down a lot and I notice my game engine was running at 184MB. The game is a unit spawner game (similar to Legendary Wars) and I recently changed the game to, instead of spawning units, recycling units.
There are 7 units on each side and I have 3 of each actor present. There is a maximum of 3 units of a single type on the field at once and 3 instances of each actor. So 7 units on each side, 3 of each, 42 present at once. As a result I'm able to constrain the attack boxes to the characters making the attack ranges work much more effectively than the previous system I had in place. However, this means I have a hitbox for each actor, so that's an additional 42 actors.
^Could this be causing my Game Engine craziness?^ (The actors are all still linked to the prototype)
There are 7 units on each side and I have 3 of each actor present. There is a maximum of 3 units of a single type on the field at once and 3 instances of each actor. So 7 units on each side, 3 of each, 42 present at once. As a result I'm able to constrain the attack boxes to the characters making the attack ranges work much more effectively than the previous system I had in place. However, this means I have a hitbox for each actor, so that's an additional 42 actors.
^Could this be causing my Game Engine craziness?^ (The actors are all still linked to the prototype)
Comments
Also, check the size of your actors. Apparently, if you go one pixel over, say, 512px x 512px, that single extra pixel requires double the memory. So I believe, anyway. I'm not an expert but I had similar memory problems with Squeak's Dreams. Fixed now.
Also, I tested it without the actors/references being on screen and it went down to 21MB.
EDIT: Added rules so that referencing wasn't a constant, did not work. Still at 178MB. Going to try spawning and see if that works