Page 11 of 11

Re: Expanding the range of QL Adventures

Posted: Thu Jan 25, 2018 9:59 am
by tofro
Cristian wrote:100 DEFine PROCedure doSomething(dng)
110 some calculations
120 IF done THEN EXIT doSomething
130 do some more
140 END DEFine doSomething

You should utilize EXIT and place the END DEFine at the very end of the procedure.
And thanks for your nice game!
No you shouldn't. EXIT (at least on SBASIC) will only work to exit from loops (REPeat, FOR). Your way of doing things produces an "undefined loop variable" error in SBASIC. The Turbo compiler will also choke on this line. SuperBASIC with its sloppy syntax check might probably accept this, I can't test at the moment.

Tobias

Re: Expanding the range of QL Adventures

Posted: Thu Jan 25, 2018 2:03 pm
by georgeo
Hi everyone,

A quick look at Jan Jones' book suggests that I should use RETURN if I want to exit a procedure before the end, which is what I have mostly done--except for the typo, which is probably what Martyn was referring to.

Thanks for your help,
George.

Re: Expanding the range of QL Adventures

Posted: Thu Jan 25, 2018 7:43 pm
by Cristian
tofro wrote:
No you shouldn't. EXIT (at least on SBASIC) will only work to exit from loops (REPeat, FOR). Your way of doing things produces an "undefined loop variable" error in SBASIC. The Turbo compiler will also choke on this line. SuperBASIC with its sloppy syntax check might probably accept this, I can't test at the moment.

Tobias

Yes you're absolutely right Tobias, and thank you very much for your correction! Sorry! Never try to write code with a headache... I should take a pill and keep my hands far from the keyboard!

Re: Expanding the range of QL Adventures

Posted: Sun Aug 12, 2018 9:24 pm
by georgeo
Modest updates to Akalabeth: World of Doom. Player now receives reward (hit points) when leaving dungeon and the special attacks for thief and gremlin are implemented--thief special attack is particularly annoying as they keep stealing your weapons! Try it out from:

https://github.com/SinclairQL/akalabeth

Hopefully find time to do more over coming weeks,
Georgeo.

Re: Expanding the range of QL Adventures

Posted: Tue May 07, 2019 9:40 pm
by XorA
I don't think this set of adventures have been done for QL yet (I could not find them on Dilwyn's page).

The ScottAdams (not that one) adventure set and the ScottFree interpretor ported to QDOS.

to run

Code: Select all

DATA_USE SFA1_
ex sfa1_ScottZX
They type game number at prompt, 00-13 work normally, 14+ I wasnt quite sure of the mapping so its up to the reader to rename them to advXX_dat

For more information see :-
http://www.ifarchive.org/indexes/if-arc ... tfree.html
http://www.ifarchive.org/indexes/if-arc ... tfree.html
ScottZX.zip
(126.84 KiB) Downloaded 152 times

Re: Expanding the range of QL Adventures

Posted: Sat Jun 01, 2019 9:08 pm
by Derek_Stewart
Hi,

I have been looking at the C source to the Scottfree Interpreter. Which is a single C file, with all the functions before the main() function.

A little sloppy, but like txtElite I ported, a single C file, but worked.

Do you think it worth making the Scottfree interpreter into individual functipn files and use Make to perform the compiling?

Re: Expanding the range of QL Adventures

Posted: Sat Jun 01, 2019 9:18 pm
by Itimpi
I have been looking at the C source to the Scottfree Interpreter. Which is a single C file, with all the functions before the main() function.
That is the way that I think most C programs are written. When writing C avoiding forward references in the source can mean less needs pre-declaring in header files.
Do you think it worth making the Scottfree interpreter into individual function files and use Make to perform the compiling?
why do you want to do this? It is likely to lead to less efficient code as the compiler can do less optimisation of the generated code. The normal reason for breaking a file into separate files is so that you can only include the ones you want.

Re: Expanding the range of QL Adventures

Posted: Fri Aug 06, 2021 1:36 am
by XorA
A small (probably mostly not user visible) update to Wander adventure engine.
Wander102.zip
(95.75 KiB) Downloaded 71 times