gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

DS development > Slowing down after 5 - 10 min {solved without finding cause}

#167241 - Emmanuel - Fri Mar 06, 2009 9:21 pm

I have no idea of the possible causes, but my game is slowing down after 5 to 10 minutes of continuous play...

Anyone has any ideas so I can start looking for the cause? I'm totally clueless....

Ram is not increasing...

EDIT: LOL... I just compiled after coming back home... and now it seems to be working... well, I guess I'll post news about this project soon... this also means, I couldn't find the cause...


Last edited by Emmanuel on Sat Mar 07, 2009 8:39 am; edited 1 time in total

#167242 - Pete_Lockwood - Fri Mar 06, 2009 9:46 pm

If it allocates memory, perhaps a leak or fragmentation?
_________________
It's not an illusion, it just looks like one.

#167243 - elhobbs - Fri Mar 06, 2009 9:54 pm

can you be a little more specific about what you mean by "slowing down"? does it go from 60 fps to 2fps? instantly? gradually? is sound skipping? does it use wifi? is there a place to download the game and test it? how do you know it is slowing down?

#167246 - DiscoStew - Sat Mar 07, 2009 12:06 am

Hard to answer why it is supposedly doing that without a deeper examination....basically seeing what your code is doing. Check your loops. Do they run off of variables that can be changed to increase or decrease looping execution, and are those variables changing?
_________________
DS - It's all about DiscoStew

#167254 - Emmanuel - Sat Mar 07, 2009 7:40 am

LOL... I just compiled after coming back home... and now it seems to be working... well, I guess I'll post news about this project soon... this also means, I couldn't find the cause...

Pete_Lockwood wrote:
If it allocates memory, perhaps a leak or fragmentation?

It does allocate memory... but, after initiation, it just reads until the room is destroyed, when it deletes all the resources, but it happens while the room executes

Quote:
Check your loops. Do they run off of variables that can be changed to increase or decrease looping execution, and are those variables changing?

Um... only ones that do change to change the looping execution are the sprite speed functions, they are called only when the character's state changes... and I've left the ds completely idle and same happens... also, I've tried keeping the state changing, and same happens...

Quote:
can you be a little more specific about what you mean by "slowing down"? does it go from 60 fps to 2fps? instantly? gradually? is sound skipping? does it use wifi? is there a place to download the game and test it? how do you know it is slowing down?

Well, I can't be too precise, but I'd say it goes to 30fps, and it's more like instantly... but looking through my code, I don't see the reason...
The game has the arm7 from libnds, no mods, so it has wifi, but not that I use it, it's just mentioned in the arm7, arm9 has nothing wifi related...
Sound, I don't know, because since I upgraded to the latest libnds, DiscoStew's streamer stopped working, and as of now, I don't use small sounds

As for download: Mediafire, *warning* may contain ads (well, not the file itself)
Version with the slow down: http://www.mediafire.com/file/n11yo2eonog/SSBClash_altair.nds
That version uses the latest libnds

Previous version: http://www.mediafire.com/file/jzojgkemmyj/SSBClash_kratos.nds
This version used the version of like beginnings of february of libnds, also, it has less code, and I left it for like 15 minutes with no frame problems....

Also, this frame problem seems to be cart only, and not happening on no$gba

Currently, I'm checking this new parts I had added... as they seem to be the clue...

I don't think I'll post the code for now... it may be somewhat huge... though at least I believe it's well structured, meaning it's easy to find the things (it's not a huge text file)

#167259 - DiscoStew - Sat Mar 07, 2009 9:33 am

Hah, while I don't have an answer for you, you at least gave me a reason to check back at the devkitPro site. It appears that the toolkit and extras were all updated a couple weeks ago, and I think it was around that time when people began saying that they were having problems with my streamer. I better update.

EDIT:

Double HAH! Updated, compile my latest streamer version (unreleased), and it crashed in No$GBA. Looks like I've got my work cut out for me.
_________________
DS - It's all about DiscoStew