Simple time-waster game

Anything QL Software or Programming Related.
User avatar
Mark Swift
Bent Pin Expansion Port
Posts: 86
Joined: Fri Jul 18, 2014 9:13 am
Location: Blackpool, Lancs, UK
Contact:

Simple time-waster game

Post by Mark Swift »

A recent long plane journey and a later coach trip put me in the position of having time on my hands with nothing much to do.

Space was limited and it was impossible to use a laptop so I decided to see what I could do in QDOS with just my phone and a small foldable bluetooth keyboard. There were some strange looks on the plane, but it helped me pass the time.

This is the result. At 131 lines it's a simple SuperBASIC mental challenge game.
AverageBrainScore_bas.zip
(1.52 KiB) Downloaded 151 times

The challenge requires you to type the average of the two numbers above and below or to the left and the right of the green input box as quickly as you can. There are 77 averages to complete, at the end of which you are given a score to show how long it took on average for you to do each calculation. The setup is random, and some setups are easier than others.

The real challenge is to beat your previous score without getting brain ache.

AverageBrainScore_bas.png

I do realise it's not the most captivating of games. Hopefully it's worth the post and of interest to someone.


Derek_Stewart
Font of All Knowledge
Posts: 4756
Joined: Mon Dec 20, 2010 11:40 am
Location: Sunny Runcorn, Cheshire, UK

Re: Simple time-waster game

Post by Derek_Stewart »

Hi Mark,

Interesting game, I like this type of game play.

I like the programming style.


Regards,

Derek
User avatar
Mark Swift
Bent Pin Expansion Port
Posts: 86
Joined: Fri Jul 18, 2014 9:13 am
Location: Blackpool, Lancs, UK
Contact:

Re: Simple time-waster game

Post by Mark Swift »

Derek_Stewart wrote: Wed Jun 12, 2024 11:01 pm Interesting game, I like this type of game play.
Thanks Derek.

I tried to think of a brain training type game that would be easy to program in SuperBASIC. Number averages came to mind.

While writing I added cheat code so that the game logic could be tested end to end quickly without having to solve multiple challenges.
That code is still in the game, left to be discovered.


stevepoole
Aurora
Posts: 890
Joined: Mon Nov 24, 2014 2:03 pm

Re: Simple time-waster game

Post by stevepoole »

Hi Mark,

After downloading, I had to rename the file and resave it, so as to be able to run it...

It is unusable in 512x256 mode on QPC2, but ok in 800x600. (No ESCape option though).

But the game is neat and a good test for one's mental arithmetic, (Especially if it has gone rusty).

Great inspiration, and good training for newspaper puzzles... Steve.

________________________________________________________________


User avatar
NL_QL_Usr
Bent Pin Expansion Port
Posts: 95
Joined: Sun Jan 08, 2023 8:42 am
Location: Harz DE

Re: Simple time-waster game

Post by NL_QL_Usr »

Very nice!!!

I was embarrassing Slow....
But with the cheat

Genius ...... :D


stevepoole
Aurora
Posts: 890
Joined: Mon Nov 24, 2014 2:03 pm

Re: Simple time-waster game

Post by stevepoole »

Hi Folks,
Yes Mark, AVERAGES are used in needle-making factories, to sort pins piled in contorted heaps, simply by shaking them !

Here is a simulation, which finally emulates water-weeds floating in a brook, a possible screen-saver ?

Tested ok on QPC, under SMSQ/E & QDOS, but slower on the latter.... Just UNZIP, LRUN or ESCape. Steve.
Pins.zip
(736 Bytes) Downloaded 139 times


User avatar
Mark Swift
Bent Pin Expansion Port
Posts: 86
Joined: Fri Jul 18, 2014 9:13 am
Location: Blackpool, Lancs, UK
Contact:

Re: Simple time-waster game

Post by Mark Swift »

Hi Steve,
stevepoole wrote: Wed Jun 19, 2024 3:13 pm After downloading, I had to rename the file and resave it, so as to be able to run it...
Would this be due me zipping it up as _bas instead of .bas, and possibly due to file name length?
If so, I'll keep that in mind next time.
stevepoole wrote: Thu Jun 20, 2024 1:33 pm Here is a simulation, which finally emulates water-weeds floating in a brook...
It's interesting that the needles always end up almost horizontal averaging close to 180 degrees.


stevepoole
Aurora
Posts: 890
Joined: Mon Nov 24, 2014 2:03 pm

Re: Simple time-waster game

Post by stevepoole »

Hi Mark,

Yes, the problem was that you placed your program inside another file with the same name, then you zipped it.

So QPC2 could not handle the double name, wihout me first renaming the outer file....

ALSO, Pin directions : change line 190 to read rnd(1359) , 160 to f=1 to n*4 , 420 to PAUSE 250 .

That will swivel the angles (and end up with pins more parallel).

BUT, In the factory, the needles lie on a sloping tray, so end up all nicely aligned on one edge... Regards, Steve.


stevepoole
Aurora
Posts: 890
Joined: Mon Nov 24, 2014 2:03 pm

Re: Simple time-waster game

Post by stevepoole »

Hi again Mark,

To align all pins on one edge, as if the pins lie on a slope :

Line 190 reset the angle to RND(359).

Line 410 END FOR z: CLS: FOR z=1 TO n: t(z,i)=0: t(z,x)=t(z,x)*.7: drw z

Amazing, no ? So now you know the trade secret..... Steve.


stevepoole
Aurora
Posts: 890
Joined: Mon Nov 24, 2014 2:03 pm

Re: Simple time-waster game

Post by stevepoole »

Hi Folks,

It's still been raining so here is another screen-saver, to avoid having to scramble your brains on hard games !

Just UNZIP, LRUN and sit back & relax.... Tested ok on QPC, but too slow on SGC.

Big Bang ? Big Crunch ? ...... Regards, Steve.
Twinkle.zip
(611 Bytes) Downloaded 155 times


Post Reply