I have decided to write a mini horror text adventure based off of Lovecraft's Shadow over Innsmouth. I saved the listing and it was a whopping 963 bytes when fully typed out (mostly, ran out of room after line 58)
anyway, seeing as I made myself a rather interesting challenge, how can I cram a text adventure into 1k? Tips anyone? I also want to include rudimentary graphics if possible. If push comes to shove, only then will I go up to 16k. But for now, 1k or 2k should suffice.
here is the program
Personal challenge: Writing a text adventure in 1k for the zx80
Personal challenge: Writing a text adventure in 1k for the zx80
- Attachments
-
- innsmouth.tzx
- (2.11 KiB) Downloaded 54 times
In Heck, there are two options for perpetual torment:
Eat the Puckerberry and suffer for eternity:
drink nothing but a cocktail of The Last Dab and Mexican Cake blended and served with
habanero slices
Eat the Puckerberry and suffer for eternity:
drink nothing but a cocktail of The Last Dab and Mexican Cake blended and served with
habanero slices
Re: Personal challenge: Writing a text adventure in 1k for the zx80
Machine code, and 16k. You can do a lot in 1k, but I don’t think an adventure would be right for it, especially as you want to include graphics.
Re: Personal challenge: Writing a text adventure in 1k for the zx80
Really a short one and filled with a lot of imagination in between I think.
Anyway agree with machine code.
Using a set of 32 characters I think you can save text to print in 5 bits per character compacting all text together and call a routine with initial char and end char parameters for printing. In this way you can also reuse pieces of text in "longer" sentences in case.
In this way with 2 chunks of 256 bytes compacted (managed by a single routine with a two 8-bit register and carry as input) you might have a bit more of 800 characters of usable sentencies to be printed and "space" for the game input and logic...
For extreme cases like this (and for an evolution of my 1k real chess ) I was also thinking of using a loader to load the final program insted of relying to basic starting the machine code. In this way you gain more system variables space and remove the need of basic starting program. The loader can also have a "long" text to introduce the adventure, so to remove it from the final loaded 1k and have minimal descriptions based on introduction for the various interactions.
Anyway agree with machine code.
Using a set of 32 characters I think you can save text to print in 5 bits per character compacting all text together and call a routine with initial char and end char parameters for printing. In this way you can also reuse pieces of text in "longer" sentences in case.
In this way with 2 chunks of 256 bytes compacted (managed by a single routine with a two 8-bit register and carry as input) you might have a bit more of 800 characters of usable sentencies to be printed and "space" for the game input and logic...
For extreme cases like this (and for an evolution of my 1k real chess ) I was also thinking of using a loader to load the final program insted of relying to basic starting the machine code. In this way you gain more system variables space and remove the need of basic starting program. The loader can also have a "long" text to introduce the adventure, so to remove it from the final loaded 1k and have minimal descriptions based on introduction for the various interactions.
Last edited by marste on Sat Feb 25, 2023 11:27 am, edited 1 time in total.
Re: Personal challenge: Writing a text adventure in 1k for the zx80
On a ZX81 I have placed the basic over the sysvar, need to check how it can be done on the ZX80.marste wrote: ↑Sat Feb 25, 2023 2:52 am I was also thinking of using a loader to load the final program insted of relying to basic starting the machine code. In this way you gain more system variables space and remove the need of basic starting program. The loader can also have a "long" text to introduce the adventure, so to remove it from the final loaded 1k and have minimal descriptions based on introduction for the various interactions.
Re: Personal challenge: Writing a text adventure in 1k for the zx80
You can have a look at the 1K starter kit: viewtopic.php?f=6&t=2349
It contains example program (for both machines), assembler, instructions and possibilty to debug with Visual Studio Code
Re: Personal challenge: Writing a text adventure in 1k for the zx80
marste wrote: ↑Sat Feb 25, 2023 11:18 amYou can have a look at the 1K starter kit: viewtopic.php?f=6&t=2349
I did some time ago and indeed, I tried moving BASIC over sysvar, but the ZX80 is not a ZX81.
Re: Personal challenge: Writing a text adventure in 1k for the zx80
The ZX80 vars are more compact and not very much free space to be used in basic start. Anyway in the kit there is the best solution I've found (if there are better I'm all ears ), surely more than enough for a loader program.
And to be clear: the basic is to start, the rest should be machine code to be able to use at best all the space!
And to be clear: the basic is to start, the rest should be machine code to be able to use at best all the space!