Tom and I were happy to announce the first 57N Stupid Shit No One Needs Hackathon last week. I maintain he forced me to send the email, but I kind of enjoyed adding my stuff to it.
It turned out to be a really cool weekend of creating for the sake of creating, which I've not done for aaaaaaages.
I wanted to make a BBS door game to tie into my mysterious BBS project, so I made FuelSim - the dynamic, exciting game which places you into the mysterious, unexplored world of an Andorran fuel station.
What is Captain Rondo's past? Why is a retired pirate running a fuel station in Andorra? Will we ever find out?
(Ans: sells biscuits, idk, no)
FuelSim was written in python, with curses providing the excellent user interface:
The code is BSD 3 clause and available at gitlab (Never look at the code, it's terrible) (No, really - it's awful. I'm not a programmer, remember?). Play it, have a laugh, forget it existed.
The game's logic is pretty simple. Roll a dice, if the value is greater than a preset threshold, the “customer” “comes in” to the first available “pump” and over the next 3 turns goes through a series of actions which require user input in the form of “push butan to advance”.
Gameplay isn't compelling, this I will admit.
I hit a couple of snags along the way, which I'll document as I'd like to understand them later.
- First off: passing arguments to functions. I wanted to pass the turn counter around the program, but after getting a couple deep the integer lost its type. It kept the value, just not the type. In frustration, I globalled some lists and the turn counter to make coding easier so I could have a working demo.
- Second: Catching keypresses properly. I struggled to implement a “hit q for quit” which is pretty embarrassing. The only way to exit is ctrl-c, and that isn't pretty.
- No BBS provides a terminal that supports curses. It's never going to be a door game in the current format :'(
I can't remember anything else for the moment, but I'm sure I'll come up with some other stuff.
Easy issues to fix are
- The curses default screen not being refreshed, only the pump and control text windows. This means if the user changes terminal size, the game no longer looks sensible. I discovered and worked out the solution at demotime, which I think everyone enjoyed watching.
- The game's existence.
rm -rf /is my recommended solution once you've played it.
- The biting commentary on the current state of
If I can work out my niggling issues, I might expand it or I might not. I'm tempted to rewrite the core game code and actually turn it into a BBS door with a leaderboard - Synchronet should be able to execute the python, but it wasn't setting $TERM to something curses liked. ANSI should do it nicely!
The other projects were great:
- irl's Write Only Memory as a Service
- neiljp's Internet of Dings
- [tj]‘s string ‘n’ cup telegraph system
- Ed's real-world facebook-style thumb-upper.
- Doc's Bitter - taking positive tweets and making them negative
Let's do it again next year.