Subject: RE: [stella] Generic kernal or just build a game? From: stella@xxxxxxxxxxxxxxx Date: Mon, 15 Mar 2004 08:05:57 -0600 |
> Okay. Just thought I would probably be able to help you fixing your > problems. The engine I wrote for Star Fire does almost what you > said, so I > have some experience in programming this kind of things :) Well, can I still bounce some questions off of you? :) What's the best way to check for vertical bounds in scanline code? Here's how I did it: sec sbc enY,x ; Subtract enemy x's vertpos from current row bcs .noEnemy ; Enemy is lower than current row adc #enHeight<<1 ; Add 2x (line skip) enemy height bcc .noEnemy ; Enemy is higher than current row lsr ; a/2 = sprite offset But now I'm considering storing the 2's complement for the enemy position, thinking this will speed up code by immediately returning a sprite offset value, like so: clc adc enY,x bcc .noEnemy ; Enemy is below current row The accumulator would contain the sprite offset right then and there... but if the enemy is more than enHeight pixels ABOVE the current row... DRAT! Maybe set a flag for that enemy to skip the check once it's been drawn. I just need to learn how to offload stuff to my vblank routine. I often find myself shortening code in one part of my scanline routine only to add code to another part of the scanline. Plus, I haven't even thought about smart flicker. Well, I've *thought* about it, but don't know where to start. That's why I might just start with dumb flicker, which would be a piece of cake (and would require much less optimized code). -Lee ---------------------------------------------------------------------------------------------- Archives (includes files) at http://www.biglist.com/lists/stella/archives/ Unsub & more at http://www.biglist.com/lists/stella/
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [stella] Generic kernal or just, Manuel Rotschkar | Thread | Re: [stella] Generic kernal or just, Thomas Jentzsch |
time running out WAS: [stella] AARG, KirkIsrael | Date | Aw: time running out WAS: [stella] , cybergoth |
Month |