MightyPirates / TIS-3D

TIS-100 inspired low-tech computing in Minecraft.
https://www.curseforge.com/minecraft/mc-mods/tis-3d
Other
108 stars 35 forks source link

Memory editor GUI #59

Closed thecodewarrior closed 6 years ago

thecodewarrior commented 7 years ago

Another random feature that may not fit your vision for the mod, but it was fun to implement.

I've added a GUI for both the RAM and ROM modules to edit them without having to go through setting them all with an execution module. It's pretty simple, just click a cell to select it, and start typing the hex value for that cell. You can press delete/backspace to reset a cell to 0, and navigate through the cells with up/down/left/right or HJKL. 'Cause I gotta have my vim keys. :D

It will sync with the server, and doesn't pause the game, so you can see in real time as the memory is written, and adjust it if you're quick enough.

https://gyazo.com/a0e3dc8e83aeeee82fde84a61c0cc085

The GUI appearance is WIP. I'm not the greatest at textures, but IMO it doesn't look bad. I'm replacing all the 0s in the output with Os because they look clearer when there's only numbers.

I'm open to any suggestions on how to make it fit better with the mod or look better. :)

fnuecke commented 7 years ago

Hohum. I can see the appeal as a debug item, I'd like to keep it creative-only though. I'd much prefer having the standard way to use some tinkering (it's one of the main reasons I added the terminal module).

thecodewarrior commented 7 years ago

I just found that the lack of a memory editor (especially for ROM) made me not use it. I could have used it, but I didn't want to make a whole contraption just to program the rom.

fnuecke commented 7 years ago

Here's an idea, make it so it's just for the ROM, and so that it works only on the item -- i.e. when holding the ROM in hand and you use it (on air, you know, like books open, just to be clear) the UI opens allowing you to change its contents. Also avoids having to add more items. I'd be fine with that.

fnuecke commented 6 years ago

Merged in 3970a2bdea15ef8f0bafd77edbd75c9646d80239, changed it to operate on ROM modules held in hand (i.e. not on installed ones) because I still like that better. Thanks for the base implementation though!