How Can We Make MAME ROW Better?
-
@obsidianspider Oh God! I think I've got the always-looking-for-an-excuse-to-code disease!
I'm thinking about creating a dedicated github repository to put some tools that will help with the MAME ROW posting task...
I envision a script where you type
./mamerow 20
to get the post text for MAME ROW #20, and it automatically get the random numbers from random.org, check if some of the numbers is an already played game and get a new number if yes, prepare the poll at strawpoll, add the text and the previous rounds links, maybe the youtube videos too. Everything beautifully formatted with markdown and then we can just copy and paste here in the forum...Maybe this will be my next project when the things get calmer in my "real life". :-)
-
Just using this post as a rough requirements specification.
Sorry if it's too technical or a little off-topic. I just want to leave it here for future reference when I have time to work on it (nd maybe some of you can give suggestions).
-
it'll be a bash script.
-
random.org HTTP Interface Description is the doc where I can get instructions to get the random numbers from the script.
-
the mamerow_gamelist.txt needs two more fields, one for the MAME ROW "round" number and another for the retropie forum URL.
-
the
mamerow_gamelist.txt
needs to be updated when a game wins the poll, recording the round number and the URL. Critical: if other users will use the script to make the post, they'll need a github account to keep themamerow_gamelist.txt
up to date. Also, I need to discover how to make Pull Requests from script (useful info about it here). -
great care must be taken when manipulating the
mamerow_gamelist.txt
, it will be a critical file. The script must have a rigorous error checking scheme. -
poll creation at strawpoll can't be fully automated, but I think I can take advantage of the "Save draft" feature (should we change to another poll web service? I don't know any other).
usage examples
EDIT: The use will be through dialogs rather than command line arguments.
create a new post
./mamerow.sh --new
- Check
mamerow_gamelist.txt
looking for the last round before the new one. - get the 3 random numbers.
- check if some of the numbers is an already played game and get a new number if needed.
- prepare the poll at strawpoll (note: it can't be fully automated and can be a hindrance).
- add the "what is MAME ROW" text
- add links to the previous rounds (get the links from the
mamerow_gamelist.txt
). - if everything is fine, spit the markdown formatted text on the screen to let the user copy and paste on the retropie forum.
update
mamerow_gamelist.txt
with the winner game./mamerow.sh --update-gamelist ROUND_NUMBER GAME_NUMBER http://RETROPIE.FORUM/MAME_ROW/THREAD/URL
- assure that the local
mamerow_gamelist.txt
is synchronized with the github one. - get the last round number from
mamerow_gamelist.txt
, increments by one and record the respective GAME_NUMBER entry with the round number and the URL. - update the
mamerow_gamelist.txt
on github (note: how can I make pull requests from the script?).
show info about a previous round
./mamerow.sh --round NUMBER
- show the game name and the URL for the MAME ROW #NUMBER thread on retropie forum.
check gamelist integrity
./mamerow.sh --check-gamelist
Scan for errors in
mamerow_gamelist.txt
. Possible errors:- games with round numbers and no URL
- round numbers must be different and sequential (except the
0
, used for phoenix and nrallyx).
-
-
Hello, I'm no programmer, but would be nice to use "xlink Kia" with the retropie...Some how , would benefit the retropie, and give a leg up on the other OS....
Just my thoughts....Happy gaming
-
@obsidianspider
I'm not cured of my always-looking-for-an-excuse-to-code disease and am working on the "MAME ROW management" tool.I decided to make it operable through dialogs. Look how it's going (working flow to register the week's winner game):
Why invest time in a code that only one or two people will use?
BECAUSE PROGRAMMING IS FUN!!! :-) -
@meleu I'm not sure what this is doing?
-
@obsidianspider I want to automate the post generation. The script will automatically get the random numbers and check:
- this game was played before?
- this game is a mahjong?
To check if the game was played before, we need to keep the
mamerow_gamelist.txt
updated. And to avoid editing a not-human-friendly.csv
file, the updating will be made through those dialogs. There's a lot of error checking behind the cool dialog boxes. :-) -
@meleu You have much more free time than I do. Creating that post only takes a few minutes for me, but you're welcome to take it back when you're ready. :)
-
@obsidianspider Not exactly free time.
My job is to operate an industrial process. When the process is stable the automatism does everything alone and I just have to monitor. I can not play video games in the control room, but I can program and monitor the process at the same time (please, don't see me as a Homer Simpson at work!). :-)
-
-
@obsidianspider LOL. I'm saving this video link to post when people come here complaining about the runcommand's "Press a button to configure" message!!
-
@obsidianspider said in How Can We Make MAME ROW Better?:
Creating that post only takes a few minutes for me, but you're welcome to take it back when you're ready. :)
The first version is ready. If you have time, try it. Any feedback is welcome.
How to "install": go to the directory you want and then
git clone https://github.com/meleu/mame-row-management.git
Just execute and follow the instructions:
./mamerow.sh
Cheers!
-
@meleu said in How Can We Make MAME ROW Better?:
I tested it and it seems to work, though it may be a solution in search of a problem. It took me longer to do than my manual process, but maybe because I'm not used to using the tool yet.
Anyway, the post for MAME ROW #22 will be the one that was made using your tool and is now sitting on my computer waiting for Monday.
-
I was just looking at the script itself and it makes me want to get back into writing some code to improve my skills. Very nicely done. Also, what's this comment about "Create secret Raspberry Pi network and take over the world" about? #kidding ;)
-
@obsidianspider said in How Can We Make MAME ROW Better?:
it may be a solution in search of a problem.
My primary motivation to start work on this was the question "Can I edit comma-separated values files with shell scripts?". I'm satisfied with the results and learned a lot while writing this tool:
- how to get random numbers from random.org in a shell script.
- finally learned how to use the
dialog --form
. - a bunch of
grep
andsed
tricks. - etc...
-
@meleu Kind of like that screen on a cartridge add-on for my Super Famicom. It was more of a "can I do this" type of thing than it as a practical feature. When I'm playing I really only glance at it, it if that. I love figuring crap like that out and learning new skills, but I don't know that I'll get to your level of coding prowess any time soon.
-
When I tried to create MAME ROW #23 this week it didn't seem to have the data from MAME ROW 22 saved, so I'm going to head back to my manual post creation with the assistance of your initial lookup tool.
Thanks again for taking the time to make some scripts for the community.
-
@obsidianspider said in How Can We Make MAME ROW Better?:
it didn't seem to have the data from MAME ROW 22 saved
Did you update the gamelist with the MAME ROW 22 info and it wasn't saved?!
The path is "Manage MAME ROW gamelist" >> "Update gamelist with a new round information". Screenshots below:
-
@meleu I'll test it again some time. I've been busy this week working on my Gameboy Advance project and I still have a bit of a cold. Thanks.
-
In 2 weeks MAME ROW completes one year of existence.
Do you guys have some suggestion for something special for MAME ROW #52?
One idea I had:
- Go to the MAME ROW forum category.
- On the top right of the page click on "Sort by" and choose "Most posts".
- Ignore the sticky post and get the games of the top 5. Currently they are:
- Pac'n'Pal
- Phoenix
- Frenzy
- Joust
- Aliens
- Make a strawpoll with the top 5.
What do you think?
tagging some MAME ROW players: @obsidianspider @UDb23 @GtBFilms @backstander @dankcushions @mediamogul @qix77 @lilbud @Fruitybit @Lyle_JP @pjft @mholsson @buddyscott @MrJordaaany @AndersHP @chubsta @itsnitro @Cole_48 @R1n0X @Brigane @edmaul69
-
@meleu I was thinking about something along the lines of an actual bracketed tournament, possibly using those 5 games.
We set up a poll as you suggested, and the game with the most votes will be the 1 used for a single elimination tournament.
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.