Flappy Dird: Flappy Bird Implemented in MacOS Finder
eieio.games
eieio.games
I absolutely love seeing projects that people put together on a weekend just to challenge themselves and see if something is possible. This is an amazing feat, thoroughly enjoyed the write up.
Kudos to the author.
I actually much prefer this.
V cool to get two super helpful AppleScript comments in 5 minutes!
https://github.com/hhas/appscript/tree/master/py-appscript
I’ve only ever used the Ruby version of Appscript to be honest, but if the Python version works the same way it would seem to be ideal and would obviate the need for AppleScript entirely.
- Fontemon: a game in a font https://www.coderelay.io/fontemon.html
- Dungeons & Directories: a text adventure in your file browser https://wheybags.com/dungeons_and_directories/ (disclaimer: I made this one)
I actually played a bit with font games and wrote Hexagone[1] to see what writing a font was like. I didn’t leave the experience that sure what game to build so it’s fun to have some inspiration.
[1] http://eieio.games/nonsense/hexagone-converting-hex-to-rgb-w...
Of course if we all did, then nothing would ever get done because we could always do better. Sometimes you need someone to say "this is good enough".
I think it's easier to stay on the "we can do better" track when working on a hobby project like this. At work I'm typically thinking about whether a marginal day spent polishing something is worth more than all the other stuff that we want to do.
But with Flappy Dird I knew that I wanted to push until I was either happy with the project or didn't believe that I could push the game any more.
(On an entirely unrelated note, the capitalization "MacOS Finder" made me think first that this was an extension for MacOS 8 or 9, but this is a lot more delightful...)
Then run the script, it reads the position of folders from the DS_Store file, updates it with the new positions of the next frame of folders, or creates/delete folders if needed.
My first implementation was using my first Mac's speech recognition to implement an interactive chistmas calendar, btw. So this was a nice reminder of that.
Thanks for sharing!
When I read the title, I expected it to use folder actions (https://developer.apple.com/library/archive/documentation/La...) to obtain user input.
That, IMHO, would be slightly more “implemented in MacOS Finder”
It might be too slow but you could, for example, have the user drag a window around as the game controller, and have the main game loop create a file in a directory to trigger a folder action that runs the main game loop again.
Also, can’t you avoid the AppleScript startup problem with a stay-open AppleScript that you send events?
(no idea if that’s enough to look ok)
“ Using AppleScriptObjC, your AppleScript code can work with any Cocoa framework, and can function as a first-class citizen in the Cocoa world.”
It’s been a long time since I had to, but you could but all your code into a single app, if you could port the python to ObjC.
Now i wonder, is there any way to react to arrow keys being pressed, or does finder allow you to use wasd to jump to specific files starting with those letters and react to that? That would extend the possibilities of games run in finder, and if you choose a game that only updates when pressing buttons, like rouge, you wouldn't even have to worry about the fps limit.
[0]: https://www.youtube.com/playlist?list=PLsTVaNk5lQHmRy51gyAsV...
> ...Everyone's just too dumbfounded to comment
So true.