Game Engine 184MB?! Please help

WhackojackWhackojack 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)

Comments

  • CatGoneCrazyCatGoneCrazy Member, PRO Posts: 90
    Hmmm... sounds like it could be. Check what each of these 42 actors is referencing. Things may have changed recently, but I believe it used to be the case that actors *referenced* by another actor are called into memory, even if they're not being used on the screen. So if your 42 actors are all referencing large separate actors, that might be the source of your problem.

    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.
  • WhackojackWhackojack Member, PRO Posts: 20
    edited July 2013
    Okay, going to set rules to limit the referencing to see if that helps.

    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 :\
Sign In or Register to comment.