Jump to content
Sign in to follow this  
SlowCoder

Space Invaders - Why does it skip a beat?

Recommended Posts

Throughout the game, the invaders march at a beat ... except when there are exactly 4 of them on the screen. Why do they skip a beat when there are 4? Is this a technical thing, like timing, or is it an intentional thing?

Share this post


Link to post
Share on other sites

Routine LF437:

 

Table LFFC8 holds the "# invaders left" comparison values. The Y index is increased in value as the comparison values are checked, one-by-one. When there are only 4 imvaders left, the Y index is equal to 5. That index is then used to read from table LFFD4. Those values are used as a framecounter comparison. Because the 5th value ($0B...i.e. %1011) in that table is not symmetrical as far as the bitpattern is concerned, the invaders are delayed an uneven number of frames.

 

So the answer is a little bit of both, really. Technical because of how the AND opcode functions with non-symetrical bitpatterns...by choice because the invaders would be moving at the previous or next speed otherwise.

  • Like 2

Share this post


Link to post
Share on other sites

Routine LF437:

 

Table LFFC8 holds the "# invaders left" comparison values. The Y index is increased in value as the comparison values are checked, one-by-one. When there are only 4 imvaders left, the Y index is equal to 5. That index is then used to read from table LFFD4. Those values are used as a framecounter comparison. Because the 5th value ($0B...i.e. %1011) in that table is not symmetrical as far as the bitpattern is concerned, the invaders are delayed an uneven number of frames.

 

So the answer is a little bit of both, really. Technical because of how the AND opcode functions with non-symetrical bitpatterns...by choice because the invaders would be moving at the previous or next speed otherwise.

 

I'm shamefully too ignorant to understand most of that, but I sort of put together a layman's crude interpretation of what is clearly beyond my intellect, and even then, I'm still impressed. In short, damn, that's a specific and in-depth answer. :thumbsup:

Share this post


Link to post
Share on other sites

Suffice it to say that there is not an "even" delay that falls between those used for 5+ and 3 invaders. There could have been, if the routine at LF437 was not so simplistic. Toy around with the 8 values in each table (LFFC8, LFFD4) if you want.

Edited by Nukey Shay

Share this post


Link to post
Share on other sites

I love Nukey’s technical answers! Sadly enough I do understand MOST of his technical answers with me being a CE ;)

 

 

I always thought it was a timing issue myself, and it's actually a good thing cos when they are like that is when I make my move and destroy the last 4 w/o getting hit and moving on to the next level.

Share this post


Link to post
Share on other sites
I love Nukey’s technical answers! Sadly enough I do understand MOST of his technical answers with me being a CE ;)

What is a CE? Cephalopod Enthusiast? Cabalistic Engraver? Coquettish Ecdysiast?

  • Like 3

Share this post


Link to post
Share on other sites

Computer Engineer :)

 

I love Nukey’s technical answers! Sadly enough I do understand MOST of his technical answers with me being a CE ;)

What is a CE? Cephalopod Enthusiast? Cabalistic Engraver? Coquettish Ecdysiast?

Share this post


Link to post
Share on other sites
I love Nukey's technical answers! Sadly enough I do understand MOST of his technical answers with me being a CE ;)

What is a CE? Cephalopod Enthusiast? Cabalistic Engraver? Coquettish Ecdysiast?

 

:rolling:

Share this post


Link to post
Share on other sites

I love Nukey's technical answers! Sadly enough I do understand MOST of his technical answers with me being a CE ;)

 

 

I always thought it was a timing issue myself, and it's actually a good thing cos when they are like that is when I make my move and destroy the last 4 w/o getting hit and moving on to the next level.

 

I figured it was timing also. Having been a programmer since I was about 10, I understood it too. I just don't have the time or gumption any more to try to figure it out for myself.

Share this post


Link to post
Share on other sites

Slightly off topic, but can any of you technical wizards explain to me why coin-op Space Invaders has its own weird timing issue? When you're down to the last invader, he moves right to left faster than he moves left to right. I always assumed it was something in the design of the clock cycles because it even happens in MAME and other emulated versions of the game.

 

Any ideas?

Share this post


Link to post
Share on other sites

That is how the actual arcade game handles it (so MAME is emulating it correctly, at least). Why it's there...who knows? Somebody at MAMEworld ought to know.

Share this post


Link to post
Share on other sites

It's deliberate, to disorient the player.

 

There were lots of little strategies like that in old games - even the terrain colour change in Scramble levels was a subtle way of putting the player off.

Share this post


Link to post
Share on other sites

I would guess that it's a carry status glitch feature (uncorrected...as you say, to disorient the player) :) That would easily explain why it happens in one direction and not the other.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   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...
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...