Dino game

Anything QL Software or Programming Related.
User avatar
dilwyn
Mr QL
Posts: 2221
Joined: Wed Dec 01, 2010 10:39 pm

Dino game

Postby dilwyn » Fri May 27, 2022 9:01 pm

Dino is a QL version of the classic browser game where you control a little dinosaur running through the desert. Jump over the cactuses - they are fatal if you crash into them.

A horizontally scrolling simple platform game. Written in SuperBASIC, with notes on modifying the program yourself. Can be compiled with Turbo or QLiberator if you wish. Too slow to run on a standard QL, but should run on anything from Gold Card upward as long as it has Toolkit 2, on QDOS or SMSQ/E systems. See the instructions in dino_doc for how to configure the running speed for your system.

Try the Demo Mode where you can see what you're up against first!

Download from my site at http://www.dilwyn.me.uk/games/dino.zip

dino.jpg
Dino


--
All things QL - http://www.dilwyn.me.uk
User avatar
RalfR
Super Gold Card
Posts: 735
Joined: Fri Jun 15, 2018 8:58 pm

Re: Dino game

Postby RalfR » Sat May 28, 2022 7:21 am

He he...nice ;)


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

Re: Dino game

Postby pjw » Sat May 28, 2022 9:43 am

:D Nice one!


Per
Doubts should follow beliefs like a shadow
- Camus
www.Knoware.no
User avatar
pjw
QL Wafer Drive
Posts: 1095
Joined: Fri Jul 11, 2014 8:44 am
Location: Norway
Contact:

Re: Dino game

Postby pjw » Sat May 28, 2022 10:06 am

For QPC2/SMSQmulator users with large screens the following tweaks make it, perhaps, more comfortable:

Code: Select all

225 open#0; 'con': outln#0; 452,202,(scr_xlim - 452) / 2, 40
230 rem WINDOW #0,452,202,30,15 :
235 BORDER #0,1,255
240 open#1; 'con': rem WINDOW #1,452,202,30,15 :
245 BORDER #1,1,255

and

3045 quit

Then just EXEC, or whatever, Dino_bas
Thanks, Dilwyn (Sorry, Dilwyn)


Per
Doubts should follow beliefs like a shadow
- Camus
www.Knoware.no
User avatar
Andrew
Super Gold Card
Posts: 624
Joined: Tue Jul 17, 2018 9:10 pm

Re: Dino game

Postby Andrew » Sat May 28, 2022 10:47 am

Very nice, Dilwyn!
As a side note: I played it on QEmulator and on QPC - and, my god, the speed is so different!
To achieve the same game speed in emulator running at full speed, on the same PC, on QPC slowdown_steps = 50000 and on QEmulator slowdown_steps=5000 !


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

Re: Dino game

Postby dilwyn » Sat May 28, 2022 12:00 pm

@Per: thanks, nice to see people are looking at the code. Useful little mod.

@Andrew: Difference not so great between the two emulators on my desktop pc, but quite a difference on my laptop. Don't remember the delay value on QemuLator on my laptop off hand, although it was a higher value than yours.


--
All things QL - http://www.dilwyn.me.uk
Derek_Stewart
Font of All Knowledge
Posts: 2956
Joined: Mon Dec 20, 2010 11:40 am
Location: Runcorn, Cheshire, UK

Re: Dino game

Postby Derek_Stewart » Sat May 28, 2022 4:39 pm

Hi Dilwyn,

Very horizontal scrolling game.

I wondered if the QL could do sideways scrolling, looks like it can.

The user defined graphics using the second font is what I was trying to do, that would emulate other 8 bit micros by defined characters from Basic. Which would any Spectrum game written basic could be ported to the QL.


Regards,

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

Re: Dino game

Postby dilwyn » Sat May 28, 2022 7:18 pm

Derek_Stewart wrote:Hi Dilwyn,

Very horizontal scrolling game.

I wondered if the QL could do sideways scrolling, looks like it can.

The user defined graphics using the second font is what I was trying to do, that would emulate other 8 bit micros by defined characters from Basic. Which would any Spectrum game written basic could be ported to the QL.

Thanks Derek. You are very welcome to use any of the code if it's of any help to you. I made the "user defined graphics" using my own fonted_obj program and converted the character set to DATA statements using Font2Data. Both programs on my website. Including the font as DATA means the program and font are self-contained. The program doesn't have to know where to look for a font file.

Taking that a little bit further, font information in DATA statements could probably be stored as 8-bit binary information. That way the patterns of 0 and 1 bits would give a degree of visual representation of the character when you look at a listing. It'd be a little slower setting up the font because you'd have to convert binary data to decimal to poke into the allocated memory, but usable. That way you could get away with not using a font editor to create it too.

Something like:

DATA "00011000"
DATA "00100100"
DATA "01000010"
etc etc
READ binary$
POKE address,HEX(binary$)
and so on
Not sure if a %binary in Sbasic would work in DATA statements.

Just ideas I had on the fly while typing this, none of it tested!


--
All things QL - http://www.dilwyn.me.uk
qbits
Brittle Membrane
Posts: 108
Joined: Sun Dec 11, 2016 3:32 pm

Re: Dino game

Postby qbits » Sun May 29, 2022 8:38 am

Diolch yn Fawr Dilwyn

A few tweaks to run in windows #1: rather than #0: with my QPCII emulator
and very engaging to play!

QBITS
Attachments
Dino QPCII.jpg


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

Re: Dino game

Postby stevepoole » Mon Jun 20, 2022 8:02 am

Hi Dilwyn,

Just got back from a trip to England, and so downloaded the dino game.

Very nice smooth animation, so good potential if you find time to do more to it !

My grandson (12) is with me for two weeks, so I will go through the code with him.... as he is an games enthusiast.

Many thanks,


Steve Poole.



Who is online

Users browsing this forum: No registered users and 4 guests