Start of a Game

Anything QL Software or Programming Related.
Post Reply
Derek_Stewart
Font of All Knowledge
Posts: 3975
Joined: Mon Dec 20, 2010 11:40 am
Location: Sunny Runcorn, Cheshire, UK

Start of a Game

Post by Derek_Stewart »

Here is simple use of SCROLL and PAN, new game?

Code: Select all

100 CLS
110 AT 0,0: PRINT "*"
120 FOR a=1 TO 190
130   PAN 1
140   PAUSE 1
150   SCROLL 1
160   PAUSE 1
170 END FOR a


Regards,

Derek
User avatar
NL_QL_Usr
Chuggy Microdrive
Posts: 57
Joined: Sun Jan 08, 2023 8:42 am

Re: Start of a Game

Post by NL_QL_Usr »

100 CLS
110 AT 0,0: PRINT "*"
120 FOR a=1 TO 190
130 PAN 1
140 PAUSE 1
150 SCROLL 1
160 PAUSE 1
170 END FOR a
180:
190 CLS#0:AT#0,0,0:PRINT#0,"|__|"
200 FOR n=1 TO 220
210 PAN #0,2
220 PAUSE 1
230 END FOR n
240 CLS#2
250 PRINT#2,"oops too late"
260 PAUSE


User avatar
NL_QL_Usr
Chuggy Microdrive
Posts: 57
Joined: Sun Jan 08, 2023 8:42 am

Re: Start of a Game

Post by NL_QL_Usr »

Just getting familiar again with the QL and off course the Q68....

And its fun!!
Attachments
ONEARM.zip
(4.03 KiB) Downloaded 96 times


User avatar
dilwyn
Mr QL
Posts: 2761
Joined: Wed Dec 01, 2010 10:39 pm

Re: Start of a Game

Post by dilwyn »

Nice work!
Looks good when you run it.
Glad you're enjoying QL programming again!

A couple of questions (haven't studied the code in detail to check):

In a couple of lines (930) the double ampersand(bitwise AND) is used - is this intentional or should it have been the AND keyword? Not having studied the code in detail, it might end up producing the same result though (not sure).

Is it possible to use HOLD? Couldn't see if it's possible.

Small suggestion: use more colours in the scrolling windows for the individual items, or possibly highlight winning combinations in a different colour?

If I get time this weekend I may have a tinker myself if I get a chance to study the code in more detail.

A simple fruit machine game was one of the first games I ever wrote for the QL. Sadly, the microdrive cartridge died just after I finished it, before I learned I HAD to make backups of every cartridge all the time, so that particular evidence of my 1984 programming is (probably fortunately) lost forever. It was before I got a disk drive. So I was very interested in this game to see how it compared to what I remember of my game. The answer is "this one is much better".


User avatar
NL_QL_Usr
Chuggy Microdrive
Posts: 57
Joined: Sun Jan 08, 2023 8:42 am

Re: Start of a Game

Post by NL_QL_Usr »

Hey Dilwyn thanks for your reaction.

It is indeed a lot of fun again
The game is far from ready indeed..
The bitwise is a mistake grins
Still learning to understand the superbasic stuf again...
After 25 years or more it is kind of rusty...
(after learning a lot about computers from the ql one has to start working... and in IT not smart grins)
I would to to see your input and will try a little more myself
The scores are not ok either but it is a start...


User avatar
NL_QL_Usr
Chuggy Microdrive
Posts: 57
Joined: Sun Jan 08, 2023 8:42 am

Re: Start of a Game

Post by NL_QL_Usr »

Update

The hold is working
and changed some things
It is sort of working ok now
Attachments
ONEARM.zip
(5.31 KiB) Downloaded 85 times


User avatar
dilwyn
Mr QL
Posts: 2761
Joined: Wed Dec 01, 2010 10:39 pm

Re: Start of a Game

Post by dilwyn »

Nice work. Considering you're only just getting back into QL programming, this is great.

It took me a while to realise that I have to press ENTER to accept the holds, rather than just press SPACE (which resets the holds looking at line 1430 if I'm right?) to roll after holds pressed.

Next step could be to add a NUDGE facility, though that would be more difficult.

Am I right in thinking that although meant to run in mode 4 (4 colours), use of the other colour numbers gives additional colours in high colour mode. Was this intentional (I'm using it in high colour mode in QPC2)?

One little suggestion is to be careful of adjacent colour numbers - I get yellow on cyan in places, and red on a magenta stipple, for example, which is almost impossible to read (monitors vary). I tend to try to avoid adjacent colour numbers to improve colour contrast on cheap monitors as my ol' eyes ain't getting any younger.

Having fun with this game, thank you NL_QL_Usr !


User avatar
NL_QL_Usr
Chuggy Microdrive
Posts: 57
Joined: Sun Jan 08, 2023 8:42 am

Re: Start of a Game

Post by NL_QL_Usr »

Hey Dilwyn

Very nice to see your reaction.
It was indeed intended to be used in mode 4 4 colors.
For me the 4 colors give not much variation...
It was my fast solution getting a little difference. I ve done this just to get the feeling again for the syntax of superbasic.
And off course it is fun to do it again.

But also I took it as a challenge from Derek..
I think it is nice when a lot of ql ers show their superbasic programs or solutions.
Right now I am trying to understand QPTR WMAN etc etc etc

Also I must Thank You Dilwyn for your great website, an unmissable center of QL knowledge!

The Q68 was provided with so much stuff I had a hard time learning testing it all.
I stopped fun with the QL before all the graphical possibilities.
I still love my 3 screens :D

Off course everyone is free to alter improve or whatever with the program.
Maybe someone can add nice graphics?


qbits
Trump Card
Posts: 173
Joined: Sun Dec 11, 2016 3:32 pm

Re: Start of a Game

Post by qbits »

Hi NL_QL_Usr

I like your ONE ARM Bandit. You suggest you’re back on a learning curve with SuperBASIC so hope you don’t mind I have made a few changes to your code. Attached is a jpeg as how it appears with my QPC2 Emulator which extends the colours in mode 4.

Further suggestions you could use different Font sets and the CHR$(n) command to display aliens sprites, coins instead or you present print lines rol$(1) =” WIN “ change to = CHR$(n)&CHR$(n)&CHR$(n) etc.

QBITS
Attachments
ONEARMPlus.jpg
ONEARMPlus.jpg (25.85 KiB) Viewed 8032 times
ONEARMPlus_bas.zip
(2.19 KiB) Downloaded 75 times


User avatar
NL_QL_Usr
Chuggy Microdrive
Posts: 57
Joined: Sun Jan 08, 2023 8:42 am

Re: Start of a Game

Post by NL_QL_Usr »

Hey Qbits;

That looks better already. I like the bigger Block for the winline.
Right now I am trying to make all kind off other programs to keep me busy ...
But your tips about the other fonts is also nice.

Anyway it is very nice you also like it. :)
Thanks


Post Reply