Jump to content
  • entries
    657
  • comments
    2,693
  • views
    899,050

You spin me round


SpiceWare

719 views

  • animation in place
  • 2 "styles" for each asteroid size.
    • 2 distinct styles for larger asteroids, but only 2 frames1 of animation for each
    • small & medium styles are just mirror images, but have 4 frames of animation each

    [*]each asteroid has an independent rotation direction and speed.

    [*]Animated saucer

    [*]new UFO after 7000 points. At the moment it's just a smaller target that shoots more frequently. There's no targeting AI yet for either enemy.

    [*]Fixed the ship invisible bug2

1 don't worry, frame counts will increase when Nathan sends in the new graphics. What's in there now is enough for me to test the routines :D

 

2 the "invisible sprite" bug can occur if I forget to set the "Age" value when reusing a sprite. The age value says how many frames ago was the sprite last visible (flicker logic). If the sprite was shown this frame, the age is 0, if it was last shown the prior frame it's age is 1 (and so on). At the start of the flicker routine, it ages every sprite by 1. It also remembers the highest age that wasn't displayed from the prior run. It uses that highest age to try to show the sprites with that age first, then tries for all sprites for the next lowest age, until it gets down to age 0. The "remembers" is what causes the problem - if the ship had an age of 3 because of a lot of flicker, but when it respawns the asteroids have moved around so that the current highest age is just 2, then it never tries to show sprites at age 3. Each frame the age increases, so it goes 4, 5, ... 255. After 255 it wraps back to 0 and will show up. If it starts at 3 it'll take 253 frames to wrap back to 0, or 253/60 = 4.2 seconds.

 

Rocks in various rotations

blogentry-3056-0-78832300-1336265107_thumb.png

 

ROMs

spacerocks20120505_NTSC.bin

spacerocks20120505_PAL.bin

 

Source

spacerocks20120505.zip

1 Comment


Recommended Comments

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...