ZZT in Euphoria

Discuss how totally awesome Bang! is here.

Moderator: Terryn

EuphoriaZZTer
Pikachu Power!
Posts: 18
Joined: Wed Mar 16, 2005 4:23 am
Contact:

Info and thanks.

Post by EuphoriaZZTer »

Wep:
Thanks, I'll keep that in mind. Since a lot of the coding is based on your code, I will be sure to credit you in the code before I submit it. Thanks again.

Everyone:
I just wanted to let you all know that I am still working on the program. So far, pushers can push everyting they are supposed to except the player. Also, only the pushers can move on their own, so far. Overall, it is going along pretty well. My first upload will be pretty soon, probably during the school year. I'll be in Ohio all next week, and most of my free time will be spent working on it. As soon as I get it bug free and somewhat playable, I'll upload it. Until next time, have fun!

EDIT: I decided to scrap the Puzzle World idea, since I could only think of 4 puzzles, and a 5 board world isn't very fun, neccesarily. My new plan is to make a Hitchhikers Guide to the Galaxy world. All based on the number 42. Still slow on the ZZT Clone, but also still planning to work on it. Since I'm going back to school in 2 days, most of my time has been spent playing video games, anyway.
EuphoriaZZTer
Pikachu Power!
Posts: 18
Joined: Wed Mar 16, 2005 4:23 am
Contact:

Post by EuphoriaZZTer »

Sorry about the double post, but I wanted everyone to see this.
Hey everyone. Progress is slow, but I'm still gonna try to complete it. Not until I learn a LOT about C code though. I will eventually complete it, and send it in, but I'm busy with another project now. I'm working with Chronos to filnally release Chrono Wars 14! Untill CW 14 is released, don't expect much progress on the ZZT clone. Sorry.
User avatar
Zephyr
aaaa my capilaries
Posts: 129
Joined: Sat Jul 26, 2003 11:12 pm

Post by Zephyr »

Chronos Wars 14?! :agh: It's been quite a hiatus!
EuphoriaZZTer
Pikachu Power!
Posts: 18
Joined: Wed Mar 16, 2005 4:23 am
Contact:

It's been a long, long time.

Post by EuphoriaZZTer »

[This is long. For a tl;dr version, scroll to the bottom.]

Wow. After a few years, I come back to z2, find my old stuff, and everything. Funny enough, the whole reason I ever came to this site in the first place was to play the worlds people had created. Now, the only reason I came back was because of EuZZT. It's been lost, found, lost again, made, remade, and finally, I'm actually getting progress.

But before any more info on that, I have to mention. I looked over Zenith Nadir's comment on the first page, again... and I finally realized what he meant. I've been in the craze longer than most people, and even today I find myself loving the games (though the 5th gen Pokémon are just "ok"). However, I'm also finding myself getting annoyed at all the "new" people with Pokemon. It was never about the battles, or the cards, or even the games. For me, it's about the company. Because of my love, I've met some of the coolest people in the world. Top Brawlers from NC, Top Pokémon fans, I met Freeza's Japanse Voice Actor, and many more. All that said... I'm still a Pikachu fanatic. Always have been, always will be. (Need proof? I got, and love, PokéPark Wii: Pikachu's adventure. Yeah... I prolly need help.)

Now then, without further ado... my project. When I first posted here, I really had no idea what I was doing. I knew nothing of C, C++, Pearl, Pascal, any real Programming Language. All I knew, really, was HTML, BASIC, and Euphoria. EuZZT was a big ambition, and I wanted to do it... but the main reason for the project falling away is I couldn't quite figure out how "task-based" systems worked. I couldn't make a game. And thus, I worked on it less and less. Eventually it stopped altogether. But... I did follow through on my ambition of learning C, and learning C++, I learned Java, PHP, SQL, even the minimalist language "Brainfuck". I learned a LOT of Proogramming languages, Scripting languages, and I finally made an actual game in Java.

In the meantime, I had my laptop crash, mess up, an even lost it at one point. Still haven't found it. And there went most of my source code. I was smart enough to save it on a flash-drive, but all it did, really, was draw the board, and accept "P", "Q", and "e" Not really that impressive. I finally found this source again, a few weeks ago, and since then I've been working on it, using the newest version of Euphoria (more C-like, really) Now, I've made actual progress. Now, I see myself actually being able to finish it. To actually produce something.

And so, here I stand. EuZZT is finally being actively worked on again. And this time, I'm not giving any dates, cause I know that would be too early. It's become a hobby project. I work on it when I feel like it. And it's possible I'll never finish it. But, if I do, I'll put it here, first. I know there are a few clones already out there, and I know mine likely won't be as good as I imagined it would be. But I'm determined to do something. If nothing else, I'd be able to play ZZT games with just my program, which, to me, would be hella awesome. In any case, I wanted to say the project is back on track.

And... As for Chrono Wars 14...I'm just going to go ahead and say I may never complete it. I have good ideas (I sill have them in a text file) but I don't know where I put the pre-release file I got, and I'm not that good at designing worlds, anyway. If I do finish it, it would be with some help, with other true fans of the game. Feel free to contact me if you're interested, as I did speak with Chronos30 about it oh so long ago. If anyone knows where he went, I'd like to know. Maybe I can get a second copy of that world, maybe not. In any case, more than likely it wont get made. Sorry.

I... should update my profile. Yeah. Haven't touched it since I last posted. Anyway, that's all. You can go back to whatever you were doing.

tl;dr
I'm back, finally got the old EuZZT project running again, finally understand why I like Pokémon (Pikachu, really), and I'm likely not going to finish Chrono Wars 14.
User avatar
Commodore
fgsdfs
Posts: 2471
Joined: Wed Mar 12, 2003 5:44 pm
Location: :noitacoL
Contact:

Post by Commodore »

Help us with our wiki if you can: http://zzt.org/zu/
*POW* *CLANK* *PING*
EuphoriaZZTer
Pikachu Power!
Posts: 18
Joined: Wed Mar 16, 2005 4:23 am
Contact:

Post by EuphoriaZZTer »

Oooo. I could do that. I registered as a user and everything. I'll see what I can do, after tutoring someone on how to program. =P I'll think of something.
User avatar
Saxxon
the Gargoyle.
Posts: 608
Joined: Tue Jul 25, 2006 10:02 am
Contact:

Post by Saxxon »

Yay, competition! :)

Actually, given the small community, we should really be collaborating.
EuphoriaZZTer
Pikachu Power!
Posts: 18
Joined: Wed Mar 16, 2005 4:23 am
Contact:

Post by EuphoriaZZTer »

xD So true. Collaboration would be key. I've been using the file formats given by Mystical Worlds and Kevin Vance himself. The programming of ZZT itself has been all me so far, though. =P It's actually a pretty simple program. Just a lot going on at once. I finally figured out how to make everything work, too.

My theories are pretty simple. It's time-based, in a loop. This loop checks for when each element moves. And if it's paused, ONLY the player gets to move. I haven't yet figured out exactly how the player clone thing works. Maybe player movement only happens after all other elements have moved, therefore allowing the player's position to get updated without actually moving there. The loop executes every cycle, figuring out what to move. This is how the messages pause and resume from each board. Since everything is saved into the board as a save file, it resumes perfectly. Cause anything with stats is affected by the loop. Which means, yes, the "message" element has stats, and the only thing that's default is the number of cycles it lasts, and it runs at #cycle 1. I believe the default number is 12 cycles... but I could be wrong. I'll play around with it, and see what the number really is, later.

Long story short, yes. We should collaborate. xD

Oh... And I think I know what the unknown element 46 is, pointless as it may be. I think it's black on black text. It matches with the others quite well, after all, and, it could be used to make "hidden text", that appears if you put color on it. By the #change command perhaps. I'll have to think about that, too, though. Nonetheless, it seems pretty simple. ::shrug::

As a side note... maybe I'll just add stuff to my userpage on ZU, and go from there. =)
User avatar
Saxxon
the Gargoyle.
Posts: 608
Joined: Tue Jul 25, 2006 10:02 am
Contact:

Post by Saxxon »

Element 46 has all of the same properties as text (default char 0, etc) but it is not registered as a text element because the code itself checks only for elements above 46.

Every element is cycled from 0 to the max. Whether it moves or not is determined by (GameTick % Cycle) == (Index % Cycle) where Index is the number of the stat element and GameTick is a counter that is incremented by 1 each time all the stats are processed.

Player clones execute exactly the same code as the player. However, many functions within the game only check for, or work with, stat #0. (which is why clones can be shot and killed, while stat 0 player can not.)

The messenger is a stat that is created and destroyed as it is needed and resides at (0,0). That is not the upper-left corner of the board, which is actually (1,1). That is the upper-left tile in the BORDER of the board. It is not visible and it can't be interacted with. Because it is not within the board's boundaries, it is not saved with the file (which is why when you save, messages disappear.)

I have done extensive reverse engineering and have a lot of useful information, if you are interested.
User avatar
Quantum P.
Level 17 Accordion Thief
Posts: 1433
Joined: Fri Sep 12, 2003 1:41 am
Location: Edmonds, WA
Contact:

Post by Quantum P. »

One really important area for collaboration is documentation. There have been several attempts at backwards-compatible ZZT clones, and I'm sure everyone who tries learns a whole lot. But the information learned is scattered around instead of being in a central place.
Saxxon wrote:Because [the messenger] is not within the board's boundaries, it is not saved with the file (which is why when you save, messages disappear.)
Case in point: I did not know this! I knew about off-board stats and disappearing messages, but I never put two and two together.
EuphoriaZZTer
Pikachu Power!
Posts: 18
Joined: Wed Mar 16, 2005 4:23 am
Contact:

Post by EuphoriaZZTer »

Saxxon, I'm very interested. I looked at the thread for your "clone", and found it most interesting. Took a few notes that would be important, too. =)

Cycles work that way? Rather than running when (game_cycles % element_cycles) == 0? I think that would be easier, after all. It just goes down the entire list in a for loop, checking each element for each cycle. That's the way mine currently works:

C++:

Code: Select all

for (int ele = 1; ele <= num_board_objs; ele++) {
    boolean isTime = ((game_cycles % element_cycles) == 0);
    if (isTime) {
        //Do something with the stat object
    }
}
Euphoria:

Code: Select all

for ele = 1 to num_board_objs do
    integer isTime = 0
    if element_cycles != 0 then
        isTime = (remainder(game_cycles, element_cycles) = 0)
    end if
    if isTime then
        //Do something with the stat object
    end if
end for
The only error (In Euphoria) is when element_cycles = 0, but that's a simple if statement fix.

Messages, I already figured worked like that. At first I thought it had to be "on-screen", but then I figured "Well, it's never ever shown. So why bother?" So, yeah.

As for the way ZZT does boards... I have a strong feeling that the "whole screen" is defined in the internals as a "board", but the only saved parts (and only stat parts, other than messengers) are the elements from (1,1) to (60, 25) Nonetheless, it's not currently how my system works.

As for the player Clone info, that means my current idea about how ZZT works, player-wise, is partly incorrect. Though I'm absolutely certain when paused, the only movable stat object is the player... I also thought that this meant it moves the player normally when paused, and just ignores all other stat elements. Come to think of it, it seems you're right. 'Course, it'll be a minor change, but an important one.

And... By the way... According to windows CMD.EXE, when you copy the entire ZZT screen (With "Mark"), [EOB] is actually the '|' char. Just with FG and BG color the same. (0-8, each, meaning 0x00 - 0x88)

Also, there's one minor flaw. I may have to downgrade back to Euphoria 3.11, unless I can find a .dll that works for sound. Euphoria itself used to have a "sound" feature, that played sounds just like DOS does. But now, they've removed it. Because of this, I may have to include a C-library, or something to that effect to get it to run with sound. It wouldn't be all THAT hard, but it's the only thing that literally can't be pure euphoria anymore. If anyone has any ideas on good .DLLs to use, that would be great.

PS: An interesting side-note. At first, I had this "idea" to make everything with time-share tasks. Not threads, per-say, but time-share. It's the multi-tasking system in Euphoria. So, I started with that, but then realized it would take a lot more code to do everything in that way, and a lot of unnecessary parameters. I still feel simplicity is key, and so I moved to the "game loop" idea. No time-sharing used.

--Also, Quantum P. Maybe I should make a page on ZU about ZZT findings about it's inner workings. I have my own theories on my userpage, but you're right. A central location would be best.
User avatar
Commodore
fgsdfs
Posts: 2471
Joined: Wed Mar 12, 2003 5:44 pm
Location: :noitacoL
Contact:

Post by Commodore »

good conversation... I think I'm actually going to go use the program... ;)
*POW* *CLANK* *PING*
EuphoriaZZTer
Pikachu Power!
Posts: 18
Joined: Wed Mar 16, 2005 4:23 am
Contact:

Post by EuphoriaZZTer »

Short post this time. But... I had almost completely forgotten that I originally started by porting WeP's source of ZZT++ to Euphoria. Right now, everything is being done on my own, using the real ZZT as a guide. (Except the working parsers, which is mainly what the latest version I had saved, way back when, was. (And good thing, too. I never liked doing the parsers. They had SO many bugs to start with.))

In any case, back to coding. Right now I'm working on getting Messages to work with the new system (rather than being task-based). And I promise I'll give more updates as I go this time. xD I may look over WeP's source again before actually releasing the first beta.

And... the only thing I'm actually a bit worried about is ZZT-OOP. I understand it enough to be able to make it... but it's the most complex thing in ZZT. Because of this, I'll work on it last =P
User avatar
Saxxon
the Gargoyle.
Posts: 608
Joined: Tue Jul 25, 2006 10:02 am
Contact:

Post by Saxxon »

Cycles work that way? Rather than running when (game_cycles % element_cycles) == 0?
Yes. Because if the cycle is any higher than 1, the objects use staggered cycles. Create 3 objects at cycle 3 and make them loop code that causes them to move - you will see they do not move at the same time.

The hardest part of ZZT-OOP processing is rebuilding the in-game parser. It's broken down into a few parts:

* The main parser
* Code to peek the next character
* Code to read a word and move the instruction index
* Code to read a line and move the instruction index
* Code to read a number and move the instruction index

I won't go into very deep detail here, but you can check out Lyon's source code to get a good idea of how it works.
User avatar
Saxxon
the Gargoyle.
Posts: 608
Joined: Tue Jul 25, 2006 10:02 am
Contact:

Post by Saxxon »

Element property lists extracted from the executables can be found in this post: http://zzt.org/fora/viewtopic ... 5151#65151

I would post the links here, but the board errors out when I try to put the PasteBin links in.
Post Reply