Page 1 of 1

Snake in Maze

Posted: Fri Nov 13, 2020 1:04 pm
by stevepoole
Hi,

Here is a game (which I failed to zip previously to upload to the Forum), tested on Qemulator, QPC2, SGC, and Turbo'ed with 15 Ko of data space.

It is a snake game, but with added obstacles to avoid ! (Beta tested).

Each time you begin a session, type 'start' to initialise the high-scores file. Then just RUN, and choose a difficulty level, '1' being easiest.
It then draws the obstacles, and next the fruit. When the QL growls, use the arrow keys to navigate around the maze. (Press the ESCape key if no fruit appears).
Either you navigate successfully, or you crash, and get your score. Then hit (Y)es to play again, or (N)o to Quit.

Change the wait (w) variable value (on line 120) to suit your system if need be....

Covid has got me back to the keyboard...
Steve.
snake4_bas.zip
(2.39 KiB) Downloaded 102 times

Re: Snake in Maze

Posted: Fri Nov 13, 2020 2:00 pm
by stevepoole
Hi,

I just ran the game on a bare 128 Ko QL with no Hard disk...
So Change lines 290, 1540 & 1690 from win1_ to ram1_ !

Regards,
Steve.
______________

Re: Snake in Maze

Posted: Fri Nov 13, 2020 9:52 pm
by nikosdoykas
to run on a >128k??

Re: Snake in Maze

Posted: Sat Nov 14, 2020 9:00 am
by stevepoole
Hi Nikos,

What is the problem ?

I must admit that my 'bare' QL has SuperHermes fitted permanently...

Does this change anything ?

Regards,

Steve.

Re: Snake in Maze

Posted: Sat Nov 14, 2020 4:15 pm
by nikosdoykas
i have a qubide+640k so i can run it????

Re: Snake in Maze

Posted: Sat Nov 14, 2020 11:25 pm
by EmmBee
stevepoole wrote:Hi,

I just ran the game on a bare 128 Ko QL with no Hard disk...
So Change lines 290, 1540 & 1690 from win1_ to ram1_ !

Regards,
Steve.
______________
Hi,

I had a JM QL once, a long time ago. From memory, there was no ram driver.
Perhaps Nicos should try changing lines 290, 1540 & 1690 from win1_ to mdv1_ or flp1_ perhaps.

EmmBee

Re: Snake in Maze

Posted: Sun Nov 15, 2020 8:08 am
by stevepoole
Hi,

Yes, the program runs fine with mdv1_ , but with flp1_ you must have toolkit2, and invoke TK2_ext.

I use floppies to transfer programs between PC and QL, and they are far more reliable than microdrives...

Regards,
Steve.

Re: Snake in Maze

Posted: Sun Nov 15, 2020 8:54 am
by Derek_Stewart
Hi,

I think he said, he had a 640K Qubide QL, so there will be a WIN device, Toolkit 2 with RAM disc if the driver is loaded.

I would load all the software over hte QL Network, which will load software onto a 128K QL with Toolkit 2 on board.

Re: Snake in Maze

Posted: Thu Dec 31, 2020 8:31 am
by stevepoole
Hi Folks,

More progress has been achieved on QL Basic to JavaScript as I learn the ropes.

My latest attempt was to transcode a QL SNAKE program for PCs, Tablets and SmartPhones.

This is OK, but I had to exclude difficulty levels, because JavaScript matrix arrays are not straightforward to implement. (I am learning though).

I had to use strings with MODulo calculations to get row and column indexation for the output....

UNZIP, then click on the file run it. Use the arrow-keys to move the (S)nake, eat (O)fruit and avoid (X)obstacles. Once started, the snake continues moving.

Currently I am trying to transcode a program which draws epicyclic orbits, but am having difficulty in PAUSEing graphics output. (Impossible in JavaScript ?).

Happy New Year

Steve.

snake5.zip
(4.27 KiB) Downloaded 91 times