Jump to content
IGNORED

Robert M's Blog - bBasic - Animating 12 sprites simultaneously


RSS Bot

Recommended Posts

Goals:

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

-> Animate player0 under joy1 control to run left and right.

-> P0 flickers at 30Hz, use the other copy of P0 to give the player a flaming sword.

 

Design:

-> Start from last entry.

-> Reimplement the joy1 reading code from 2 entries ago to use an on..goto statement rather than if-statements.

-> reintegrate the player animation code with the new joy1 code. Only left and right movement are implemented.

-> Add flaming sword sprites for player0.

-> The virtual sprites are stacked vertically at intervals of 10 lines. With flickering at 30Hz there are 2 stacks of 5 sprites.

-> One stack of sprites moves down 10 lines, and then resets to its starting position. The other stack rises 10 lines and then resets.

-> Each sprite has status info (color in this demo, it could include image). When the stacks reset the 10 statuses are rotated, and the illusion of circling objects is created.

 

Implementation:

txt.gif

main005.txt ( 8.07K )

Number of downloads: 0

 

bin.gif

main005.txt.bin ( 4K )

Number of downloads: 0

 

 

Lessons learned:

-> When your code compiles but doesn't run, double check for misspelled labels. (more below)

 

Recommendations for improving bBasic:

-> When I compile with errors, sometimes I get an error message and sometimes I don't. I don't understand why that is. Usually the problem is an undefined label, but whether I see the error seems to be random. When I can't see any message it looks like the code has compiled, but it will not run, and the binary image is incomplete. Is there a DASM switch I can set that will insure I get all possible error messages?

-> For example if I take line 253 of the attached source code and change it to this:

	goto playerStand

When I compile, it appears to succeed, but really it has failed. Why is there no undefined symbol error message printed out by DASM?

 

Up Next:

-> Refining animation of the virtual sprites.

 

http://www.atariage.com/forums/index.php?a...;showentry=3888

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

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