Jump to content
  • entries
    657
  • comments
    2,692
  • views
    897,854

Engage


SpiceWare

1,617 views

  • push up for thrust - these are preliminary routines, so yes, they need some fine tuning
  • pull back for hyperspace - you'll vanish for a second and reappear elsewhere
  • fixed a bug that could cause a piece of a just-split asteroid to be invisible for 4.2 seconds - and yes, it could still collide with you
  • noticed that the ball was black - it's now white and the shots show up much better than before
  • redid the movement tables to compensate for the pixel size.

For the movement tables, I started off with the knowledge that an 800x600 display uses square pixels on a 4:3 display.

(800 / 600) * (3 / 4) = 1

 

The Atari's display is 160x200

(160 / 200) * (3 / 4) = 0.6

 

Based on that, I multiplied all the X table values by 0.6.

 

 

I've noticed an occasional sprite glitch where an asteroid change it's X position for a frame or two and then jump right back to where it's supposed to be. I've only noticed it in the top-left corner of the screen - let me know if you notice it happening anywhere else as that'll help me to narrow down where the bug is.

 

ROM

spacerocks20120424.bin

 

Source

spacerocks20120424.zip

5 Comments


Recommended Comments

I'm not sure about the ship wrapping behavior. At the moment it is possible to hide at the screen edges. In Star Castle, I draw the ship sprite twice at the top and bottom edges so that it is never completely hidden. However, in the Asteroids arcade version it looks like the ship just jumps completely when it reaches the screen edge.

 

Chris

Link to comment

While you can "hide" in the edge, off-screen collisions are still detected, though it's not 100% yet. The same issue exists with collisions on the left edge - if your shot(or ship) is within the first 17* pixels and hits an astroid that's wrapped left/right, the hit won't register. I know what to do to fix it, just haven't implemented it yet - basically for the shots with X < 18 then do 2 collision tests, once at actual X, the other using X+160. The top/bottom would be the same, but it would be for Y < 0 then test actual Y and Y+213, as well as if Y >= 185 then test for actual Y and Y-213.

 

Yeah, I didn't like the "jump" in the arcade version, which is why I did fully off then back on. The off-screen zone is sized for the largest asteroid to go fully off. The left/right has an 8 pixel zone, due to the HMOVE bars, which makes the small and medium asteroid go fully off screen before wrapping to the other side. I've debated doing on-the-fly sprite masking to make the left/right zone large enough to mask the large asteroids, haven't decided one way or the other on it yet.

 

Looks like the 2600 version of asteroids draws the ship sprite twice as well - and it does the same for asteroids that cross the top/bottom edge. That might be an idea, I'll think on it. For the 2600 version it's easy to do as the sprites are nicely spaced so only 2 asteroids would ever wrap at the same time. For mine lots of them could be wrapped and the logic to figure that out would be inside a nested loop which might cause performance problems in the spite flicker routines.

 

Yeah, I'm really liking 4 shots as well :D

 

* 17 because the large asteroid sprite is 18 pixels wide due to HMOVE shifts

Link to comment

The Atari 160 res pixel aspect ratio is 12:7.

 

Square pixel NTSC (interlaced) has a pixel clock of 12.272727MHz or 780 pixels per line (640 active). For non-interlaced (like the Atari) the square pixel clock would be 6.136364MHz or 390 pixels per line. The Atari pixel clock is the same as colorburst, which is 3.579545MHz or 227.5 pixels per line (actually 228 but the Atari line is longer than a standard TV line). 390:227.5 = 780:455 = 12:7

Link to comment
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...