[SOLVED?]Slow down - possible reasons other than big objects?

Started by Snake, Wed 12/12/2007 22:47:15

Previous topic - Next topic

Snake

Hello,

I've played plenty of AGS games on this computer and none of them have given a speed problem.

In the non-adventure game that I'm working on that is finished (w00t), besides bug fixing that is, I have it where when you get to the last "level" you start from the beginning again.

Now, on the third time through, only on alternating "levels", there is conciderable slow-down. I don't understand why this can be happening. If it was big animating objects then the slow down would have happened on the first time through. I only have big animating objects in a couple rooms.

My question I guess I'm asking is, what other reasons can cause slow-down? Could it be a "clog" in the scripting kind of thing? I just don't understand. When the last room sends the character to the first, every room is reset at it's original state. Everything is just like it was the first time, but come around to the third time through, the game slows down (like I said, only in alternating rooms).

To be more specific about "alternating rooms": Bridge scene. Dungeon scene. The slow down occurs only in the dungeon scenes.

Thanks in advance if there are any ideas,


--Snake
Grim: "You're making me want to quit smoking... stop it!;)"
miguel: "I second Grim, stop this nonsense! I love my cigarettes!"

Radiant

Large GUIs, particularly translucent ones.

Lots of rawdraws.

And yes, complex scripting can be a serious slowdown, but I doubt anybody really scripts in such a way :)

Gilbert

Was the game played in one non-stop manner to the third time, or had you tried saving the progress (if this feature is provided in your game), terminating it, restarting and loading the game?

How much RAM does your system have? Did other playtesters (if any) have the same problem?

Unless there's something in your game that makes its third time play CPU intensive, my guess is that it's possibly some memory problem, that is, maybe the game continues to eat up more and more memory through time (can be your codes or memory leaks in the engine) so eventually it will use virtual memory to swap to HDD which makes things slow.

Snake

First off: Should I try importing into AGS3? Could that possibly make any difference?

Radiant:
During play, the only GUI that's on is the one that shows how many lives you have left (ie; "6") and it's small. It is translucent, but is small. There is one GUI that is almost fullscreen but is only shown when the player has completed all the levels (before going back to start). The other GUI that is constantly on is the "score" GUI which shows the players' score and shows the title of the game (like old Sierra).

No RawDraws.

The only thing about scripting is this: Every other Dungeon scene has a "boss" in it until the last two "bosses" then they're back-to-back. In these "boss" dungeons the only thing I did was copy and paste code as to not have to write it from scratch again. So after editing them so they are used with those rooms personally, it all works fine.
So maybe having all that code in every other dungeon scene is slowing it down. But the slow down occurs even in dungeons that don't have "bosses" in them. These rooms have very little scripting.

In the dungeon scenes the 8 direction module is used. So maybe there's a possibility that the module is getting bunged up...

In three dungeon scenes there are (forgot about this) like 3 objects that are almost the size of the room and they are being turned on and off by a timer. Is this still running once the room is exited? If so, I can shut them off after leaving and see if it makes a difference.

Gilb0rto:
Yes, the game is played consecutively to the third time around, and if the player chooses (and if they even make it that far) to keep going for a fourth is possible. I'm using a cheat to give myself lives so I can test the game throughout. The game continues until you die, there's no saving.

The RAM size is 512mb with a Celeron CPU 2.40GHz.
No one else has tested yet.


Thank you guys for helping,


--Snake
Grim: "You're making me want to quit smoking... stop it!;)"
miguel: "I second Grim, stop this nonsense! I love my cigarettes!"

Radiant

Quote from: Snake on Thu 13/12/2007 13:29:45
First off: Should I try importing into AGS3? Could that possibly make any difference?
Probably not.

Note the difference between two different kinds of transparency: (1) holes in sprites, and (2) alpha fading effects. The second is a lot slower than the first. I tend to refer to the latter as "translucency" to indicate the difference. A "lives remaining" GUI is likely the former.

Quote
In three dungeon scenes there are (forgot about this) like 3 objects that are almost the size of the room and they are being turned on and off by a timer. Is this still running once the room is exited?
No. Room scripts only run in the room that is presently loaded.


Is it possible that your issue is with memory? AGS can take a lot of memory for sprites, and windows tends to slow down when memory is lacking (plus, several windows-based applications have memory leaks of their own accord).

Snake

QuoteIs it possible that your issue is with memory?
That was my initial thought when I first noticed the slow-down problem.
I'm guessing that is what the problem is.

Wasn't there an option in SETUP or the GENERAL SETTINGS where you could choose how much memory your game uses? I just looked and nothing like that exists (well, not that I found anyway). How about splitting resourses and compressing sprites? Would they do anything for memory?


--Snake
Grim: "You're making me want to quit smoking... stop it!;)"
miguel: "I second Grim, stop this nonsense! I love my cigarettes!"

SSH

Note that older Dual core processors used to handle AGS badly at random. Try going to intel/amd and downloading CPU drivers.
12

Snake

Wow, really, I didn't know that. It makes an awful lot of sence for what just happened then. This time it didn't slow down until the 4th time through and later than it usually starts.

There's one more thing I'm trying and I'll get back. I'll EDIT this when I do.

I was just looking, does AGS have someway to dump the memory and start clean?


--Snake
Grim: "You're making me want to quit smoking... stop it!;)"
miguel: "I second Grim, stop this nonsense! I love my cigarettes!"

Radiant

Quote from: Snake on Thu 13/12/2007 15:27:19
Wasn't there an option in SETUP or the GENERAL SETTINGS where you could choose how much memory your game uses?
Yes, under the 'advanced' button.

QuoteHow about splitting resourses and compressing sprites? Would they do anything for memory?
No. Splitting resources is useful for spreading a game over floppy disks or multiple FTP archives, but has really become pointless over the past few years. Compressing sprites only helps with disk space, since the sprite has to be decompressed in memory.

Snake

It seems that adjusting the RAM size in the game's setup to 100mb did the trick. I went 4 times through with absolutely no slow-down - which is great.

Thanks to all you guys for helping me out := Maybe you'll be able to play it some time soon ;)


--Snake
Grim: "You're making me want to quit smoking... stop it!;)"
miguel: "I second Grim, stop this nonsense! I love my cigarettes!"

Pumaman

If you have a few full-screen sprites in use, if the sprite cache size isn't large enough then it might end up having to unload and re-load the sprites continually which would cause a slowdown -- however, I would expect this to happen the first time round, not the third.

When the game is released, I'd be interested to try it out myself with the smaller sprite cache and see if I can narrow down the cause of the problem.

Snake

Sounds good good, Chris.

I was thinking that as well that if something like that was to slow it down then it should have been slow from the start of the game not 3 or 4 times into it. When I was that far into it and I noticed it for the first time, I had no idea what was happening - it didn't make any sence.


--Snake
Grim: "You're making me want to quit smoking... stop it!;)"
miguel: "I second Grim, stop this nonsense! I love my cigarettes!"

SMF spam blocked by CleanTalk