Settings

Theme

Dungeonfs: A FUSE filesystem and dungeon crawling adventure game engine

github.com

240 points by davecardwell 9 years ago · 46 comments

Reader

johnfn 9 years ago

When I was back in elementary school, a friend thought up this brilliant idea that we called "foldermazes", which were basically choose your own adventure games, but the way you chose your adventure was by selecting which folder to go down. I was and still am fascinated by just how brilliant of an idea it was!

Of course there were problems. One that I recall was that I didn't want to have to maintain k^n separate branches of story, so I'd prune off incorrect branches quickly by having your character die or something. :)

We hit the maximum depth for folders very quickly, so I came up with the idea of having a routing table at the base, which was just a single folder with folders labeled 1-10000 inside it. The idea was that you'd get to maximum depth, and then get a number to go into the routing table and continue the adventure. The hope was that there were so many folders within the routing table that it'd be impossible to guess a correct path by chance. (And of course, all the invalid folders had a message like "stop trying to cheat, you cheater! YOUR CHARACTER DIES INSTANTLY!" Remember... 5th grade. :))

I remember working frantically on a "foldermaze" at home for hours, then attempting to put it on a floppy disk. Turns out that is not the sort of operation Windows 95 was optimized for at all - it took hours. (The maze had tens of thousands of folders, most inside the routing table.) Then after a certain point it just failed with "disk full". This really stumped me as a 5th grader. How could the disk be full? Inspecting the properties of my foldermaze showed that it took up 0MB! Far less than the 1.44MB offered by the floppy...

Eventually I pieced together that folders must take up some marginal amount of space more than 0. The property inspector was lying to me! That was very surprising as a kid.

Anyways, this seems like what we did, but way more cool. :)

  • jstanley 9 years ago

    > One that I recall was that I didn't want to have to maintain k^n separate branches of story, so I'd prune off incorrect branches quickly

    You could always merge storylines later on by symlinking them to the same place!

    (Maybe not on Windows).

    • x1798DE 9 years ago

      > You could always merge storylines later on by symlinking them to the same place!

      > (Maybe not on Windows).

      Windows has "shortcuts", which should work if there is some problem with symbolic links.

      • chapium 9 years ago

        Symlinks at commandline work in vista or later. It is a different program however.

        • dpcx 9 years ago

          Symlinks were a thing in the NT days; you just had to use a downloadable tool from Microsoft. Googling doesn't seem to provide much information any longer, unfortunately.

          • kbenson 9 years ago

            I remember is was added, or at least announced, between late 1999 andr early 2001. Or maybe that was mounting a disk at a location instead of a letter. I just remember there was a fair amount of ridicule that it took so long for a simple feature that had existed for so long in Linux (and every UNIX) already, but both those fit the bill...

  • chapium 9 years ago

    As silly as this idea sounds you could use this concept to create a commandline tutorial. The folders can contain clues.

Jemaclus 9 years ago

I'm building a MUD in Go right now, so this is pretty timely. Really creative take on the genre!

  • peckrob 9 years ago

    I was literally JUST thinking about doing this today! Although I was thinking I would only do the actual core (connection handling, database, etc) in Go, and do much of the actual game programming in Lua so that players could extend the game.

    • Jemaclus 9 years ago

      That's a good idea! I'm not even remotely sure how to do that. I tackled this project as a way to really dig in and learn Go, and I'm still working my way through it. I'm slowly learning more idiomatic ways of writing Go, but I'm not even sure how I'd go about extending the game with Lua or anything else. Got any resources on that kind of thing, or could you give a high-level description of how that might work, so I can explore the possibility?

      I definitely need some scripting ability. For example, it would be nice if I could script mobs to perform certain actions during quests, something that I'd have to hard-code in Go right now.

  • Diederich 9 years ago

    Cool! What kind of MUD, if you don't me asking?

    • Jemaclus 9 years ago

      It's a Merc/Diku inspired version. The codebase is written in Go, and the data is stored in JSON files. I'll open source it, eventually. It's feature-complete, I just need to get some bare-bones data in there (like starting areas, items, mobs, etc). Maybe in another month or two. :)

      • nugget 9 years ago

        You could allow (trusted) players to customize rooms and objects with an in-world accessible Lua layer similar to how LPMUDs used LPC. That would be pretty cool. MUDs taught me how to write creatively, but not how to code; in the future they could do both.

        • Diederich 9 years ago

          I was already a fairly creative writer when I got into MUDs, but my coding skills were weak and pretty disorganized. Programming a DIKU MUD back in the early 90s that people actually used and enjoyed required me to step up my focus and skills, which got me ready to enter the tech industry proper in the mid 90s.

          In-world Lua is a great idea. All of the core MUD programming back then was, of course, written in C, but player (and admin) scripting was done with an embedded Perl interpreter.

          • Jemaclus 9 years ago

            Same! A MUD is one of the first things I learned to code with C when I was in college.

        • Jemaclus 9 years ago

          Sounds awesome! I do have some built in methods to instantiate mobs, objects, and rooms, then save them to disk, but they're pretty basic and don't allow more advanced things like scripting events or locking doors and things like that.

      • Diederich 9 years ago

        Well, I'm pretty stoked to hear that! What does 'feature complete' mean? Like, 'MVP' sort of thing? MUDs and friends tend to have a never-end, never 'complete' feature set. (:

        • Jemaclus 9 years ago

          Well, I mean that you can technically play the game. You can register, log in, walk around, pick up items, drop items, wear items, wield items, practice, train, fight, die, cast spells, use skills, do socials, check your stats, check your score, check your inventory, open/close/lock/pick doors, join groups, chat, send notes, etc, etc.

          You're right that it's never really done, but my theoretical goal is basically a bare-bones MUD written in Go that anyone else could pick up and turn into a fully featured one. More practically, I'll probably just make a couple dozen areas and stick it on a server and see if anyone wants to play before I spend too much more time on it.

Daviey 9 years ago

Reminds me of a cross between Zork Shell (not zsh): https://groups.google.com/forum/#!topic/alt.folklore.compute...

And a game called "Virus!" on the Amiga in the early 1990's, which I haven't been able to track down.

imode 9 years ago

this is so awesome!

you could turn this into a MUD by just letting people in via SSH. if you supported auto-reloading your YAML files during play (or just keeping track of loaded files), you could support online creation!

I'm fascinated.

stuaxo 9 years ago

I love the idea of soundfx by aplay, this would be such a layering violation in any other fs, its delicious.

LeonB 9 years ago

I made a folder based hangman game back in 2012. http://secretgeek.net/folderGame

monk_e_boy 9 years ago

What twisted mind thought of this?!

KC8ZKF 9 years ago

Has anybody made adventure in git?

kdazzle 9 years ago

This is awesome - the file/folder metaphor for data has always been pretty boring

ksherlock 9 years ago

dunnet (emacs) exposed the world via a filesystem, too.

nabla9 9 years ago

    find . -name "sword"
xg15 9 years ago

So what happens if I run grep -R?

appden 9 years ago

Pure genius.

fiatjaf 9 years ago

Pure genius.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection