PDA

View Full Version : not enough ram memory??



madcupid
March 3rd, 2007, 21:57
so ive been writing this game for 3 weeks now....since the game deals with a lot of image movements my code is turning out to be too long(to my knowledge,which is almost none). everything was fine until i wrote a few more functions and now the game is really slow. I know it has nothing to do with the functions cause it works perfectly on the computer but on the psp its really slow, almost no speed at all. did i write too much ( about 2,000 lines of code), or do i have to split the code in different files??? what do i do??? thanks

Triv1um
March 4th, 2007, 03:04
are you running at 333?

madcupid
March 4th, 2007, 17:17
i think so cause i never messed around with that. if thats the default then yes, i am. Now, ive tried to learn everything on my own but now i really need help cause i wanna enter that contest too, just to see if i can get at least a 20th place. i dont know how to handle memory yet, can you please help???

madcupid
March 4th, 2007, 17:27
also i have 14 images loaded which comes out to 900kb in total....
i have a total of 7 sounds and music loaded which comes out to about 350kb... and a lot of funtions but as far as blitting the images, i only blit them once or maybe twice...besides that, only lots of lines of code with lots of numbers...anybody?

xg917
March 4th, 2007, 21:31
333 isnt the default speed. default is 222. try setting the cpu speed to 333 and the run your game. hope this helps.

-XG

HomerSp
March 4th, 2007, 21:50
Try to keep only the images required in memory, eg. don't load the image if it's not blitted in the scene.
You might also want to try and optimize the code by for example removing unessecary variables and function calls.

And btw, the maximum amount of image data you can store in memory is 512x512 bytes.

madcupid
March 5th, 2007, 03:29
i tried to set the computer speed to 333 but that didnt work...