Jump to content
  • entries
    657
  • comments
    2,698
  • views
    899,405

release candidate 1


SpiceWare

873 views

I believe my last two issues have been resolved.

 

1) On the collision problem, the original collision logic for wrap-around sprites was handled this way:

 hitsomething = Collision(item, x, y)
 if (hitsomething == 0 && x < 18)  // 18 because the double-wide asteroids hmove left & right
   hitsomething = Collision(item, x+160,y)
 if (hitsomething)
    handle collision
...

 

The +160 code was in place for the shots, but not the ship or UFO which is why they had the collision problem on the wrap-around objects. I ended up rewriting Collision so the wraparound logic was inside of it, which meant it wouldn't run the collision loop over all 51 objects twice (51 is how many sprites my virtual sprite driver can handle). The new method should run faster than before(plus it handles shots, ship and UFO) as the logic to call it is now:

  if (Collision(item,x,y))
   handle collision

 

 

2) On the screen rolling and jitter problem I moved a couple functions from Vertical Blank to Overscan which appears to have solved the problem. Tonight I also took a look at the sprite driver and saw a way to make the DataStream() function more efficient. It's called within a loop a number of times, which increases rapidly the more flicker there is onscreen. It was originally 2 functions, DataStream0() and DataStream1() that I'd merged into 1 to save ROM space. DataStream() is called like this:

 

  if (!DataStream(0,i)) // can sprite be displayed via player 0?
   if (!DataStream(1,i))  // nope, can sprite be displayed via player 1?
     if (next_oldest_age < age) next_oldest_age = age; // nope, track the age for flicker

 

The first third of DataStream does some prep work that calculates exactly the same values when the function is run for both player 0 and player 1. What used to look like this:

DataStream()
{ 
 various variables;

 prep the variables;

 return false if we can't display sprite using player

 prep player datastreams
}

 

Now looks like this:

 

DataStream()
{ 
 static variables;
 other work variables;

 if we're checking on player 0
    then prep the static variables;

 return false if we can't display sprite using player

 prep player datastreams
}

 

 

Release Candidate ROMs

spacerocks20121002_NTSC.bin

spacerocks20121002_PAL.bin

 

 

Note: if you have a Harmony, please run the Stress Test ROM on your real Atari so we can make sure the screen jitter and rolling problem has been resolved.

spacerocks20121002_STRESS_TEST.bin

 

Source

spacerocks20121002.zip

2 Comments


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