WQRDLI
======
WQRDLI - pronounced WORDLY, is a simple solo word game, something between a
crossword puzzle and Master Mind(R). Use logic and your knowledge of
language to deduce the hidden word.
Index
=====
Whats new in V0.02?
Whats new in V0.03?
Whats new in V0.04?
Requirements
Game Rules
To Play
Scoring
Sharing your results
User Interface
Configuration Detail
Command Line
About Word Lists
Troubleshooting
ToDo
Program Status
Requirements
============
SMSQ/E V3.36+
OR
Qdos JS+/Minerva V1.98+ with
+ PE2 = ptr_gen V2.06+, and wman V2.09+
+ TK2 V2.31+
+ Home_bin V1.02 (optional but recommended)
+ Q2S_bin V0.03+ *
AND
+ Qlib_run or Qlib_sys V3.36+
+ EasyPtr's ptrmen_cde V4.10+ !
* Q2S_bin is a "compatibility toolkit" that adds some SBASIC functionality
to SuperBASIC. Toolkit included in bin_ sub directory.
! In some cases earlier versions of OSes and toolkits may work - but NOT
ptrmen_cde!
Compatible with all colour modes (mode 2 not tested) if correctly configured.
Minimum 512x384 resolution (although 512x256 works for up to 5 letter words).
Approx 50K - 90K RAM (depending on choices)
Approx 175K disc space; could be split over more than one device
Game Rules
==========
The game chooses and secretes a random word of a defined length from a list
and you have a limited number of goes to work out what the word is.
Your first guess must naturally be totally random, apart from knowing the
length of the word. On entering your guess the program evaluates the result
and returns some clues:
1. Letters in your guess that do not match any letter in the secret word
are marked as "open".
2. Letters in your guess that match one or more letters in the secret word
but are not in the right place are marked with a different colour
combination.
3. Finally letters in your guess that exactly match letters in the secret
word AND are in the correct position are highlighted to indicate that
fact.
Each row represents a guess. You have one guess less than the number of
letters in the word; the final row is for the secret word, revealed when
you have guessed correctly - or run out of chances.
To Play
=======
The program can be EXecuted from the command line or from some program
launcher. You can provide for an alternative configuration file by
entering its name on the command line, eg
EX "<path>WQRDLI_obj"; "/C<alternative config file name>"
If you are not using SMSQ/E, or under Qdos, dont use a toolkit called
Home_bin (or you launch the program from a Hotkey!) then you HAVE to
either configure the program's home directory manually - use the
standard Qjump configuration program, Config, for this, or JMS's
MenuConfig, OR you must specify the Home Directory on the command line
thus:
EX "<wqrdli path>WQRDLI_obj"; "/H<wqrdli path = home>"
The game starts up with the number of squares you have determined in the
configuration file (see below). All words are of the same length. Click
a square in the top row to start entering letters. Type in your guess and
press ENTER (or DO) on the line when ready. If you have guessed correctly
the word will be revealed on the last line, otherwise a new line will be
presented for you to try again. Use logic and your knowledge of the
language to guess before your choices run out!
"Factory default" colours (GD2 mode QL colours, and QL mode 8):
Blue square white ink: Open, ie no letters recognised or placed
Red square white ink: Letter recognised but in wrong place
Green square black ink: Letter recognised and in place
Score: Black square white ink: Word recognised
Black square red ink: Word not recognised
You can configure most things to your taste; the square size, the word
list to use, colours and more. Hopefully the config file is more or less
self-explanatory.. If not, the gory detail can be found below.
You can also operate with different config files, eg for different systems
or users of your systems. Simply specify the config file to use on the
command line:
EX 'dev1_games_wrd_WQRDLI_obj'; '/CQL8_cfg'
If the QL8_cfg is not in the WQRDLI home directory the full path name must
be specified.
Scoring
=======
Scores are calculated by subtracting tries from the maximum possible score,
with each guess multiplying the toll.
For each wrong letter a penalty of 2 times the row number is paid
For each correct letter in the wrong place the penalty is 1 times the row
number.
For each correct letter in the right place, there is no penalty.
You can use non-existent words (ie not in the word list) but then an
absolute penalty of 2 points for each letter (right or wrong) times the
row number must be paid. (Ie it will usually be cheaper to knowingly use a
wrong letter on the next guess if it spells a known word rather than use a
rubbish word to get by..)
Sharing your results
====================
You can press F4 at the end of the game to save a PIC file of your solution.
Note: This option saves the PIC in your designated folder using the name
of the selected word, eg WORD_pic. If a PIC of the same name already
exists it is overwritten!
Note the PIC created will be of the same mode that the system is in during
play, ie 0, 8, 16, 32, or 33.
If you have the latest QTImage you can easily convert your PIC to
a JPEG file for sharing online. Either load the PIC file into QTImage and
Export it from there or:
ERT FEW("<qti path>pic2jpg"; "<pic path>WORD_pic <dos path>WORD.jpg")
User Interface
==============
To move the window:
If you are using SMSQ/E with WM_MOVEMODE > 1: Grab the Title bar using
your mouse and HOLD the left mouse button down to move the window.
Qdos users can use just HIT the title bar and park the window move sprite
at some convenient location.
Or use CTRL + F4
Pressing ESC or DOing the title bar will quit the game. If a game is in
progress you will be asked for confirmation.
Click on any square in the top row to start entering letters. As you type
the highlight moves to the next square. You can move forward or backward
along the row using the left and right cursor keys, or using TAB and SHIFT
TAB.
Normally the cursor skips over squares marked as containing the right
character in the right place. Simply DO such a square to enter a different
letter there.
When you are satisfied with your guess press ENTER (or DO on the active
row with the mouse button).
Note: Only the current row will receive input.
At the end of the game:
At this point you can also create an image (PIC) of the grid. Simply press
F4 and the image will be saved to your configured location.
To play again, DO the message line with your mouse or press F3.
Scores are kept as an export text file in your configured location.
Configuration Detail
====================
The default configurtion file is called wqrdli_cfg unless you
specify a different one, using the /C option, on the command line.
A couple of different ones are included as examples.
The format of the configuration file is quite rigid:
The first line contains the version identifier. It must be the only item
and on the first line.
Blank lines and lines starting on * are considered comment lines and can
be anywhere after the first line.
Dont change the order of items!
Every item has to have a valid value
A value is an equals sign followed by the value and terminated by a
space:
item =value comment
This is true for all values except "messages" which may not have inline
comments appended; the whole line after the = is the value.
Some individual values:
-----------------------
wordlist: If the word list is in the dic subdirectory under home directory
then only its name is required. In all other cases the full path and
filename must be specified, eg
wordlist =en5GB - refers to the file <home>dic_en5GB
alternatively:
wordlist =win2_dics_eng_wdl_l5_txt - is a specific file in another
location
Note that if you change word length you should also start
a new score file!
(For more information on word lists see below)
scorefile =<filename> for <home><filename> or
scorefile =<path><filename>
The score file is a simple text file and follows the
PSION export file convention, ie it could be imported
into Abacus, Archive (or some external program) and
manipulated or merely displayed there.
verbose =1 - <> 0 => list all guesses; 0 => list word only
If verbose mode is chosen then words not found in word
list are marked with an asterisk. You could then spell
check them and manually add them to your list in the
correct alphabetical position.
picdir =<directory> - This is where your PICs go
square =36 - this sets the size for all squares; letter squares
and score squares. If too large it may cause the window
to become larger than the screen; if too small the
letters or scores may not fit.
palette =1 - system palette colours 0..3
sound =0 - Any value other than zero => sound on
xpos =200 - x - position (-1 => current pointer position)
ypos = 20 - y - position (-1 => current pointer position)
x/y can also be set to -2 => centred in the x
and/or y position on screen
colour =QL - Colour depth QL or 24 (any other value than "QL"
=> colour 24 => RGB).
RGB colours can only be specified when the
display is in GD2 mode, while QL colours are
displayable in all modes.
If QL colour is specified then all colour
values are taken to be, and MUST conform to, QL
colour values, basically 0..255
If RGB (non-QL) colour is specified then all
values are taken to be RGB hex values. An RGB hex
value looks like this: [$]<hex digit> * 1..6, ie
An optional dollar sign, followed by at least
one, and up to 6, hex digits.
backgrnd =226 - This is basically the grid colour.
If your system is running in QL colour mode then RGB24
colours cannot be used and any such will crash the
program with an overflow error. Applies to all colour
values below.
hilite =2 - The colour of the highlight box
closed =228 - Covered squares (ink is irrelevant)
hidden =255 - Secret word cover
The next batch of colours come in pairs: Paper colour, followed by ink
colour:
open => Uncommitted letter squares
nearly => For squares containing letters of right kind in wrong
place.
done => For squares containing letter of right kind in right
place.
The next few relate to the display of scores:
scoresq =0 - Score square
scorex =2 - Score word not found ink
scorew =7 - Score word found ink
The next tranche is for you to insert the relevant messages in a language
of your choice. Note that the whole line after the = sign is taken to be
the message, so no comments are allowed. Messages should be kept short.
noword =Word not found
win =Good one!
lose =Try harder!
quit => Quit string: Quit <Y/n> (question mark and space added
by program)
codes => yn, jn, on, .. the two first letters of yes/no (ESC and
ENTER added by program)
Command Line
============
Anything put on the command line overrides the corresponding entry in the
configuration file. /<key> gives the command, followed by the parameter. If
the parameter includes a / or a space it must be wrapped in quotes.
The following commands can be given:
/H - Home Directory - this overrides any other Home Directory
setting.
/C - Alternative command file. Only the file name and
extension need to be given if the file is in the Home
Directory.
/X - x-position of game window at startup
/Y - y-position of game window at startup
Either x-position or y-position or both can be gives as
-1 => current pointer position
-2 => centred on screen
any positive value represents an absolute position on
screen.
Example:
EX '<path>WQRDLY_obj'; '/X-2 /Y20 /C QL8_cfg'
Meaning: Execute WQRDLI, centred horizontally, 20 pixels below top of
screen, using <home>QL8_cfg as the configuration file.
About Word Lists
================
A few sample word lists are supplied but you can make your own in any
language you are comfortable with.
You can find word lists as plain text files (of varying quality!) in most
languages on the Internet. Write a small S*BASIC program to split any such
list into separate files for different word lengths in accordance with the
specification below. This program is designed for word lengths of between
4 and 9 characters. No guarantees if you stray outside these limits!
For your own sanity's sake you should spell check your word lists before
use! It should also be fairly comprehensive! (Very irritating to be told
by a computer that a word you know well, doesnt exist!)
Remove any words with non-alphabetic letters, such as hyphens or
apostrophes. Here are the basic rules:
1. All words in a list must be of the same length
2. Only one word per line, terminated with LF (CHR$(10))
3. All words must be in lowercase letters
4. The list must be sorted alphabetically, a..z
5. No blank lines anywhere in list (including at the end)
One conformity check you can apply is that the file length, divided by
the word length + 1, must equal the number of words in the list!
<word count> = <file length> / ( <word length> + 1 )
Troubleshooting
===============
The boot file hangs or says you dont have the right toolkits. If it hangs
break into the program. In both cases: try RUNing it again!
Qlib reports a BPUT error: Your version of TK2 is too old. WQRDLI needs
TK2 V3.10 or later.
Out of range error on startup: This probably means you have defined RGB
colours in your config file but are trying to run the program in QL mode.
The program will also crash if you have defined a square size and/or a
word length that requires a window larger than the screen will permit.
No checks are made by the program, it will just crash. Just alter the
configuration file and try again!
Mode 0 and 8:
You can play WQRDLI on a QL in mode 0 or mode 8, or in an emulator in all
modes 0.. 33. However, there are subtle (and not so subtle) differences in
display emulation across the board. A 512x256 screen is rather a tight
fit, so your options will be limited.
With some additional effort it might have been possible to iron out how
these differences affect the look of the program, either by making separate
versions, or by adding more conditions and variable metrics in the code..
- But I havent: Im happy with playing WQRDLI on my systems, ie QPC2,
SMSQmulator, and Q68, all in glorious high colour mode, where it works as
intended. The source code is made available so you can tailor it to your
system(s) if you like.
I cant remember much about mode 8 on a real QL, but emulators seem to
struggle a bit.. so you may need to wrestle with your system a little to get
it to work. Under Q-emulator you have to CTRL + c to find it after
execution. It works best if the system is in mode 8 before you EX WQRDLI.
Also, the PIC creation in QL mode is not perfect. If the window is not
properly aligned on screen the image will be slightly off. This may be
fixed one day. Perhaps you know how to fix it?
Config file/Score file etc not found: The test to check whether a file
name has a path prepended to the file name is rather simplistic: the
program checks to see whether there is a valid device number (1..8) in the
fourth position of the file name. If there is, it assumes the path is
fully specified, so a file name like QL48_cfg would not be properly
recognised! The cure is to specify the full path and file name, or to
rename the file. A fix for this issue may be made in a future version..
The game crashed (God forbid!) or you removed the game by other means and
now you cant move the pointer with the cursor keys: Type CKEYON at the
console and all should be well again.
You had to pause the game to do something else and now you cant move the
pointer with the cursor keys: Click the game window somewhere outside of
the grid before you pause, or type CKEYON at the console.
Whats new in V0.02?
===================
The only change to WQRDLI with this version compared to the previous one is
that now also losses are logged to the score file. This has resulted in a
small change to the score file format.
If you want to continue using your current score files, you can run a
small script, ..wrd_src_UPDTscore_bas, and thereafter just continue as usual.
Alternatively, rename or delete your old score files and start afresh.
This is how you use UPDTscore:
1. LOAD ..wrd_src_UPDTscore_bas in a standard S*BASIC console
2. Enter RUN
3. Enter the filename of the score file you wish to update
4. Copy the temporary resultant file (default: ram1_score_exp) over
your old score file.
5. Repeat from (2) for any other score files you use.
Note: You only need to update score files that are created with the
default 'verbose' setting in your config file.
Whats new in V0.03?
===================
By popular demand Ive added a character elimination display to the
program. As the game progresses, any characters in your guess that do not
match any character in the hidden word are marked. This should make it
easier to spot characters that should be avoided in your next guess.
You need to update your configuration file(s) for this. Either:
1. LRUN <wrdli home>update_bas and enter each wqrdlixx_cfg file that
you have to do the update automatically, or
2. Load each wqrdlixx_cfg file into a text editor and change the first line
from WQRDLI01 to WQRDLI02 (remember that these eight characters (plus LF)
must be the only thing on the first line!) and after the first active line
following
wordlist =<wordlist filename>
add the line
charset =ABCDEFGHIJKLMNOPQRSTUVWXYZ
Note that if your WQRDLI language is not English, you may need to add
additional characters. This is not done automatically by the update
program!
For Norwegian and Danish the line might look like this:
charset =ABCDEFGHIJKLMNOPQRSTUVWXYZÆØÅ
You may have to alter the square size to fit in extra characters beyond
the default 26. (But only do this if you need or want to!)
Eg alter:
square =36 Square size
to
square =40 Square size
This, however, will render the window size too big for the standard QL
512x256 display!
Whats new in V0.04?
===================
A bug in the elimination display caused letters that had not been
eliminated to be wrongly marked. This has now been fixed.
Misspelt key 'loose' in WQRDLI config files has been changed to 'lose' as in:
lose =Try harder!
ToDo
====
Re-think program logic. This was designed-as-you-go
Tidy code and make efficient!
Improve code commentary to better enable maintenance and future updates
Error messages, eg on screen shot, score file, etc..?
Improve QL mode screen shots
Improve sounds
Program Status
==============
V0.01, pjw, 2022 Feb 03
V0.02, pjw, 2022 Apr 12, Also log lost games; new score file format.
V0.03, pjw, 2022 Jul 21, character elimination display, minor tweaks
Updated boot, added update_bas
Updated Q2S_bin/Q2QUX_bin
Requires wqrdli_cfg updated to ID 02!
V0.04, pjw, 2024 Feb 26, Fixed bug in character elimination display
Conditions of use and DISCLAIMER as per Knoware.no
QL Software
