Game creation book for QL?
- SinclairSociety
- Trump Card
- Posts: 154
- Joined: Fri Feb 22, 2019 6:17 pm
Game creation book for QL?
What QL book do you all recommend for creating video games on a QL... Ummm.... for the QL beginner. Want something that shows how to create creatures and move them via keyboard. Like UDG in speccylands but for QL.
Sinclair Computers are AWESOME!!
Re: Game creation book for QL?
No good books on the subject - but there are some free games that include the code published in QL User magazine and on Rich's site https://rwapsoftware.co.uk/pdsoftware.h ... HMO1rbdmMQ
Also you should take a look at Super Sprite Generator 4 (still not free
) , Frank's Sprite Generator (free - http://www.dilwyn.me.uk/games/index.html ) and Adventure Creation Tool (not free)
Also you should take a look at Super Sprite Generator 4 (still not free
![Sad :(](./images/smilies/icon_e_sad.gif)
-
- Font of All Knowledge
- Posts: 3971
- Joined: Mon Dec 20, 2010 11:40 am
- Location: Sunny Runcorn, Cheshire, UK
Re: Game creation book for QL?
Hi,
I have some QL programming books, but they have had some coffee split onto them. I will maybe scan them and remove the stains.
I would read all the QL World Magazines and type all the programmes featured. Mike Lloyd did some programming tutorials on games programming. Maybe worth a look
There is a programme to use UDG on the QL, but I have never got it to work properly. On saying that the ZX Spectrum UDG just redefines existing characters in the defined ASCII character set.
If you read in QL Today V13 iss2-4, Dilwyn Jones did some articles on manipulation of the QL Font, it should be possible to implement QL UDGs by changing the QL Font to a user defined font with the UDG changed to a defined graphics shape.
I did look at this in a port of the ZX Spectrum Football Manager, which is written in Spectrum Basic, I have converted this to Superbasic and just had the Spectum UDGs to sort out.
I have some QL programming books, but they have had some coffee split onto them. I will maybe scan them and remove the stains.
I would read all the QL World Magazines and type all the programmes featured. Mike Lloyd did some programming tutorials on games programming. Maybe worth a look
There is a programme to use UDG on the QL, but I have never got it to work properly. On saying that the ZX Spectrum UDG just redefines existing characters in the defined ASCII character set.
If you read in QL Today V13 iss2-4, Dilwyn Jones did some articles on manipulation of the QL Font, it should be possible to implement QL UDGs by changing the QL Font to a user defined font with the UDG changed to a defined graphics shape.
I did look at this in a port of the ZX Spectrum Football Manager, which is written in Spectrum Basic, I have converted this to Superbasic and just had the Spectum UDGs to sort out.
Regards,
Derek
Derek
- Sparrowhawk
- Super Gold Card
- Posts: 648
- Joined: Wed Dec 15, 2010 12:33 pm
- Location: @131072
- Contact:
Re: Game creation book for QL?
To jump onto this thread - I downloaded Dilwyn's font2data program, and I can generate the DATA from one of the sample font files. How does one change a specific character though, say 174 (Theta) ? Is there some specific calculation that can be used to specify the offset for the start of the character?
Thanks.
Thanks.
a.k.a. Jean-Yves
Re: Game creation book for QL?
On a QL, a font is stored in the following format:Sparrowhawk wrote:To jump onto this thread - I downloaded Dilwyn's font2data program, and I can generate the DATA from one of the sample font files. How does one change a specific character though, say 174 (Theta) ? Is there some specific calculation that can be used to specify the offset for the start of the character?
Thanks.
Code: Select all
Offset Value
$0 Byte giving code of first character defined in the font
$1 Byte giving the number of characters defined minus 1
$2…$A Nine bytes defining the first character
$B… Nine bytes for each subsequent character…
........
Re: Game creation book for QL?
Worth adding here perhaps a couple of caveats about fonts.
Most fonts have characters in a set range, say space (CHR$ 32) up to copyright (CHR$ 127). But such fonts will have a default character too, whichis usually one character code lower than the first character.
The standard QL font, for example, covers character codes 32 to 127. But there is a CHR$(31) as well, which is usually a chequerboard character used for characters outside the range of the font.
Fonts generally start with two bytes:
First - lowest valid character code, for the standard QL font this would be 31.
Second - number of valid characters in this font less one (so that you can add it to the lowest character to get the highest in the font). So, if you have a font covering space to copyright plus the default character, the first two bytes in the font would be 31 and 96. 31+96=127, the last character int he font.
As characters are 9 bytes each, this makes it fairly easy to work out where each character is as an offset in the font. So we have to read the value of the first byte to get the first character code and do a simple calculation based on the code of the character you want to find after those first two bytes. I'll assume we want to find a character with code c:
OPEN_IN #3,flp1_my_font
BGET #3,lowest : rem code of lowest character in font
postn = 2+((c-lowest)*9)
CLOSE #3
So, to find the space character, this is code 32, at file position 2+((32-31)*9) or 2+(1*9) or 11.
For the upper character set with accented characters etc, the same applies just a different set of codes. This font will also have a default character, normally 127 if the font covers the usual CHR$ 128 to 191.
Hope all that makes sense.
Most fonts have characters in a set range, say space (CHR$ 32) up to copyright (CHR$ 127). But such fonts will have a default character too, whichis usually one character code lower than the first character.
The standard QL font, for example, covers character codes 32 to 127. But there is a CHR$(31) as well, which is usually a chequerboard character used for characters outside the range of the font.
Fonts generally start with two bytes:
First - lowest valid character code, for the standard QL font this would be 31.
Second - number of valid characters in this font less one (so that you can add it to the lowest character to get the highest in the font). So, if you have a font covering space to copyright plus the default character, the first two bytes in the font would be 31 and 96. 31+96=127, the last character int he font.
As characters are 9 bytes each, this makes it fairly easy to work out where each character is as an offset in the font. So we have to read the value of the first byte to get the first character code and do a simple calculation based on the code of the character you want to find after those first two bytes. I'll assume we want to find a character with code c:
OPEN_IN #3,flp1_my_font
BGET #3,lowest : rem code of lowest character in font
postn = 2+((c-lowest)*9)
CLOSE #3
So, to find the space character, this is code 32, at file position 2+((32-31)*9) or 2+(1*9) or 11.
For the upper character set with accented characters etc, the same applies just a different set of codes. This font will also have a default character, normally 127 if the font covers the usual CHR$ 128 to 191.
Hope all that makes sense.
--
All things QL - https://dilwyn.qlforum.co.uk/index.html
All things QL - https://dilwyn.qlforum.co.uk/index.html
- Sparrowhawk
- Super Gold Card
- Posts: 648
- Joined: Wed Dec 15, 2010 12:33 pm
- Location: @131072
- Contact:
Re: Game creation book for QL?
Many thanks Andrew and Dilwyn, very helpful ![Smile :)](./images/smilies/icon_e_smile.gif)
I am currently trying to update a game I wrote in 1988. First pass through was breaking down code where I had 4 or 5 statements on one line into separate lines, adding indenting, adding comments and general cleaning up of what was frankly a horrid mess!
I clearly had no idea what a function was, or local scope back then. All global scope with procedures changing global vars any which way. Also, my variable naming conventions leave a lot to be desired.
I have been considering tidying up the code base for my Dreamlands adventure too , but frankly that is a monster and I am not sure that I would survive the ordeal![Very Happy :D](./images/smilies/icon_e_biggrin.gif)
![Smile :)](./images/smilies/icon_e_smile.gif)
I am currently trying to update a game I wrote in 1988. First pass through was breaking down code where I had 4 or 5 statements on one line into separate lines, adding indenting, adding comments and general cleaning up of what was frankly a horrid mess!
I clearly had no idea what a function was, or local scope back then. All global scope with procedures changing global vars any which way. Also, my variable naming conventions leave a lot to be desired.
I have been considering tidying up the code base for my Dreamlands adventure too , but frankly that is a monster and I am not sure that I would survive the ordeal
![Very Happy :D](./images/smilies/icon_e_biggrin.gif)
a.k.a. Jean-Yves