Jump to content

Ra1ny Tapestry

Members
  • Posts

    1
  • Joined

  • Last visited

Everything posted by Ra1ny Tapestry

  1. Hi I'm new to this forum, I was following a guide on programming for the Atari 2600, and when the guide introduced horizontal positioning, he used an AND #%01111111 instruction to wrap the player around to the other side, but then he silently abandoned it and moved on to just using comparisons to check whether the player is at #0 or #160. I thought this was an amazing trick, since an AND only uses 2 cycles, but every time I try forcing myself to include AND #%01111111 in my positioning code, it actually winds up using more space and cycles than my normal implementation. I'm still scratching my head wondering why it's inefficient, because when I first saw the first method I went "oh, so that's why you can't move to the edge in a lot of Atari games. It's more efficient to just bound them to 127," so I can't help but be convinced there's some way I just don't know about. Here are a few examples of what I'm talking about: Combat (Walls seem to bound players to 127 positions) Space Invaders (Movement doesn't seem to be limited by design) These are just to illustrate what I'm talking about. I don't have any of the ROMs, so I can't say for certain any of them are bound to 127 positions. Also, in case there is no efficiency trick, I'd also appreciate explanations why these and a lot of other games limit player movement.
×
×
  • Create New...