Page 1 of 1

Alien Invaders game

Posted: Tue Dec 22, 2020 9:07 pm
by stevepoole
Hi Folks,

More program spring-cleaning getting done whilst covid confines... This time a version of the 'space invaders' game.

Just LRUN it, choose a 'CSIZE' for ships, then dodge with left/right arrow keys, or fire with 'down arrow' key. (To ESCape just fire until all ammo is used up).

Hitting ships gives you more ammo, missing them losses ammo. Don't keep the keys pressed down, just tap repeatedly to get the feel of things.

The program Turbo-compiles ok with 3ko of dataspace, and was tested ok on QPC2 and SGC, and should be ok on other QL devices ?
Invaders3_bas.zip
(1.95 KiB) Downloaded 137 times
Try not to shoot down the ship towed by reindeer !

Steve.

Re: Alien Invaders game

Posted: Thu Feb 22, 2024 1:19 pm
by stevepoole
Hi Folks,
Well, to take a break from morped animations, I adapted the associated curve-smoothing routine to make an invaders game.

Just UNZIP & LRUN after reading the instructions on lines 120 to 150. Kill the alien before he kills you !

Uses smooth complicated swooping orbits, with accelerations and decelerations to make your task harder to hit it....

The idea is to end up with the lowest score possible before you get laser-beamed ! Takes a lot more cunning than most alien games ?

Be careful if you modify the code, as it is highly critical. Tested under QPC2. (Please report any glitches you may notice). Steve.
UFO.zip
(4.53 KiB) Downloaded 31 times

Re: Alien Invaders game

Posted: Fri Feb 23, 2024 3:46 pm
by pjw
Pretty impressive, at least on QPC2. Well done!

Re: Alien Invaders game

Posted: Sat Feb 24, 2024 2:06 pm
by stevepoole
Hi Per,

I tried including extra aliens, but that makes the code horribly complex ! ( It is quite voluminous as it stands ).

But I could perhaps improve the way scores are calculated, to add some extra spice... Steve.

_________________________________

Re: Alien Invaders game

Posted: Tue Feb 27, 2024 10:13 am
by Tinyfpga
by stevepoole ยป Thu Feb 22, 2024 1:19 pm
Hi Folks,
Well, to take a break from morped animations : Be careful if you modify the code, as it is highly critical.
I hope you don't mind me altering your code such that it works on my systems. Most code written to run on a native QL will either not run and/or mash my user interface, (See pics below)

I enjoy modifying modifying QL code posted by forum readers to get it to run in my "sort of SMS2 setup". In the process I learn a lot about BASIC programming . I have managed to modify your last morphing program (see third pic), and I am going to try and QPTRise it, once I understand how it works.
UFO failure.jpg
UFO failure2.jpg
Morph success.jpg

Re: Alien Invaders game

Posted: Tue Feb 27, 2024 1:36 pm
by stevepoole
Hi Tiny...

Thanks for your feedback :

The UFO program now has a version tested ok under QDOS on SGC, renamed UFOsgc_bas. The QX variable is now XQ for Minerva users.

Change the (PREC)ision variable for more or less speed to fit your system ! 40 is ok for QPC2, 24 for SGC, (and maybe 8 for 128ko QLs ?)

There are one or two minor changes too, for SGC compatibility. Any Alien 'flashing' is due to slow processors. Steve.
UFOsgc.zip
(4.59 KiB) Downloaded 12 times