#152675 - HubbubJub - Wed Mar 19, 2008 10:40 am
Hello, I'm a new DS programmer, and have been working on a game for a few days. However, I'm running into a problem very quickly:
I'm rendering graphics by setting the VRAM indexes manually. However, I'm running into a problem when I try to refresh the screen every frame; it seems as if it can't clear fast enough to keep up with how fast the game is moving, so a section about as big as a single screen starting from 1/5th from the top of the bottom window to 4/5ths up the top window is just solid black. I'm using memset, which to my knowledge is the fastest C function that can reset VRAM to 0 before drawing again. Should I just give up on setting pixels and use sprites instead?
I was thinking of just clearing an "approximate" section of RAM (i.e. only clear things that are moving), but I feel like the approximation involved would take longer than the already fast memset.
EDIT: Another solution might be to lower the framerate, which would be acceptable to me since the thing one is controlling is already zipping very fast. However, I'm not sure how to do that.
I'm rendering graphics by setting the VRAM indexes manually. However, I'm running into a problem when I try to refresh the screen every frame; it seems as if it can't clear fast enough to keep up with how fast the game is moving, so a section about as big as a single screen starting from 1/5th from the top of the bottom window to 4/5ths up the top window is just solid black. I'm using memset, which to my knowledge is the fastest C function that can reset VRAM to 0 before drawing again. Should I just give up on setting pixels and use sprites instead?
I was thinking of just clearing an "approximate" section of RAM (i.e. only clear things that are moving), but I feel like the approximation involved would take longer than the already fast memset.
EDIT: Another solution might be to lower the framerate, which would be acceptable to me since the thing one is controlling is already zipping very fast. However, I'm not sure how to do that.