Tyger
Moderator: Terryn
- Dr. Dos
- OH YES! USE VINE WHIP! <3
- Posts: 1772
- Joined: Tue Mar 11, 2003 12:00 am
- Location: Washington
Tyger
So quantum P spoiled the Pygame based recreation of ZZT i've started working on.
Latest Version
Google Code page
Screenshots
Usage
Just put some ZZT files in the same directory as you would with ZZT. Press P to load a world and +/- to scroll through the boards.
Left clicking in the window is my shortcut to exit immediately so watch out for that!
Right clicking will spit out information on whatever element you right clicked on. Well, it will from source, there's no terminal that opens in the compiled version! Whoops.
Latest Version
Google Code page
Screenshots
Usage
Just put some ZZT files in the same directory as you would with ZZT. Press P to load a world and +/- to scroll through the boards.
Left clicking in the window is my shortcut to exit immediately so watch out for that!
Right clicking will spit out information on whatever element you right clicked on. Well, it will from source, there's no terminal that opens in the compiled version! Whoops.
Last edited by Dr. Dos on Tue Aug 17, 2010 7:52 pm, edited 6 times in total.
Visit the Museum of ZZT
Follow Worlds of ZZT on Twitter
Apologies for the old post you may have just read.
Follow Worlds of ZZT on Twitter
Apologies for the old post you may have just read.
- Zenith Nadir
- this is my hammer
- Posts: 2767
- Joined: Wed Mar 12, 2003 11:40 am
- Location: between the black and white spiders
- Dr. Dos
- OH YES! USE VINE WHIP! <3
- Posts: 1772
- Joined: Tue Mar 11, 2003 12:00 am
- Location: Washington
Zenith Nadir wrote:that :c looks like a sad face
here's hoping you fix the object display soon. good luck, doctor.
Edit: Also Lineswalls and save files.
Visit the Museum of ZZT
Follow Worlds of ZZT on Twitter
Apologies for the old post you may have just read.
Follow Worlds of ZZT on Twitter
Apologies for the old post you may have just read.
- Zenith Nadir
- this is my hammer
- Posts: 2767
- Joined: Wed Mar 12, 2003 11:40 am
- Location: between the black and white spiders
- Zenith Nadir
- this is my hammer
- Posts: 2767
- Joined: Wed Mar 12, 2003 11:40 am
- Location: between the black and white spiders
I agree with microwave. But also include some of this action: http://www.youtube.com/watch?v=ajNk1S146rY
- Dr. Dos
- OH YES! USE VINE WHIP! <3
- Posts: 1772
- Joined: Tue Mar 11, 2003 12:00 am
- Location: Washington
Sorry guys I was busy with furry shit and TF2!!!!!
Check it:
Do you see that title bar?
that is IMPORTANT debug information that you guys JUST WOULDN'T UNDERSTAND.
You can now move. Also super basic collision detection is in, by which I mean when you try to walk into something it checks if it's classified as WALKABLE, SOLID, or INTERACTION.
So solid/normal/breakable walls are SOLID as touching them does nothing. Fakes are walkable since nothing happens but you walking on them. Lions are INTERACTION since you get mauled by them in a visceral fight for the death.
More peculiar is the timing situation. I pretty much have no idea how these "timers" work, they just magically make the game run at the proper speed.
So my logic was as follows, there are 10 cycles in a second. If I ran the game at 60 frames per second there would be a cycle every 6 frames, or since it's fucking ZZT and there's no reason to redraw the screen that many times I could cut it down to 30 fps and have a cycle every 3 frames.
Then on each frame I would calculate the current cycle, and if it divided evenly into the element's cycle it would allow it to move or do whatever it needed.
Except this is too fast!
So just for the hell of it I tried 10fps which would mean a cycle every frame which is what ZZT does anyway now that I think about it (why did I think I needed 30 fps?) but even that is slightly faster than ZZT itself in tests of running the player from one end of the board to the other.
But I'm more inclined to believe that's ZZT on windows XP running slower than it should. It certainlly seems playable at least.
The horrible incorrect oop bug is still hanging around. Also the under tile thing ZZT does isn't actually implemented, those normals that disappear are actually fake walls.
Other features I started to add that didn't immediately work so I put off for the time being include:
* Custom fonts/palettes
* Custom walls/fakes by giving them stats
Check it:
Do you see that title bar?
that is IMPORTANT debug information that you guys JUST WOULDN'T UNDERSTAND.
You can now move. Also super basic collision detection is in, by which I mean when you try to walk into something it checks if it's classified as WALKABLE, SOLID, or INTERACTION.
So solid/normal/breakable walls are SOLID as touching them does nothing. Fakes are walkable since nothing happens but you walking on them. Lions are INTERACTION since you get mauled by them in a visceral fight for the death.
More peculiar is the timing situation. I pretty much have no idea how these "timers" work, they just magically make the game run at the proper speed.
So my logic was as follows, there are 10 cycles in a second. If I ran the game at 60 frames per second there would be a cycle every 6 frames, or since it's fucking ZZT and there's no reason to redraw the screen that many times I could cut it down to 30 fps and have a cycle every 3 frames.
Then on each frame I would calculate the current cycle, and if it divided evenly into the element's cycle it would allow it to move or do whatever it needed.
Except this is too fast!
So just for the hell of it I tried 10fps which would mean a cycle every frame which is what ZZT does anyway now that I think about it (why did I think I needed 30 fps?) but even that is slightly faster than ZZT itself in tests of running the player from one end of the board to the other.
But I'm more inclined to believe that's ZZT on windows XP running slower than it should. It certainlly seems playable at least.
The horrible incorrect oop bug is still hanging around. Also the under tile thing ZZT does isn't actually implemented, those normals that disappear are actually fake walls.
Other features I started to add that didn't immediately work so I put off for the time being include:
* Custom fonts/palettes
* Custom walls/fakes by giving them stats
Visit the Museum of ZZT
Follow Worlds of ZZT on Twitter
Apologies for the old post you may have just read.
Follow Worlds of ZZT on Twitter
Apologies for the old post you may have just read.
- Quantum P.
- Level 17 Accordion Thief
- Posts: 1433
- Joined: Fri Sep 12, 2003 1:41 am
- Location: Edmonds, WA
- Contact:
I ran a few tests in ZZT under DOSBox, measuring the length of a cycle while intentionally slowing down ZZT. As I reduced the amount of slowdown, I got more cycles per minute, until it leveled off at about 546 cycles/min (DOSBox settings don't seem to matter much). This seems to imply that this is the correct speed, and not a symptom of ZZT being slow. But why 546 instead of 600?
I immediately remembered reading DOS programming tutorials about the PIT timer, because it has a wacky frequency: 1.193182 MHz. If you divide that by 65536 (2^16), you get 18.2 Hz. 546 cycles/min = 9.1 cycles/sec = half of 18.2 Hz. It's not proof, but it's enough of a coincidence to convince me.
So i guess ZZT's frame rate ought to be 9.1032548384 frames/sec. Though I can think of advantages with picking 10 frames/sec (ideal numbers vs. subtle familiarity of speed).
Anyway, Tyger is looking more and more awesome! Being a purist, I didn't like the HUD at first, but it's starting to grow on me.
What's the horrible incorrect oop bug?
I immediately remembered reading DOS programming tutorials about the PIT timer, because it has a wacky frequency: 1.193182 MHz. If you divide that by 65536 (2^16), you get 18.2 Hz. 546 cycles/min = 9.1 cycles/sec = half of 18.2 Hz. It's not proof, but it's enough of a coincidence to convince me.
So i guess ZZT's frame rate ought to be 9.1032548384 frames/sec. Though I can think of advantages with picking 10 frames/sec (ideal numbers vs. subtle familiarity of speed).
Anyway, Tyger is looking more and more awesome! Being a purist, I didn't like the HUD at first, but it's starting to grow on me.
What's the horrible incorrect oop bug?
- Dr. Dos
- OH YES! USE VINE WHIP! <3
- Posts: 1772
- Joined: Tue Mar 11, 2003 12:00 am
- Location: Washington
Code: Select all
Stat Elements: 25
PADDING PADDING PADDING Length: 29545
TEMP IS ll blocks your way over the bridge. "Grrr... Pay for passage or forgetabout the castle!"!bribe;Bribe the troll...........10 Gems#end:bribe#take gems 10 toopoor#lock"Now hurry on along..."/i/n/i/n/i/i/i/i/i/i/i/i/s/i/s#unlock#end:isin#if scepter allow$The troll blocks you: "Nobody leaves the castle without the Scepter of Lots 'n Lots of Power. Return to your quest!"#end:allow#lock"Continue on, brave adventurer."#restore touch/n/i/n/i/i/i/i/i/i/i/i/s/s#unlock#end:toopoor"You can't afford it, idiot!",Bug MazeLength: 271
TEMP IS PADDING PADDING PADDING PADDING PADDING PADDING PADDING PADDING PADDING PADDING PADDING PADDING PADDING PADDING Length: 26740
TEMP IS seek/i/i/i/i/i#send bombed
Code: Select all
@Troll
#end
:touch
#if blocked w isin
A troll blocks your way over the bridge.
"Grrr... Pay for passage or forget
about the castle!"
!bribe;Bribe the troll...........10 Gems
#end
:bribe
#take gems 10 toopoor
#lock
"Now hurry on along..."
/i/n/i/n
/i/i/i/i/i/i/i/i
/s/i/s
#unlock
#end
:isin
#if scepter allow
$The troll blocks you:
"Nobody leaves the castle without
the Scepter of Lots 'n Lots of
Power. Return to your quest!"
#end
:allow
#lock
"Continue on, brave adventurer."
#restore touch
/n/i/n
/i/i/i/i/i/i/i/i
/s/s
#unlock
#end
:toopoor
"You can't afford it, idiot!"
Visit the Museum of ZZT
Follow Worlds of ZZT on Twitter
Apologies for the old post you may have just read.
Follow Worlds of ZZT on Twitter
Apologies for the old post you may have just read.
- Dr. Dos
- OH YES! USE VINE WHIP! <3
- Posts: 1772
- Joined: Tue Mar 11, 2003 12:00 am
- Location: Washington
Also the timer actually seems to be fine with floating point numbers, so I'm now running it at 9.1032548384 fps and it seems to sync better with ZZT itself.
Edit:
Furret: i found the problem
Furret: i'm writing a zzt module in python and i hit your bug and solved it
Furret: i don't know really why it happens, but the open() and read() functions fuck with newlines and can't be used to read binary files, it seems
Furret: instead you should use os.open() and os.read()
Edit:
Furret: i found the problem
Furret: i'm writing a zzt module in python and i hit your bug and solved it
Furret: i don't know really why it happens, but the open() and read() functions fuck with newlines and can't be used to read binary files, it seems
Furret: instead you should use os.open() and os.read()
Visit the Museum of ZZT
Follow Worlds of ZZT on Twitter
Apologies for the old post you may have just read.
Follow Worlds of ZZT on Twitter
Apologies for the old post you may have just read.