Jump to content
  • entries
    657
  • comments
    2,692
  • views
    898,493

Optimized P0 routines


SpiceWare

905 views

Optimized the player 0 reposition routines for 200+ byte savings. The room generation is back in place to make it easier to test the timing of playfield updates - when the room shifts left/right any playfield timing issues become readily apparent. To aid in reviewing it, the playfield has been given priority over the players:

blogentry-3056-0-08236300-1391130643_thumb.png

 

The X position display was changed to show which of the reposition routines are in use - there are 22 of them, 11 for each player. The routine used will be shown in hexadecimal (0, 1, ..., 8, 9, A). The lower robots (lined up diagonally) use reposition routines 0-8, so we just need to position the upper robots to use routines 9 and A then shift the room left/right to see if the playfield looks correct. Then test again with routines A and 9 (as player 0's A routine is different than player 1's A routine, and likewise for the 9 routines).

blogentry-3056-0-05315400-1391131437_thumb.png

 

 

Controls:

  • RESET = "start game"
  • SELECT = return to "menu" (rainbow screen)
  • Left Joystick - left/right to adjust the X position of player 0 and up/down for player 1. Hold fire to move slower.
  • Right Joystick - change rooms
  • Left Difficulty B = Berzerk Rooms, A = Frenzy Rooms
  • Right Difficulty controls flicker speed of Frenzy Rooms

 

ROM

frantic_20140130.bin

 

Source

Frantic20140130.zip

6 Comments


Recommended Comments

LOL - to bad the Melody boards are in short supply.

 

I think there'd be too much flicker for Robotron. Using NUIZx to create 2 & 3 robots at a time might help, but that would cause problems with the missiles. That said, I might be inspired to give it a whirl if the GB-XC1 ever became available (I'm assuming they'll work on the 2600).

 

Had an idea last night on how to make the sprite flicker routines more efficient. When I rewrite them I'll use the original flicker logic and the new flicker logic, and use a difficulty switch to toggle between the two routines. I'll also turn on the diagnostic display (shows VB and OS time remaining below the score).

Link to comment

Maybe there's a game engine method to reduce flickering. Could you use playfield pixels for the main robot body and sprites for the extremities? That way the majority of the robot body would never flicker.

Link to comment

Possibly, though using PF pixels would impose some major limitations. Instead of 144 sprite positions (assuming a wall surrounds the gaming area) we'd only have 38 positions so movement would be very jerky. Also the colors would be extremely limited, basically all robots would be the same color.

 

While I liked playing the 7800 version with the GB-XC1, I wasn't a big fan of Robotron back in the day so I don't have any inspiration to attempt it. I really liked Asteroids/Deluxe, Berzerk/Frenzy and Warlords which is why I've worked on those. Also Rally X, but Ed's got that under control ;)

Link to comment

Had an idea last night on how to make the sprite flicker routines more efficient. When I rewrite them I'll use the original flicker logic and the new flicker logic, and use a difficulty switch to toggle between the two routines. I'll also turn on the diagnostic display (shows VB and OS time remaining below the score).

 

 

There's still more work to be done, but preliminary results are looking good. I've set up the TV Type switch to select between the old and new sprite flicker routines. With the new routines TIM64T typically has 1-2, and occasionally 3, additional ticks of processing time remaining in Vertical Blank.

 

There is one issue that I'm trying to make a little better. Due to how the original routines worked, the humanoid had a higher priority than the other sprites. This meant if the humanoid and 2 robots were lined up horizontally that only the robots would flicker. The new routines no longer have that feature. I'm seeing instances of 1 robot not flickering while the humanoid and other robot flicker. I don't really like that, though I do have another idea that might make it so all 3 sprites flicker - I would find that to be more acceptable.

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