Hello.
I have been playing many different MZX games to get an idea of what this system is capable of doing and to see what others are doing with it. I have seen some very cool things and learned a lot along the way and am very thankful for all of the amazing games out there for this system!
That said, a few of the games I am most interested in "peeking under the hood" at seem to import their robots into the game via a PUT command and a robots.mzm type system - I am unsure if this is being done for convenience or if it is intentionally done to make it harder to look at the code of their robots.
I am not interested in stealing the work of anyone but I do feel that if I could at least see how some of these robots in question are being used/coded I could learn from them.
When I attempt to import then MZMs into my own new blank boards I get an error and they simply import as CustomBlock blocks and not robots!
Is there a way to view this code? I attempted to open some MZMs in Notepad, Notepad++, and a few other editors and am able to see some of the text/code but the majority of it is garbled - any thoughts, ideas or suggestions?
Thanks!
Page 1 of 1
How to view code on robots within an MZM?
#2
Posted 17 March 2016 - 09:08 AM
This is not easy to do. Since you can't load the old format MZMs in the editor, the other thing you could try is putting them on the board in robotic and then exporting them as modern format MZMs, which you should then be able to load in the editor just fine. For example, with robot and player safely in the top row of the board:
Then try looking at temp.mzm.
Another way, which I actually used myself when I was creating a patch for Taoyarin a while back, was to put the MZM on the board, then export all the robots individually. With a 'robots' directory created:
It's messy, but this is messy no matter what- and it is kind of sad because one of the best things about MegaZeux is editing other MZX games and looking at how things were done - it's certainly how I learned MegaZeux - but I guess as games invoke fancier features this becomes harder to do. I dread the thought of what anyone who wants to go through & will experience =P (Celestial Altar is pretty bad too, for other reasons)
put "@robots.mzm" image_file p00 0 1 copy block 0 1 100 100 "@temp.mzm" 0
Then try looking at temp.mzm.
Another way, which I actually used myself when I was creating a patch for Taoyarin a while back, was to put the MZM on the board, then export all the robots individually. With a 'robots' directory created:
set "commands" to "(-1>>1)"
put "@robots.mzm" Image_file p00 at 0 1
loop start
if "(('loopcount'!='robot_id')a('loopcount'!=0))" = 1 then "#export"
loop for 255
end
: "#export"
set "robots/&loopcount&.txt" to "save_robot&loopcount&"
goto "#return"It's messy, but this is messy no matter what- and it is kind of sad because one of the best things about MegaZeux is editing other MZX games and looking at how things were done - it's certainly how I learned MegaZeux - but I guess as games invoke fancier features this becomes harder to do. I dread the thought of what anyone who wants to go through & will experience =P (Celestial Altar is pretty bad too, for other reasons)

<Malwyn> Yes, yes. Don't worry I'd rather masturbate with broken glass than ask you for help again. :(
#3
Posted 17 March 2016 - 01:49 PM
The reason a lot of games do this is because they can have one board where the engines live and are exported from there, and then on each board a small one-line helper robot can load the whole string (usually a 20x1 or so) of Robots.
One of the best things about MZX is to be able to program at the Robot level, and once the Global robot begins to approach the point where it's doing heavy multitasking, the language sort of becomes unwieldy if not unsuitable.
One of the best things about MZX is to be able to program at the Robot level, and once the Global robot begins to approach the point where it's doing heavy multitasking, the language sort of becomes unwieldy if not unsuitable.
Need a dispenser here.
#4
Posted 17 March 2016 - 03:07 PM
Thank you both for the prompt and informative replies!
Dr Lancer-X, your first suggestion worked perfectly and I plan to attempt the second one as a learning experience.
CJA, your game(s) and some of the weapons engines are the ones I was hoping to gain a better peek at. (I did, after posting, find the Engines boards so my question was null and void but at least I learned from asking it!)
I am creating MZX games with my sons (4 and 7) as part of their homeschooling and they're getting pretty particular on exactly how they want the ninja throwing star/shuriken weapon we're working on to work ... lots of learning, lots of fun, lots of hair pulling.
Thanks again for the reply!
Dr Lancer-X, your first suggestion worked perfectly and I plan to attempt the second one as a learning experience.
CJA, your game(s) and some of the weapons engines are the ones I was hoping to gain a better peek at. (I did, after posting, find the Engines boards so my question was null and void but at least I learned from asking it!)
I am creating MZX games with my sons (4 and 7) as part of their homeschooling and they're getting pretty particular on exactly how they want the ninja throwing star/shuriken weapon we're working on to work ... lots of learning, lots of fun, lots of hair pulling.
Thanks again for the reply!
Share this topic:
Page 1 of 1

Help





