bBasic - PF Height Animation
Goals:
-> Try to create an animation of pf graphics using the pfheight kernel option.
-> Gain more experience with bBasic syntax
-> Still no user interation.
Design:
-> Base on the HelloWorld program.
-> Turn on the pfheights kernel option.
-> Create an on...goto statement that maps to a 16 frame circular animation that bounces and stretches "HelloWorld".
-> the code for each frame will set the pfheights.
Implementation:
Lessons learned:
-> RTFM! The syntax for an ON...GOTO does not include commas (I was still thinking of the C64 basic ) Putting commas into an ON...GOTO statement makes for some wild compiler errors.
-> Also, if-statements do not like parenthesis on the condition side.
Recommendations for improving bBasic:
-> The language really needs an ON...GOSUB statement in addition to the ON...GOTO. I was forced to use a clumsy system of gotos to get back to the mainloop of code from the frame setup routines. The resulting code is brittle and harder to read. Plus I can't reuse my frame routines in a different on...goto statement.
Up Next:
-> Exercising the multisprite multiplexing algorithm.
6 Comments
Recommended Comments