Jump to content
  • entries
    34
  • comments
    88
  • views
    26,199

bBasic - Added 10 animated bats.


Robert M

434 views

Goals:

-> Further animate all 10 virtual sprites simultaneously to create circulating arial swarm.

-> Save on RAM needed for 10 enemies by mathematically generating their positions from counters.

-> Still animate player0 under joy1 control to run left and right, shoot and shield from last entry.

 

Design:

-> Start from last entry.

-> Implement a single X position counter that counts down to zero from 229 and then repeats.

-> The existing Ycount from 9 to 0 is kept.

-> The 10 enemy sprites are like beads on a string separated by multiples of 23 pixels horizontally and 10 pixels vertically in motion.

-> The position of a sprite is found mathematically from the main X and Y counters.

-> The X position offset from the base X counter must jump along with the enemy status (color) whenever the Y count resets.

 

Implementation:

main012.txt - Sorry the comments are less than stellar at this time.

main012.txt.bin

 

Lessons learned:

-> There is a bug in version 1.0 of bBasic with data statements. If a tab precedes the data

keyword, the compilation will not include any bytes defined on that line. You must

precede a data statement with only spaces. Batari has fixed this bug for the next release.

-> The language is proving to be much more efficient than I expected. I am definitely pleased

that I have added it to my programming tools. :D

 

Recommendations for improving bBasic:

-> None

 

Up Next:

->Enemy shots, and maybe some collision detection.

0 Comments


Recommended Comments

There are no comments to display.

Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...