Recent

Author Topic: Alien Attack (proj inc)  (Read 396 times)

speter

  • Sr. Member
  • ****
  • Posts: 420
Alien Attack (proj inc)
« on: September 04, 2025, 10:56:39 am »
Recently I came across a turbo pascal program I wrote in 1990; reading the obligatory readme.txt I found it was based on a BASIC program from a book published in 1984. Amazingly, I still have the book, so I decided to (re)port the original BASIC program into Pascal. :)

I have attached the project zip and a screenshot. I have also attached the "original" BASIC program, in case that is of interest to anyone.

The book is "The Big Fat Book of Computer Games" by Tim Hartnell.
Hartnell published many books (in the UK and Australia) in the 1980s; most aimed at the home pc market. Strangely the Big Fat is not included in his online bibliography (so it may have only been released in Australia).

If running the project with a non-US keyboard or non-Windoze OS, I suggest checking the HumanMove procedure (line 200). It includes the code to  handle keyboard entry:
Code: Pascal  [Select][+][-]
  1.         case key of
  2.           37, 100, 65 : dec(x); // left
  3.           38, 104, 87 : dec(y); // up
  4.           39, 102, 68 : inc(x); // right
  5.           40,  98, 83 : inc(y); // down
  6.           otherwise exit;
  7.         end;
ASCII 37-40 are the arrow keys
ASCII 65,87,68 & 83 are the "a","w","d" & "s"
ASCII 100,104,102 & 98 are the number pad "arrow" keys

Enjoy!
I climbed mighty mountains, and saw that they were actually tiny foothills. :)

Lulu

  • Sr. Member
  • ****
  • Posts: 334
Re: Alien Attack (proj inc)
« Reply #1 on: September 04, 2025, 07:23:45 pm »
Thank to share. It remind me the ZX81, my first computer in this years. A touch of nostalgia !
wishing you a nice life!
GitHub repositories https://github.com/Lulu04

 

TinyPortal © 2005-2018