The comp.sys.sinclair Crap Games Competition 2021: 25th edition extravaganza!

Anything QL Software or Programming Related.
User avatar
TMD2003
Trump Card
Posts: 168
Joined: Sat Oct 10, 2020 12:18 pm

Re: The comp.sys.sinclair Crap Games Competition 2021: 25th edition extravaganza!

Post by TMD2003 »

END OF WEEK 33:

It's been a busy week, this one, mainly because it's harvest time. I may not be a farmer, but some of the locals who are farmers took great pleasure in covering me with clouds of dust and husks from their not-at-all-brand-new combine harvesters (although the tractor that rumbled alongside it was a 20-plate, so not brand new but still only a year old) as I was gathering my own harvest. And I give you exhibit A (that's about a third of the total) and exhibit B (also about a third of what I'm going to need when I've got hold of it all). It's all going to be worth it, soon enough. There will be jam, and there will be wine.

Anyway, back to business: Crap Games!

{some of this post has gone down the memory hole}

The good news is that I've had a fourth game from Andy Jenkinson, which is - yet again - the polar opposite of the Crap Scale from the abomination I was forced to remind you about just above. Codenames is a card-based board game you may have come across; Andy was playing it with his friends over Zoom during the terrible house arrest period of April-May 2020, and this 48K Spectrum simulation is the (very long overdue) result. I've never played the card game so it took a bit of working out - the on-screen instructions are far clearer than the Wikipedia article on the original. The game doesn't decide on your codewords for you and it doesn't keep track of who is playing at that point - that's for the humans to do, while the Spectrum acts as the game board. Think of it like the huge rotating-disc display from Family Fortunes that Bob Monkhouse, Max Bygraves and Les Dennis stood in front of and said "Our survey said..." followed by generic TV quiz show noises.
Last edited by TMD2003 on Mon Dec 13, 2021 2:53 pm, edited 2 times in total.


Spectribution: Dr. Jim's Sinclair computing pages.
Features my own programs, modified type-ins, RZXs, character sets & UDGs, and QL type-ins... so far!
User avatar
TMD2003
Trump Card
Posts: 168
Joined: Sat Oct 10, 2020 12:18 pm

Re: The comp.sys.sinclair Crap Games Competition 2021: 25th edition extravaganza!

Post by TMD2003 »

END OF WEEK 34:

{some of this post has gone down the memory hole}

Retrospectively, this was a blank week.
Last edited by TMD2003 on Mon Dec 13, 2021 10:24 am, edited 1 time in total.


Spectribution: Dr. Jim's Sinclair computing pages.
Features my own programs, modified type-ins, RZXs, character sets & UDGs, and QL type-ins... so far!
User avatar
TMD2003
Trump Card
Posts: 168
Joined: Sat Oct 10, 2020 12:18 pm

Re: The comp.sys.sinclair Crap Games Competition 2021: 25th edition extravaganza!

Post by TMD2003 »

CALLING ALL EXPERT QL PROGRAMMERS!

I have a Crap Game Challenge specifically for you! And it'll be quite un-Crap if any of you can pull it off.

Today, Jamie Bradbury has sent me Zoggle, a completely reworked version of his Z88 Boggle from earlier in the year. What it does do is display a grid of 16 letters chosen from a bank of 96 (although it should do so in groups of six, it appears... not to). What is does not do is play Boggle - it's left to the two human players to do that with a pen and paper.

Jamie does say in the accompanying README.md file (which comes straight from GitLab - no idea what the .md extension is all about) that he does intend to make it possible to play human-versus-Z88... but it's going to involve a huge word list. Think of all the words that could be theoretically possible from the pool of letters available - some of which are 17 letters long if the combined "Qu" is showing - and that's going to take an equally huge amount of memory to store.

And that's where I thought the QL could come in. This is a machine not limited to a piddling 128K, after all. Displaying the game grid could be done in 16 pre-defined windows, scrambling the dice and loading them into the grid seems to me like a simple bit of array manipulation... but the algorithms to actually get the computer to scan through the letter cubes that are available, the way a human player would, and assess if the combination matches any word in the bank... that's a bit more of a tricky proposition.

Is there someone here who'd be up to the challenge? Or could it be a joint effort? If so, stand up and be counted!


EDIT: look at the time of this post. It's now just short of 1 am and I've already made the skeleton of a Boggle game, at least the bit that throws the dice. Most of that time was spent setting up the screen rather than getting the arrays to work. This bit is really easy - I've done it in an hour. Now, somewhere out there, there's a published list of Boggle-appropriate words, which a quick internet search might well reveal. Mush!


Spectribution: Dr. Jim's Sinclair computing pages.
Features my own programs, modified type-ins, RZXs, character sets & UDGs, and QL type-ins... so far!
User avatar
XorA
Site Admin
Posts: 1358
Joined: Thu Jun 02, 2011 11:31 am
Location: Shotts, North Lanarkshire, Scotland, UK

Re: The comp.sys.sinclair Crap Games Competition 2021: 25th edition extravaganza!

Post by XorA »

(which comes straight from GitLab - no idea what the .md extension is all about)
Its a Markdown file.


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

Re: The comp.sys.sinclair Crap Games Competition 2021: 25th edition extravaganza!

Post by Derek_Stewart »

Hi,

I have looked at the Zoggle files, which has been written using Z88DK.

This uses CONIO for it the terminal controls, which is a Turbo C, specific C Library, susual used on MSDOS computers.

I have looked for a Linux version of CONIO, but there seems to nothing avaialble.

I say Linux C library, as QLs C68 C compiler is closer to to Linux C code.

Maybe worth rewritting the code in Superbasic, which I will give a try, in the absence of a suitable CONIO replacement,


Regards,

Derek
swensont
Forum Moderator
Posts: 252
Joined: Tue Dec 06, 2011 3:30 am
Location: SF Bay Area
Contact:

Re: The comp.sys.sinclair Crap Games Competition 2021: 25th edition extravaganza!

Post by swensont »

The wiki page for conio.h (https://en.wikipedia.org/wiki/Conio.h) talks a little about it and mentions curses. If conio could be converted to curses, then it can be compiled for the QL. Graham (XorA) has recently fixed some bug in QL Curses and it should be more stable.

Tim


User avatar
tofro
Font of All Knowledge
Posts: 2685
Joined: Sun Feb 13, 2011 10:53 pm
Location: SW Germany

Re: The comp.sys.sinclair Crap Games Competition 2021: 25th edition extravaganza!

Post by tofro »

The following should get someone started:

Code: Select all


#include <stdio_h>
#include <qdos_h>

int kbhit(void) {
   /* Determines if a keyboard key was pressed */
   return (io_pend (fgetchid(stdin)) == 0);
}

char *cgets (char* buf) {
   /* Reads a string directly from the console */
   int buflen;
   char *buffer;
   
   buflen = buf [0];
   buffer = &(buf[2]);
   
   buf [1] = (char)io_fstrg (fgetchid (stdin), -1, buffer, buflen);
   return buffer;
}

int cscanf (const char *format, char *buffer, const char * ...) {
   /* Reads formatted values directly from the console */
   /* NI */
}

void putch (char ch) {
   /* Writes a character directly to the console */
   io_sbyte (fgetchid (stdout), -1, ch);
}

void cputs (char *str) {
   /* Writes a string directly to the console */
   io_sstrg (fgetchid (stdout), -1, str, strlen (str));
}
   
#define cprintf	printf
/* Formats values and writes them directly to the console */

void clrscr (void) {
   /* Clears the screen */
   sd_clear (fgetchid (stdout), -1);
}

int getch(void) {
   /* Get char entry from the console */
   return io_fbyte (fgetchid(stdout, -1);
}


ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
User avatar
Andrew
Aurora
Posts: 786
Joined: Tue Jul 17, 2018 9:10 pm

Re: The comp.sys.sinclair Crap Games Competition 2021: 25th edition extravaganza!

Post by Andrew »

TMD2003 wrote: Now, somewhere out there, there's a published list of Boggle-appropriate words, which a quick internet search might well reveal. Mush!
I found a list - it's just 1.6Mb. I guess it's a bit large for the QL. Maybe Q68 could cope with the list.


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

Re: The comp.sys.sinclair Crap Games Competition 2021: 25th edition extravaganza!

Post by Derek_Stewart »

Hi,

Amore complete version of a CONIO.H include file can be seen at:

https://github.com/zoelabbb/conio.h

Which a good idea to define the "conio.h" library functions as C functions.

Maybe worth developing a little more to work with C68.


Regards,

Derek
FrancoisLanciault
Trump Card
Posts: 167
Joined: Mon Aug 08, 2011 11:08 pm

Re: The comp.sys.sinclair Crap Games Competition 2021: 25th edition extravaganza!

Post by FrancoisLanciault »

TMD2003 wrote:
but the algorithms to actually get the computer to scan through the letter cubes that are available, the way a human player would, and assess if the combination matches any word in the bank... that's a bit more of a tricky proposition.
Been there done that a the QL a long time ago (around 2004 if I recall). The program would ask you for a grid of letters and, looking into a plain text word dictionary, would find all possible words in the grid and output the result sorted by length. I did that at the time in order to cheat in online Boogle games ! I can pull out the source if you want.


Post Reply