Jump to content
Preppie

Space Invaders - WIP

Recommended Posts

I read a thread a while back about Space Invaders and was surprised that the Atari didn't really have a good conversion.  Ataris attempts prioritized colour over accuracy, and the closest to a proper conversion was XXLs Apple Invaders which suffers from the stripes that are common on direct Apple ports along with a couple of other minor niggles.  So I decided to give it a shot :)

 

This is my first ever attempt at a game in assembler, so the code isn't the greatest but I've learned a lot in the process and if I were to do it again it would be better and easier (which is the main aim of this project anyway).  The main game loop is called from FastBasic, and I'll probably code the intro screen in FB for simplicity. 

 

Here's a little video of current progress:

 

 

 

Next task is the enemy missles (including mothership) then the game itself is pretty much complete and will just need all the boring stuff done :)

 

I'm trying to make it as accurate as possible, using this page for info https://computerarcheology.com/Arcade/SpaceInvaders/

 

I also plan on adding a few little variations to make it a bit more interesting.  Got a lot of work on over the next couple weeks so don't expect it too soon - this is a learning process, I'm no expert who can knock this game out in a day or two.

  • Like 28
  • Thanks 3

Share this post


Link to post
Share on other sites

Nice - looks more accurate than anything we have at the moment.

But that last invader - I do believe he's supposed to go faster in one direction than the other (and nice touch too doing the research to ensure accuracy)

  • Like 1

Share this post


Link to post
Share on other sites

Yes, when last invaders moves left to right he moves 3 pixels instead of two, I still need to implement that.

Share this post


Link to post
Share on other sites

ahhh space invaders... my first arcade experience, then a speccy 48, then an atari 800....  & i still got it! nice

 

 

looking foward to a blast, lookin good.

Share this post


Link to post
Share on other sites

Looks great - looking forward to seeing it progress!

Share this post


Link to post
Share on other sites

Oooh, oooh... I had some colorization ideas for Space Invaders, if you're interested.

 

Here's an XEX and Graph2Font file. Graph2Font can be made to spit out an ASM file, if that's any help for you.

 

Not a lot to it: just some DLI's and one PM overlay for the saucer.

 

1281728583_spaceinvaders.thumb.png.8b9c9f5381d4009d260f3b6ffc556387.png

 

space invaders 2.xex

 

space invaders 2.g2f

 

  • Like 5

Share this post


Link to post
Share on other sites

Thanks, I'm planning on doing some colour overlays as an option so I'll definitly take a look at this.

 

I'm also going to extend the vertical screen as an option to make it closer to the original.  You can get an extra 3x8pixel lines at the top and bottom with a custom DL, it won't work for all monitors/TVs but will be nice for those that can or those just playing on emulator (which handles it fine from my tests)

 

BTW: Using gr.8 how do you keep all the invaders the same colour on different coloured backgrounds?  And how does the PM overlay work for the mothership?  Which priority do I need to use?  I've only looked into this a little, so it would be easier if someone told me rather than me spending a few hours testing :)

  • Like 1

Share this post


Link to post
Share on other sites
Posted (edited)
26 minutes ago, Preppie said:

Thanks, I'm planning on doing some colour overlays as an option so I'll definitly take a look at this.

 

I'm also going to extend the vertical screen as an option to make it closer to the original.  You can get an extra 3x8pixel lines at the top and bottom with a custom DL, it won't work for all monitors/TVs but will be nice for those that can or those just playing on emulator (which handles it fine from my tests)

 

BTW: Using gr.8 how do you keep all the invaders the same colour on different coloured backgrounds?  And how does the PM overlay work for the mothership?  Which priority do I need to use?  I've only looked into this a little, so it would be easier if someone told me rather than me spending a few hours testing :)

The background and playfield have their own separate luminance values. So, as the background changes color/luminance, you just do nothing to keep the invaders the same color. :)

 

The PM overlay just uses as close to possible the shape for the saucer. You would need two basic shapes for the overlay, one for every other horizontal movement of the saucer (in order to minimize the excess overlap, since PM pixels are twice as wide as Graphics 8 pixels). I don't think priority matters, since the PM's just end up blending with the background anyway; but I have it set to Priority 1 in the example I posted.

 

Edited by MrFish
  • Like 1

Share this post


Link to post
Share on other sites

The invaders "look" the same colour thanks to undersaturation of high luma which is a usually annoying trait of our computer.

 

Another idea could be to support VBXE and Sophia 2 - that can allow true independent PF1 colours with minimal extra effort.

  • Like 1

Share this post


Link to post
Share on other sites
13 minutes ago, MrFish said:

The background and playfield have their own separate luminance values. So, as the background changes color/luminance, you just do nothing to keep the invaders the same color.

I thought there was one color and the foreground is basically a lighter version of the background (as seen in the bunker area where the brown background gives a yellow bunker)

 

3 minutes ago, Rybags said:

The invaders "look" the same colour thanks to undersaturation of high luma which is a usually annoying trait of our computer.

This makes sense from what I know.

 

16 minutes ago, MrFish said:

The PM overlay just uses as close to possible the shape for the saucer. You would need two basic shapes for the overlay, one for every other horizontal movement of the saucer (in order to minimize the excess overlap, since PM pixels are twice as wide as Graphics 8 pixels). I don't think priority matters, since the PM's just end up blending with the background anyway; but I have it set to Priority 1 in the example I posted.

Ok, so it's just a case of limiting the problems with the mismatched pixel size.

 

Thanks guys.

Share this post


Link to post
Share on other sites

Possibly the overlay trick might work for the shields as well.

A bit of trickery would be needed though - assuming 10 pixels (player + missile) is enough.  The data would need to be chipped away as the shields are eroded.

If 10 pixels per shield isn't enough then possibly PMG reuse might be possible?  Though that would involve on the fly positioning and graphics for at least 2 objects, and only really work properly in bitmap mode (though special trickery can be done to stop badlines in character mode)

Share this post


Link to post
Share on other sites
Posted (edited)
28 minutes ago, Preppie said:

I thought there was one color and the foreground is basically a lighter version of the background (as seen in the bunker area where the brown background gives a yellow bunker)

Yes, but as long as the hue remains the same (which is what I've done in the blue area), the lighter playfield color won't change. Obviously, when the invaders would get down to where the background color is brownish, then the invaders would turn yellow (like the bunkers and player's ship/gun); but I don't think that will look bad at all. I can do some examples of that, just to get an idea.

 

Edited by MrFish

Share this post


Link to post
Share on other sites
3 hours ago, Preppie said:

This is my first ever attempt at a game in assembler, so the code isn't the greatest

Don't knock youself, if the code works then it's good code, I know you can look at it and think

"I could change this or that to improve performance/readability" but from what I see here this is a great first

attempt, you deserve a big pat on the back, I look froward to seeing the finish game.

 

Thanls for doing this 

  • Like 1

Share this post


Link to post
Share on other sites
Posted (edited)
24 minutes ago, Rybags said:

Possibly the overlay trick might work for the shields as well.

A bit of trickery would be needed though - assuming 10 pixels (player + missile) is enough.  The data would need to be chipped away as the shields are eroded.

If 10 pixels per shield isn't enough then possibly PMG reuse might be possible?  Though that would involve on the fly positioning and graphics for at least 2 objects, and only really work properly in bitmap mode (though special trickery can be done to stop badlines in character mode)

I considered this, but left it off, based on the complications, and based on the fact that blending the PM overhang with the background is not so good as the luminance value of the background increases. In the upper part, where the saucer is located, the luminance value for the background is "0" (zero), which makes the PM overlap virtually imperceptible. In the brown area, the background luminance value is 4, which would tend to make overhanging PM pixels more visible.

 

Edited by MrFish

Share this post


Link to post
Share on other sites

Probably unnecessary anyway.  I just fired up Mame and the green shields in the original game are thanks to the cellophane overlay on B & W monitor.

So it's a case of our 2 lumas of 1 colour being ideally suited.

The UFO is done the same way but I reckon the PM overlay is probably preferable for it.

  • Like 1

Share this post


Link to post
Share on other sites
9 minutes ago, TGB1718 said:

Don't knock youself, if the code works then it's good code, I know you can look at it and think

"I could change this or that to improve performance/readability" but from what I see here this is a great first

attempt, you deserve a big pat on the back, I look froward to seeing the finish game.

Thanks for this comment :)  And yes, there is code that I now know I could re-write but as I have no need for the extra space or speed I go with the old adage 'if it ain't broke don't fix it'.

 

@MrFish, I get it now :)  

 

@Rybags, I could do bunkers with PM overlays but I'm not convinced it would look that great.  It's also a lot of work for a minor boost.  I'll have a closer look at it when I've done most the other things (If I still have the energy to make more improvements)

 

Share this post


Link to post
Share on other sites

Bunkers by means of background colour change would be much less effort.

It's up to you but the cosmetic stuff would be best done as selectable options.

 

I can recall there being lots of variants in the day though of course none as popular as the original.  Different cellophane overlay and even proper full colour ones (albeit bootlegs in some cases) but they didn't have the character of the original.

Share this post


Link to post
Share on other sites
Posted (edited)

Here's a "worst case scenario", where you have invaders that would be split between the two color (hue) sections.

 

Not bad; but what I found is that changing the lower portion to a green that tends towards blue, you can get a much better, almost unnoticeable, transition.

 

si2decent.thumb.png.4000c7ed625c011fa005661584ef3a1d.png

 

si3decent.thumb.png.135a5117c94e21ed5b60a22f28530a35.png     si3.thumb.png.caa6016c3c4dd818d2610ebea3b2c88b.png

 

space invaders 2 (decent).xex

 

space invaders 3 (decent).xex

 

space invaders 3.xex

 

Edited by MrFish
  • Like 6

Share this post


Link to post
Share on other sites

Thanks for this, it's give me a better insight into working with gr.8 colours, I normally use antic 4 so have little knowledge of this graphic mode.

 

I like that green one, I think I'll be using that :)  Not sure about the double line between the blue colours, think a smooth swap might look better.

Share this post


Link to post
Share on other sites
4 hours ago, Preppie said:

Thanks for this, it's give me a better insight into working with gr.8 colours, I normally use antic 4 so have little knowledge of this graphic mode.

 

I like that green one, I think I'll be using that :)  Not sure about the double line between the blue colours, think a smooth swap might look better.

 

Here it is with the lines removed.

 

si3a.thumb.png.e5aa6f3092e1a2cfefdf2c83729d622b.png

 

space invaders 3a (no lines).xex

 

I took a look at the Midway version of Space Invaders -- which is what I based my original screens on -- and when the enemies get down to the area where green is used for graphics, the enemies do turn green, but they don't allow for them to exist in the "transitional" color area. So, they just jump from being white to being green entirely.

 

spaceinvadersmidway.thumb.png.05f8823dbdcee926ba566000a3d2a52c.png

 

But obviously if you go with a color scheme like I proposed, it wouldn't be as much of a concern.

 

  • Like 3

Share this post


Link to post
Share on other sites

Thx again.  The invaders changing colour isn't a problem, I was just curious as to why they weren't doing this in your mockups. :)

Share this post


Link to post
Share on other sites
1 hour ago, Preppie said:

The invaders changing colour isn't a problem, I was just curious as to why they weren't doing this in your mockups. :)

Atari Power! :D

 

693658070_AtariPower.thumb.png.b9136f7de9be73da5b4343582e455db1.png

 

Atari Power.xex

 

  • Like 2

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

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...