English Amiga Board

English Amiga Board (http://eab.abime.net/index.php)
-   project.Amiga Game Factory (http://eab.abime.net/forumdisplay.php?f=69)
-   -   Space Invaders (http://eab.abime.net/showthread.php?t=105132)

Havie 27 December 2020 22:31

Quote:

Originally Posted by Coagulus (Post 1448794)
To get the transparency effect you could add an extra biplane and then use Bitplanesbitmap for the 1 bitplane the invaders etc would reside on. The top half of the colours could then be brightened versions of the first half. The invaders would look a little transparent then but still only be in 1 bitplane...

Not quite sure what you mean but I don't think this would work as I am using dual bitplane mode to put the background behind the invaders.

Havie 27 December 2020 22:41

Quote:

Originally Posted by DamienD (Post 1448791)
...and here's one that's "320x200" pixels:
https://i.imgur.com/9muxYdf.png
I can play around with:
  • The opacity of the sky.
  • The opacity of the moon.
  • The sky positioning i.e. higher or lower.
  • The moon positioning i.e. higher or lower.
...and when you're happy, create 8 and 16 colour .IFF files ;)

Examples:
8 colour .IFF:

https://i.imgur.com/GiVGu3T.png

16 colour .IFF:

https://i.imgur.com/SX64ria.png

320x200 is the correct size as I wanted everyone to be able to play the game. I just use a poke to switch all Amiga's to NTSC mode which has the added benefit of stretching the screen and creating a better aspect ratio.

As I seem to be collecting features, I will need to implement a menu with some graphic options so you could have colour overlays or not, background moon or not, PAL or NTSC.

Code needs a bit of a rewrite as I blit directly to the screen (no double buffering) and erase using a non-transparent black box around all the bobs but obviously this doesn't work with a background so having to recapture all the sprites without a black border. Luckily, Blitz Basic can easily set Blit modes so I can erase a bob using erase mode and then re-blit in cookie mode. Simples!

The only bit causing me a bit of a headache is when the invaders reach the side of the screen, I had a loop that aligned all the invaders from the 1st one when this happened (as the arcade does) before they all moved down but I can't do it this way now as I would need to erase up to 55 invaders and re-blit them in one loop which would definitely give some serious slow down so I now have to aligned them individually before moving them down - maybe I will do a row at a time so it only takes 5 loops (1/12 second) to align them? Or maybe there is a better way and I haven't thought of it yet...

Coagulus 28 December 2020 01:06

Quote:

Originally Posted by Havie (Post 1448895)
Not quite sure what you mean but I don't think this would work as I am using dual bitplane mode to put the background behind the invaders.

Ah yes the effect wouldn't work then. I was thinking 4 bitplanes for the background then a fifth for the game. The game would still be 1 bitplane then but be on a 5 bitplane screen.

saimon69 28 December 2020 02:52

Quote:

Originally Posted by S. Campbell (Post 1448891)
oh god please not copper effects.

When well made you could not even tell is copper...

klx300r 28 December 2020 20:07

thanks so much! so cool I remember playing the original at an arcade with my big brother back in 78 ! Lots of quarters spend on that arcade box:great

Havie 25 January 2021 22:28

Took a break over Christmas but have got back into this over the last week or so and implemented Damien's background (thanks mate). Looks pretty nice but if you don't like it you can turn it off!

So game is basically complete and you have a few additional hot keys:

zx and space = left right and fire (or joystick).
P=pause
B=background on/off
Change overlay on screen: 1=original 2=colour

My only concern is the speed as it seems ok in WinUae but not sure how it'll run on A500/600. I think the last version was slow on a 500 (comment about UFO sound which is fine on WinUae). Anyway, if you get a chance, have a test and let me know how it goes for you - could possibly look to optimise if needed...

Download from here: https://eab.abime.net/zone/Space%20Invaders.adf

Havie 25 January 2021 22:48

Tried on my 1200 and speed was fine but noticed two bugs to fix.

1) You can shoot the ufo multiple times
2) Your bullet does strange things and disappears half way up the screen but as there are less invaders it's doesn't!

Still interested in how this runs on an A500.

1) Sorted
2) Possibly sorted with a subtle move of the vwait to near the beginning of the loop and the not the end?

Working download: https://eab.abime.net/zone/Space%20Invaders.adf

Havie 25 January 2021 22:59

Tested it on A500 in WinUAE and seems to run fine and UFO making correct sound (fingers crossed)...

Havie 25 January 2021 23:33

Had a bit of a bug squashing moment:

1) UFO still not working properly - fixed.
2) Sounds cutting out so gave each sound effect it's own channel - fixed.
3) Saved correct source code to floppy image

I know it takes a while to load as each shape is loaded individually and I could save all the shapes in one file which would speed up loading but I like the fact that anyone with DPaint, PPaint or other package can redo the graphics like Spade Invaders!

DamienD 26 January 2021 10:26

Quote:

Originally Posted by Havie (Post 1456567)
Took a break over Christmas but have got back into this over the last week or so and implemented Damien's background (thanks mate). Looks pretty nice but if you don't like it you can turn it off!

So game is basically complete and you have a few additional hot keys:

zx and space = left right and fire (or joystick).
P=pause
B=background on/off
Change overlay on screen: 1=original 2=colour

Heya Havie,

Firstly well done in getting all this working, I previously read your other thread: Spaces Invaders with a moon background ;)

Regarding the background though; I'm surprised that this didn't come out like the sshots posted here, and the quality looks poor:
https://i.imgur.com/pelestc.png
If you need me to try to optimise them then I can ;)

Havie 26 January 2021 14:05

Quote:

Originally Posted by DamienD (Post 1456663)
Heya Havie,

Firstly well done in getting all this working, I previously read your other thread: Spaces Invaders with a moon background ;)

Regarding the background though; I'm surprised that this didn't come out like the sshots posted here, and the quality looks poor:
https://i.imgur.com/pelestc.png
If you need me to try to optimise them then I can ;)

Thanks Damien - not sure if I messed it up? It would be great if your optimise for 8 colours then it should slot in easy enough as I load palette from background. Thanks.

Nearly there...

DamienD 26 January 2021 16:34

Quote:

Originally Posted by Havie (Post 1456725)
Thanks Damien - not sure if I messed it up? It would be great if your optimise for 8 colours then it should slot in easy enough as I load palette from background. Thanks.

Nearly there...

The below first example is 8 colours ;)

Quote:

Originally Posted by DamienD (Post 1448791)
...and here's one that's "320x200" pixels:
https://i.imgur.com/9muxYdf.png
I can play around with:
  • The opacity of the sky.
  • The opacity of the moon.
  • The sky positioning i.e. higher or lower.
  • The moon positioning i.e. higher or lower.
...and when you're happy, create 8 and 16 colour .IFF files ;)

Examples:
8 colour .IFF:

https://i.imgur.com/GiVGu3T.png

16 colour .IFF:

https://i.imgur.com/SX64ria.png

I can put the .IFF in The Zone! for you? ;)

But do you want anyt optimisations i.e:
  • The opacity of the sky.
  • The opacity of the moon.
  • The sky positioning i.e. higher or lower.
  • The moon positioning i.e. higher or lower.

Havie 26 January 2021 20:34

Now I remember why I fiddled with the 8 colour version - I wasn't keen on the blue craters on the moon.

Hang on a mo...

Havie 26 January 2021 22:18

Right so when I use you 8 colour background it looks wrong and now I remember fiddling with it to make it look better. Also, I reduced the brightness to make the invaders and player standout more clearly.

So my version looks like this with the wrong colours?

https://i.ibb.co/tD23xpn/001.png

Your 8 colour version comes out like this:

https://i.ibb.co/ZX2ksM8/002.png


I must be doing something wrong? I even made a 16 colour palette with the correct colours but they still end up wrong and I get a black as colour 8. Must be something to do with the dual playfield? Or may be it's something to do wiht the copper commands on the front screen?

Help!

jotd 26 January 2021 22:43

you could inspect your copperlist with winuae to debug (this is looking promising anyway)

Havie 26 January 2021 23:16

I am now wondering if it is to do with the rgb values?

If I am targeting an OCS/ECS Amiga then the each colour component is in teh range 0-15 but if I am using an AGA Amiga then the ranges is 0-255. I think I am setting the paletter under AGA in PPaint rather than OCS/ECS? Does this make sense?

Or am I confusing myself?

If I do:

PalRGB 0,8,30,103,204 (set palette 0, colour 8, red,green,blue) I get an RGB out of range error.

Havie 26 January 2021 23:36

Just tried using DPaint instead of PPaint and guess what - colours now display correctly? Have no idea what is going on...

DamienD 27 January 2021 00:05

Hmmm, I have many iterations of this on my computer...

So you want it a little darker then?

I'll quickly save at 8 colours and as an .IFF file; then upload to The Zone! ;)

Edit: ok, "Invaders_Backgrounds.zip" now in The Zone! that contains both these 8 colour .IFFs:
https://i.imgur.com/RT7E1bR.png https://i.imgur.com/02LQ1jR.png
As mentioned though, tell me if you want any adjustments ;)

DamienD 27 January 2021 00:16

Quote:

Originally Posted by Havie (Post 1456823)
Now I remember why I fiddled with the 8 colour version - I wasn't keen on the blue craters on the moon.

Ah, gotcha.

The craters were black but when reducing to 8 colours in "XNView NP" it changes them to blue for some reason :crazy

Let me see if I can work around this ;)

DamienD 27 January 2021 00:33

Hmmm, not sure why... but when I cut out a perfectly black moon:
https://i.imgur.com/Zu45Kai.png
Then paste onto any of the above images, it then gets slightly degraded :sad
https://i.imgur.com/Y5HuorZ.png
Too tired now, will do more investigation after work tomorrow evening...


All times are GMT +2. The time now is 03:52.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.

Page generated in 0.05163 seconds with 11 queries