One time, I wanted to see if there was a way to create Robtic code through completely in-game methods (read: input string). ?Of course, just typing in &input& doesn't work; even if imported from text, the line gets converted to an & statement by MZX's built-in text program.
So, to circumvent this, I got out a hex editor and altered the line. ?Even when correctly altered, that ended up not working, and caused syntax errors. o_O
*sighs* (nar) Oh well. ?It could have been useful for a robot-vs-robot simulation. ?Start out with small AI and limited parts, and move up to the big leagues! (Or just control it yourself)
~Terryn
EDIT: When I meant syntax errors, that was only when one looked at the Robotic in the editor. I didn't get any runtime errors.
Page 1 of 1
Too bad this didn't work.
#1
Posted 15 October 2001 - 05:02 AM
angelic stream - shed sanguine - ill-adapt - avis - para/lyser - renaissance - dead tangent - phosphene blur - birth breeds death - ________ - painted glass - lagniappe
<Exophase> HES STEALING MAH AIRSHIP!!!!!!11111111
<Exophase> HES STEALING MAH AIRSHIP!!!!!!11111111
#2
Posted 16 October 2001 - 02:39 PM
You might be able to have it break down the input word by word, and you could a ton of labels, each with a different command based on the input. You could then record all of the commands entered by a counter that has a different value for each command. You then tell it to run, and it goes to each of the commands recorded and execute them. Tada!
The Nanobox, where wings take dreams...
#3
Posted 17 October 2001 - 12:44 PM
The reason why this doen't work is simple: Mzx doesn't store the text of the robotic program. Instead, it stores the program using some sort of byte code. Thus, the in game interpreter simply can't read the words making up the command (only the editor does that), it can only read byte code!
#4
Posted 17 October 2001 - 06:58 PM
Quote from Nanobot, posted on Oct. 16 2001,09:39Quote:
You might be able to have it break down the input word by word, and you could a ton of labels, each with a different command based on the input. You could then record all of the commands entered by a counter that has a different value for each command. You then tell it to run, and it goes to each of the commands recorded and execute them. Tada![/quote]
*sigh* ?I realized that method, but there's three good reasons I wanted to stray far away from it (and a fourth fair reason):
1) There's only 60.3K of mem on a board. ?That's not enough to _fully_ emulate this. ?Of course, one can come close, but this method has memory limitations.
2) That's pretty slow for all but the highest-priority commands.
3) Implementing the rel statements under this system would be nigh-impossible, as they only last till the next command.
4) I didn't want to sit down and prioritize the 230 MZX commands (ignoring #231, "." statements). ?Some of these commands have many sub branches (especially the IF statements) that also need prioritizing under this method, like conditions. ?Even a lowly "/" statement has sub branches.
Because this above function is severely crippled, I optimisticly (read: foolishly) tried to get it to work my first way. ?Oh well.
~Terryn
*sigh* ?I realized that method, but there's three good reasons I wanted to stray far away from it (and a fourth fair reason):
1) There's only 60.3K of mem on a board. ?That's not enough to _fully_ emulate this. ?Of course, one can come close, but this method has memory limitations.
2) That's pretty slow for all but the highest-priority commands.
3) Implementing the rel statements under this system would be nigh-impossible, as they only last till the next command.
4) I didn't want to sit down and prioritize the 230 MZX commands (ignoring #231, "." statements). ?Some of these commands have many sub branches (especially the IF statements) that also need prioritizing under this method, like conditions. ?Even a lowly "/" statement has sub branches.
Because this above function is severely crippled, I optimisticly (read: foolishly) tried to get it to work my first way. ?Oh well.
~Terryn
angelic stream - shed sanguine - ill-adapt - avis - para/lyser - renaissance - dead tangent - phosphene blur - birth breeds death - ________ - painted glass - lagniappe
<Exophase> HES STEALING MAH AIRSHIP!!!!!!11111111
<Exophase> HES STEALING MAH AIRSHIP!!!!!!11111111
#5
Posted 05 December 2001 - 12:36 AM
Well, you could always work on making a very weak form of Robotic. And instead of incorporating the &INPUT& idea, try making it so that you could type it in using the KEY labels. The only problem is that you can't hit enter when done. So you would have to use the mouse for that part.
/>
Anyway, it would probably only be useful as a tutorial or introduction to MegaZeux programming. But, it would be a good one, considering you could include instructions along with it to help the user learn the language.
You could also use it to make your own programming language that would then convert it into Robotic code for you to copy down for use. IE a BASIC language that compiles into Robotic (in such a way that it runs as fast as possible)
Anyway, it would probably only be useful as a tutorial or introduction to MegaZeux programming. But, it would be a good one, considering you could include instructions along with it to help the user learn the language.
You could also use it to make your own programming language that would then convert it into Robotic code for you to copy down for use. IE a BASIC language that compiles into Robotic (in such a way that it runs as fast as possible)
#6
Posted 18 February 2002 - 11:56 PM
Frobozz. That has already been done. get robot-c from the antiarchive.
#7
Posted 19 February 2002 - 03:34 AM
Yeah, that would have been cool. Despite what Akwende says, Megazeux DOES have limits.
drupe/cyan
#8
Posted 19 February 2002 - 03:40 AM
Its almost 3 months old now. Dont drag up old topics
Retired Admin, DMZX Co-Founder
Share this topic:
Page 1 of 1

Help
This topic is locked








