Alien Invaders game

Anything QL Software or Programming Related.
Post Reply
stevepoole
Super Gold Card
Posts: 710
Joined: Mon Nov 24, 2014 2:03 pm

Alien Invaders game

Post 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 136 times
Try not to shoot down the ship towed by reindeer !

Steve.


stevepoole
Super Gold Card
Posts: 710
Joined: Mon Nov 24, 2014 2:03 pm

Re: Alien Invaders game

Post 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 29 times


User avatar
pjw
QL Wafer Drive
Posts: 1280
Joined: Fri Jul 11, 2014 8:44 am
Location: Norway
Contact:

Re: Alien Invaders game

Post by pjw »

Pretty impressive, at least on QPC2. Well done!


Per
dont be happy. worry
- ?
stevepoole
Super Gold Card
Posts: 710
Joined: Mon Nov 24, 2014 2:03 pm

Re: Alien Invaders game

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

_________________________________


Tinyfpga
Gold Card
Posts: 250
Joined: Thu Sep 27, 2018 1:59 am

Re: Alien Invaders game

Post 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


stevepoole
Super Gold Card
Posts: 710
Joined: Mon Nov 24, 2014 2:03 pm

Re: Alien Invaders game

Post 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 10 times


Post Reply