Page 1 of 1

OOP

Posted: Thu Oct 14, 2004 12:23 am
by Hayabusa
Is Megazuex's Programming language dramatically different from ZZT- I know it seems like a retarded question but I haven't looked into it and am wondering if I'll have to learn new commands.

Posted: Thu Oct 14, 2004 1:37 am
by Ando
You'll have to learn quite a few. Robotic is in the same format as ZZT-OOP, but it has more complicated things such as arithmetic (well, more so than ZZT-OOP) and other things. You can do a lot more with Robotic than you can with ZZT-OOP, though. Although it's not as easy to learn.

Posted: Thu Oct 14, 2004 2:28 am
by Hayabusa
I guess this would be a better question- Would zzt-oop work in MZX?

like

@badguy
#cycle 1
:loop
#go seek
#shoot seek
#loop

Posted: Thu Oct 14, 2004 3:07 am
by Ando
No, I don't think it would. They use different symbols for the beginning of the commands, and you would have to use "wait" instead of "cycle". I think.

Posted: Thu Oct 14, 2004 3:33 am
by Hayabusa
Ah ok Thanks man- I guess I'll just be reading the tutorials then...

Posted: Thu Oct 14, 2004 6:04 am
by Alexis Janson
Plenty of ZZT commands _do_ work in MZX though, so long as you don't use the # in front of the command name. A couple differences to note, though:

1. Movement commands require a number or counter after them. For example, "go seek 5" is used instead of "#go seek".
2. There isn't really an equivilant for @, since in MZX the name of the robot is entered outside of the usual command window.
3. While the usual /i idle commands still work, it's probably a better idea to use "wait #", which will idle for the number of cycles you enter. It's a lot neater than having a line full of /i's.
4. Counters are used instead of flags. When you want to set something, you'd use "set counter to #" instead of "#set flag". This way, a single counter can be modified to change a value instead of having to make up different flags to represent different values of the same thing. If statements are slightly different to reflect this as well; "if counter = 5 then label" is used as opposed to "#if flag then label".
5. Using #label as a shorthand for #goto label doesn't work in MZX. You have to use simply "goto label".
6. To display a message, use either * or [ in front instead of simply just typing it. * before a message means that MZX will try to make the message flash at the bottom of the screen, and [ is used to make a dialogue box open up. There are a couple other ones that are used too but I'm tired and can't remember them all right now. :(

That should cover most of the simple differences. If you already know ZZT, MZX isn't too much more difficult to learn.

Posted: Thu Oct 14, 2004 11:27 am
by Zenith Nadir
i probably should try learning robotic myself

i know some basic commands but so far i've just been scribbling in it since the port came out

fungahhh knows what i'm talkin' about