Jump to content
Posted Sat Dec 15, 2018 7:04 PM
Posted Sat Dec 15, 2018 7:32 PM
Have you seen this on the bB page:
These also might be useful:
One thing I see repeatedly is people using gosub when they don't need to. The only reason to use gosub is when your program needs to reuse the same code in different places (to save ROM space). As it says on the bB page, "calling a subroutine and then doing a return takes up more machine cycles than doing a straight goto." Jumping to random code with gosubs just for the heck of it wastes precious time (cycles).
Posted Sat Dec 15, 2018 9:34 PM
Posted Sun Dec 16, 2018 6:46 AM
Posted Sun Dec 16, 2018 8:26 AM
One thing that throws me off when reading is when people reference cycles or scan lines. I haven't tested my game on real hardware yet and am not quite sure what I need to look at in the Stella debugger.
Also curious as to some of the best ways to correct for any overages if some should exist.
RT's notes on how to track and monitor overcycling are really good advice.
I was running into overcycle issues on Tyre Trax and my scanlines were going over 262 at certain points.
I found that my biggest problem (mostly due to inexperience) was that I was trying to do too much each frame, so I moved things to happen on different frames and this mostly fixed the problem. I learned that you don't need to do everything at once
I read some good advice in threads here about moving logic or certain pieces of code that aren't needed every single frame to be run for example on alternate frames.
I also found that as I expanded my idea for Tyre Trax and tried new things with bB, my code became better and I stopped doing crazy things (in hindsight ) like defining the whole playfield every frame or defining every sprite on every frame (because...yeah, reasons!...).
Defining the playfield every frame I believe devours cylces like a hungry Trex . I also made other optimisations like easing the number of animation "lanes" on the river from 8 to 3. To be honest, because of the other optimsations, I could probably put them back in now.
Edited by Muddyfunster, Sun Dec 16, 2018 9:54 AM.
Posted Sun Dec 16, 2018 8:38 AM
Posted Sun Dec 16, 2018 8:56 AM
Posted Sun Dec 16, 2018 9:06 AM
0 members, 0 guests, 0 anonymous users