I never took the time to really play this game before, can you believe it ?!
errrr, no ?
The game is a little slow @ 500 / 600 MHz IMO, is there a frameskip option we could turn on ?
there is a builtin frameskip code that is working not that bad
This engine requires SDL to build, would notaz improved version be of any use ?
Scalling is done beforehand : on sprite loading. After that, no scalling is done when playing, so notaz SDL wont help much here.
What slowdown the game is music generation. Yep, you read right : the music is generated. From the code, it look like midi on dope.
The first PND I published shuttered : the game regenerated the music every 2seconds. and it took about 0.25sec each time.
So I splitted the job in smaller batches : now the game regenerate its sound buffer every 0.3s for a 0.07s impact. (as a matter of comparaison, AI + game event + redraw code cost about 0.02s every frame). Here are the solutions :
- even lower the batch size, but then you'll get hicups in the sound, not sure you want that
- stop the music generation. pretty sure nobody want that
- optimize the music generation code. but is way over my head. You'll need Exophase or notaz or any other ARM guru around here. dont hold you breath.
This not the real Cave Story engine (which I bet is more optimized). I tryed hard to get access to its source code, but Pixel never replied to my emailsand the few around here that have access to that code either did not replyed to my PM or refused to give me the source.
So that all we have.
Edited by sebt3, 20 June 2011 - 12:29 PM.