Explore the unix philosophy #41
Comments
I've read more about the "unix philosophy" and I think it might be a good way to take things. The api was getting too complicated, and I think this is the way to keep complexity down while pursuing #19. ExampleLet's say that we have the program
All
The only thing Then, when we want to make this back into a rom, we run a program called
As for any binary data, we could do something like this:
And then |
Also, #21 becomes trivial. All we have to do is write a GUI that gives you a list of all "consumers" inside same folder, and then the user can just list what they want to happen to the rom:
This UI will, in theory, never have to be updated, as the logic of randomizing is all done by the underlying programs. When the user wants to update, they just download the new versions of the randomizer programs and throw it in the folder. The UI could even do this for the user. |
The only thing that I need to decide on is the format. I realize that the format I mentioned above might actually not work out, as we have arrays of arrays data sometimes (zones, where each zone has wild pokemons). I'll list some formats here as I look more into this: |
Hmmm, or maybe we should just give up on the line-oriented format, as our data is highly structured. We could probably do a json streaming format. |
@tgschultz had this to say on the Zig IRC:
The only benefit of a binary format is that we don't have to parse the input (some serialization and deserialization will always be needed). Here are the things that a text format would allow:
|
Here's another format that I dreamed up:
Pros:
Cons:
|
I don't think parsing is gonna be a big deal. Here are 3 shell scripts and their times: #sed1.sh
cat test.t \
| sed 's/pokemons\[\([0-9]*\)\]\.attack.*/pokemons[\1].attack = 2/' \
> /dev/null #sed2.sh
cat test.t \
| sed 's/pokemons\[\([0-9]*\)\]\.attack.*/pokemons[\1].attack = 2/' \
| sed 's/pokemons\[\([0-9]*\)\]\.defense.*/pokemons[\1].defense = 3/' \
> /dev/null #sed3.sh
cat test.t \
| sed 's/pokemons\[\([0-9]*\)\]\.attack.*/pokemons[\1].attack = 2/' \
| sed 's/pokemons\[\([0-9]*\)\]\.defense.*/pokemons[\1].defense = 3/' \
| sed 's/pokemons\[\([0-9]*\)\]\.sp_attack.*/pokemons[\1].sp_attack = 4/' \
> /dev/null
The |
Started the effort. New repos are gonna be located at https://github.com/TM35-Metronome |
It could be cool, if we could somehow have a bunch of smaller tools that we could pipe together to randomize (or just modify) a Pokémon rom:
The idea here is, that all roms have a lot in common in terms of data, so we could have our own IR of what a Pokemon game looks like, that we could then load and reapply to roms:
We then just pipe this IR between programs to modify roms.
Pros
Cons
Challenges
The text was updated successfully, but these errors were encountered: