Subject: Re: [stella] Object handler organisation From: Thomas Jentzsch <tjentzsch@xxxxxx> Date: Thu, 07 Nov 2002 14:36:28 +0100 |
Manuel wrote: >Once again more coding advice is needed. Maybe instead of looping around the subroutines, separate loops inside would reduce the overhead a bit. Or no subroutines at all, and just a big mess of code, where you check before each block (now subroutine) if it should be excecuted or not. This can be done by comparing the IDs directly or by using a table: LDX #MAXOBJECTS-1 .loop: LDY sprtsizetype,X LDA BlockTable,Y AND #BLOCKMASK1 BEQ .skipBlock1 ... ; code for Block1 (e.g. GeneralMovement) .skipBlock1: ... .skipBlock2: ... DEX BPL .loop ; well, this will probably become a JMP :-) This is how Thrust does it, but there is no general optimal solution. If you are still running out of CPU time, you should try to schedule the jobs. E.g. you could call some subroutines only in odd and other only in even frames. This is what I'm doing (though a bit more complicated) in Thrust too. ;-) Have fun! Thomas ---------------------------------------------------------------------------------------------- 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 -> |
---|---|---|
[stella] Object handler organisatio, Manuel Polik | Thread | Re: [stella] Object handler organis, Christopher Tumber |
[stella] Object handler organisatio, Manuel Polik | Date | Re: [stella] Playfield Basics (newb, Andrew Davie |
Month |