dMZX Forums: Too bad this didn't work. - dMZX Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

Too bad this didn't work.

#1 User is offline   Terryn 

  • ******
  • Group: DigiStaff
  • Posts: 2,960
  • Joined: 12-October 00
  • Gender:Male

Posted 15 October 2001 - 05:02 AM

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.
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
0

#2 User is offline   Nanobot 

  • It's in your blood
  • PipPipPipPipPip
  • Group: Members
  • Posts: 1,623
  • Joined: 11-October 00
  • Gender:Male
  • Location:Chico, CA (USA)

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...
0

#3 User is offline   MadBrain 

  • Art will make you a hobo.
  • PipPipPipPip
  • Group: Members
  • Posts: 617
  • Joined: 17-February 01
  • Gender:Male

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!
0

#4 User is offline   Terryn 

  • ******
  • Group: DigiStaff
  • Posts: 2,960
  • Joined: 12-October 00
  • Gender:Male

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
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
0

#5 User is offline   Frobozz 

  • Ryiah
  • PipPipPipPipPip
  • Group: Members
  • Posts: 1,808
  • Joined: 07-March 01
  • Gender:Not Telling

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. :eyes:/>

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)
0

#6 User is offline   apage43 

  • Veteran Member
  • PipPipPipPipPip
  • Group: Members
  • Posts: 1,199
  • Joined: 13-November 00
  • Gender:Male

Posted 18 February 2002 - 11:56 PM

Frobozz. That has already been done. get robot-c from the antiarchive.
0

#7 User is offline   gofer-chan 

  • Veteran Member
  • PipPipPipPipPip
  • Group: Members
  • Posts: 2,380
  • Joined: 27-October 01
  • Gender:Male
  • Location:The Next World or England whatever

Post icon  Posted 19 February 2002 - 03:34 AM

Yeah, that would have been cool. Despite what Akwende says, Megazeux DOES have limits.
drupe/cyan
0

#8 User is offline   Maverick 

  • Batsu Certified
  • Group: DigiStaff
  • Posts: 1,593
  • Joined: 03-August 00
  • Gender:Male
  • Location:Oklahoma, USA

Posted 19 February 2002 - 03:40 AM

Its almost 3 months old now. Dont drag up old topics :asthanos:
Retired Admin, DMZX Co-Founder
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users