Hi!
I'd like to discuss ways to know when is the right time to change stuff in the screen mid-frame. I'd like to know what you guys do...
I want to ask you a couple of things about the methods I know:
Sprite 0 hit:
1.does it work ok if the sprite has low priority?
2.if the left 8 pixels of the bg are disabled, does it work (I gess not, because of the "nothing to colide with" thing)?
3.it can be used only once in a frame? can't I change the position of the sprite and wait for another hit?
4.(not actually sprite 0)Bregalad said he intented to do it by putting 9 sprites in the desired scanline, and since the ppu warns us of this every scanline, it can be reused. The problem is if you accidentaly put 9 sprites in a scanline...
Timed code:
1.doesn't it eat all your time? Since you can't do anything else but wait for the time to do stuff. It seems good for demos, but useless for actual games since there would be no time left for anything else...
2.one scanline does not last an integer number of cycles, how do you compensate that?
3.what math do you do when calculating cycles and all?
4.when do you start counting? as soon as vblank ends?(can you detect the end of a vblank? when bit 7 of $2002 turns 0 means you just left vblank?)
I have no intention to use mappers with scanline counting capabilities for now. That's why I'm researching to see how far I can get using what the NES gives us.
I'm betting on the Sprite options, with a little help of timed code. With sprites I have time left to do other stuff, like physics calculations and all sorts of things games need. I just have to make sure my code does not go beyond the point I want to do the "magical" stuff. But then, I could do it like this: if the "point" is before the middle of the screen, wait for it and then do the other stuff, or, if it is after the middle, do the stuff and then wait. I cut my time in half like this, but at least I get some time!
Answers and opinions appreciated! =)
Thank you in advance!
Tokumaru
I'd like to discuss ways to know when is the right time to change stuff in the screen mid-frame. I'd like to know what you guys do...
I want to ask you a couple of things about the methods I know:
Sprite 0 hit:
1.does it work ok if the sprite has low priority?
2.if the left 8 pixels of the bg are disabled, does it work (I gess not, because of the "nothing to colide with" thing)?
3.it can be used only once in a frame? can't I change the position of the sprite and wait for another hit?
4.(not actually sprite 0)Bregalad said he intented to do it by putting 9 sprites in the desired scanline, and since the ppu warns us of this every scanline, it can be reused. The problem is if you accidentaly put 9 sprites in a scanline...
Timed code:
1.doesn't it eat all your time? Since you can't do anything else but wait for the time to do stuff. It seems good for demos, but useless for actual games since there would be no time left for anything else...
2.one scanline does not last an integer number of cycles, how do you compensate that?
3.what math do you do when calculating cycles and all?
4.when do you start counting? as soon as vblank ends?(can you detect the end of a vblank? when bit 7 of $2002 turns 0 means you just left vblank?)
I have no intention to use mappers with scanline counting capabilities for now. That's why I'm researching to see how far I can get using what the NES gives us.
I'm betting on the Sprite options, with a little help of timed code. With sprites I have time left to do other stuff, like physics calculations and all sorts of things games need. I just have to make sure my code does not go beyond the point I want to do the "magical" stuff. But then, I could do it like this: if the "point" is before the middle of the screen, wait for it and then do the other stuff, or, if it is after the middle, do the stuff and then wait. I cut my time in half like this, but at least I get some time!
Answers and opinions appreciated! =)
Thank you in advance!
Tokumaru