Jump to content

Photo

Wall collisions in Adventure


4 replies to this topic

#1 gauauu OFFLINE  

gauauu

    Moonsweeper

  • 304 posts
  • Location:Illinois

Posted Tue Oct 27, 2015 1:06 PM

Does anyone know exactly how the wall collisions were handled in Adventure?  

 

The way the ball (player) squashes against the walls (and missiles for the weird black walls, if I remember correctly?) makes it look like it's checking hardware collisions. But the fact that the walls aren't "sticky" means that Warren did something smarter than just the naive "reset the position if there's a collision" method. 

 

As best I can tell, from staring at the disassembly and stepping through frames, he was definitely doing hardware collision detection. It looks like maybe he resets the X position separately from resetting the Y position, on different frames (checking collisions each time). But if that's the case, I can't figure out how your movement doesn't end up going more slowly when you are dragging along a wall (if it wastes a frame trying to reset position in one dimension).

 

Thanks!



#2 SpiceWare ONLINE  

SpiceWare

    Quadrunner

  • 11,325 posts
  • Medieval Mayhem
  • Location:Planet Houston

Posted Tue Oct 27, 2015 1:19 PM

Check the source at MiniDig. Look for register CXBLPF



#3 Random Terrain OFFLINE  

Random Terrain

    Visual batari Basic User

  • 28,088 posts
  • Controlled Randomness
    Replay Value
    Nonlinear
  • Location:North Carolina (USA)

Posted Tue Oct 27, 2015 1:38 PM

I like it when a game does something like this with no sticking or bouncing:

 

randomterrain.com/atari-2600-memories-batari-basic-commands.html#sprite_collision_example

 

Attached File  ex_sprite_with_collision_only.bin   4KB   89 downloads



#4 gauauu OFFLINE  

gauauu

    Moonsweeper

  • Topic Starter
  • 304 posts
  • Location:Illinois

Posted Tue Oct 27, 2015 2:21 PM

Ah, the part I missed is that he does it differently in different frames. Like I suspected, he checks X-only direction one frame, and Y-only direction in a different frame.



#5 Jinroh OFFLINE  

Jinroh

    Dragonstomper

  • 574 posts
  • Catgirl Maid Lover

Posted Tue Oct 27, 2015 3:46 PM

Ah, the part I missed is that he does it differently in different frames. Like I suspected, he checks X-only direction one frame, and Y-only direction in a different frame.

 

I did a similar thing with my Carrot Kingdom game it works well for splitting up gravity and horizontal collisions as well. :3






0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users