Page 1 of 2

ZZT Unlimited

Posted: Thu Apr 02, 2009 6:05 am
by thematrixeatsyou
So, while I wait for a particular free host I've signed up for to actually get my hosting working, I'm going to start a thread here.

Stuff that's supported so far:
- As many stats, flags, and bytes as your computer can handle.
- Player clones.
- Duplicators and the Koopo bug (minus the bit where it fucks up a stat item - i'll put that in if it's REALLY necessary).
- Off-board touching. The illusion bug works, too. In fact, all of the Anyboard Transport things and the Nextboard Transport in ZZT Encyclopaedia 3C work.
- Paused transport, although I don't know of any uses for it so far.
- Pushing through transporters and the statted empty trick.
- Lions, tigers, and bears, oh my... and ruffians
- Spinning guns, slimes, ricochets, and BOMBS! KABOOM!
- Lots of ZZT-OOPness, though not everything. No #throwstar or #play so far, and the #if poop$Hello! trick does not work.
- Saves! ...sorta. Only saves to zztu.sav for the time being, though. AFAIK it doesn't rebind stuff, so... ugh. Also, it doesn't load up any flags.
- Custom fonts. Including COMMFONT.COM, now!
- Speed adjustment. Speed 0 is a bit buggy, though :/
- It tells you when ZZT would normally crash (other than memory issues)! And if you remove the crash protection in pushtiles(), it WILL crash! (Eventually. The crash (duplicate pushable onto player) is due to a stack overflow from calling a function within a function repetitively when you try to push the player nowhere, AFAIK. Well, that's what it does here!)

Stuff which needs doing:
- Centipedes. Also, sharks, but that'll probably come before I get centipedes working.
- Hopefully getting the ZZT-OOP parser to the level of bugginess of ZZT itself.
- As mentioned above, make saving worthwhile. Load the damn flags (yes you can save more than 10 flags), bind the damn objects, and link the damn centipedes... actually, get the damn centipedes working first.
- Sound. I'll probably do this via OSS rather than via Allegro.
- Starting the program with the title screen, then pressing P to play.
- Custom palettes.
- Some animations (transporter, conveyor, duplicator) don't use the right chars.
- Timing model may need to be adjusted, as you get stuck in Teen Priest after you escape being held hostage by Loco's gang.
- Weird unknown trailing newlines in messages or something like that. I think this is fixed.
- Get some movements fixed. Conveyor belts and some of the guys in "Terrorist Tower" (you'll see) are bugged.

Stuff which could be good:
- An editor, which will hopefully be able to load up "board libraries" so you can copy from them and paste onto the board... STK, anyone? I'll probably also have a "*K*olor dialog[ue]", a stat editor, and some other juicy stuff. But this would be quite a project.

Stuff I have no intention of doing:
- In ZZT, when the 150th object shoots, it moves instead. This relies on ZZT's stat limit which I refuse to emulate.
- Lua scripting. This is me having a poke at the DreamZZT crew. By the way, the bomb + pusher puzzle in City of ZZT works on ZZT Unlimited, so hah :P although pretty much everything else is bugged :/

KevEdit hack:
If you have KevEdit, and have compiled it from source, change the instance of 150 in src/libzzt2/zzt.h to 1500.
Also, change this line (may do more harm than good; I have not confirmed this but it seems to be OK):
u_int8_t index; /* Position of param in list */
to:
u_int16_t index; /* Position of param in list */
It's in a struct.
Then recompile. If it has worked, try flooding the screen with lions or players.
WARNING: KevEdit does not like it very much, though! You can lock it up and lose your data. To prevent this, don't floodfill over a bunch of statted objects. Also, it has a tendency to segfault after you quit. With the second fix, it can segfault when you attempt to floodfill, rather than when you save.

EDIT: Now available at: http://iamgreaser.sandboxhost.com/zztu/

Posted: Thu Apr 02, 2009 8:50 am
by Commodore
an editor would be good, though I suppose the windows version of kevedit wouldn't really run out of memory so you could still make stuff as large as you wanted. also ZAP could do it.

Posted: Thu Apr 02, 2009 11:06 am
by Scribbit
awesome! Now I just need to find a compiler. When I get around to that, I'll start testing it.

Re: ZZT Unlimited

Posted: Fri Apr 03, 2009 12:55 am
by Ellypses
thematrixeatsyou wrote: - Paused transport, although I don't know of any uses for it so far.
Pause time. Touch objects as you go through transporter. Unpause and all the 'touched' objects would activate all at once. A neat puzzler trick. A good way to cheat at 'touch' oriented combat. Touch all that's adjacent and move away to unpause. MATRIX Image

What's the board limit on that sob by the way?

When you manage to finish, it would be cool to see SZZT unlimited, as the limit there is horrible. 89 object, none functioning ?dir, and a tiny text boxes.

Posted: Fri Apr 03, 2009 5:35 am
by thematrixeatsyou
Uh, at the moment, it can load as many boards as it likes, but only board edges are "relative". Boards above index 255 are not accessible with passages.

I'll see if I can extend the format a bit more. Currently the board size limit is 16MB although it will load boards above that, BUT I won't guarantee that will be possible in the future, as I may have to emulate the ZZT behaviour of loading boards.

I'll probably use one of the unused stat bytes in the passages. 0-253 = immediate access, 254 = relative access (maybe), and 255 = reserved.

254 * 256 = 65024 boards.

As for the board edges, I may abuse some of the unused bytes in the board header and/or footer. Board edges are in the footer, and there's about 16 bytes free straight after the time limit, so I might add high bytes for the board edges there. I'll use the same format as for passages.

Due to these features to be added (hopefully), I'll probably need to make an editor, as hacking KevEdit wouldn't be a great choice after all this.

Re: ZZT Unlimited

Posted: Fri Apr 03, 2009 7:39 am
by Dr. Dos
Jur wrote: When you manage to finish, it would be cool to see SZZT unlimited, as the limit there is horrible. 89 object, none functioning ?dir, and a tiny text boxes.
I thought that was because SZZT supported the awesome "/n 10" and I guess by the same logic would have "#try seek 8"

Posted: Fri Apr 03, 2009 2:51 pm
by Mooseka
make it opengl and use the unreal engine

Posted: Fri Apr 03, 2009 6:10 pm
by Schroedingers Cat
Mooseka wrote:make it opengl and use the unreal engine

Posted: Sat Apr 04, 2009 3:58 am
by Scribbit
You guys you guys has anyone compiled succesfully I tried to compile but I'm having trouble importing the allegro library does it have to be in the same folder as the source code or what?

Posted: Sat Apr 04, 2009 4:50 am
by zamros
i compiled the FUCK out of it, but i'm in ubuntu so it was the easiest thing ever...

Posted: Sat Apr 04, 2009 4:41 pm
by Zenith Nadir
meh i'm going to be logging off soon anyway, i'm going to be installing ubuntu 7.10 soon

Posted: Sun Apr 05, 2009 12:01 am
by Quantum P.
It compiled on OS X from the command line. It asks "Enter Code" every time I press an arrow key, but I was able to get it to shut up by commenting out a couple of lines in zzt.c.

I'd help with compiling a Windows version, but I know very little about compiling stuff on Windows.

Posted: Mon Apr 06, 2009 1:17 pm
by Zenith Nadir
my two cents re: kevedit hacking or lack thereof: the only reasons to use kevedit are 1. copy/pasting, 2. ability to generate all colours and zzt creatures/terrains in three button presses, 3. ability to put any character in a scroll or object program, 4. ability to automatically make an object #cycle 1 without needing to waste code doing that

as long as your proposed custom editor includes this stuff there should be no problem.

also if there is a way to make object codes more than 42 characters per line that'd be tops.

also also i'm assuming the stat limit per board is still 150? that's too bad, honestly

and i still pine for the ability to change colours to integers other than the standard blue/red/cyan/yellow/green/purple/white, but that's just me

Posted: Mon Apr 06, 2009 1:27 pm
by Mooseka
:<

Posted: Mon Apr 06, 2009 3:51 pm
by Quantum P.
I think the 42-character limit is imposed by the editors, not by ZZT itself. I was able to create a 79-line statement using a hex editor, and ZZT ran it just fine. I just don't know if this has any long-term effects (like how ZZT will load boards over 20000 bytes, but doing so will cause ZZT to become unstable).