Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1410642 Posts in 69557 Topics- by 58554 Members - Latest Member: maruya328

September 08, 2024, 06:14:54 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsCommunityDevLogsDirectory Dungeon - File Explorer Dungeon Crawler
Pages: [1]
Print
Author Topic: Directory Dungeon - File Explorer Dungeon Crawler  (Read 302 times)
JuhrJuhr
Level 0
**



View Profile WWW
« on: September 01, 2024, 09:14:40 AM »

Hello!
I've been working on this game on and off for a while now since I saw this implementation of Flappy Bird in the mac Finder (https://github.com/nolenroyalty/flappy-dird) and thought it'd be fun to do something similar.

The game
It's a little dungeon crawler that plays in the windows file explorer. A console window runs to the side to keep track of things and give a log of events. Think of the files and folders as the playing pieces, and the console windows as the DM keeping track of everything.

How it works
The game generates an initial set of files and folders, then watches for any changes within those. When anything is created, moved, deleted, or renamed, the game attempts to interpret that as a game action. For example, the player can drag and drop the folder which represents their character into another folder which represents a new room, the game will notice this, update its state, and generate the contents of the new room.

What it looks like
Here's a clip of a new game starting. The player looks in an adjacent room (by going through the folder shortcut to that room) and sees that it's unexplored. Then they move their character into that room by dragging and dropping the character folder into the adjacent room. Once inside the room you can see that the contents have been generated; some cabbages and doors to other rooms. The player then eats the cabbages (by deleting their files), losing health to the putrid cabbage and gaining health from the fresh cabbage.


Progress
The bulk of the work has been getting the file system interactions working properly, making sure nothing unexpected surprises the game and crashes it. It's been pretty interesting messing around with it and seeing what I can actually get to work (I found that renaming a folder programmatically could lead to two folders appearing, one with the old name and one with the new name. To get around this I had to give the explorer a little nudge to tell it to refresh itself).
Next I'll be adding stuff to actually do. Combat is already in, but monster population is not, so that's next.

Other games
This isn't a completely novel idea, there have been a few similar projects in the past. There's Dungeons and Directories (https://wheybags.com/dungeons_and_directories/) which is a text adventure in the file explorer (and beat everyone else to the best name), and Folder Dungeon (https://ravernt.itch.io/folder-dungeon) which creates its own file explorer!

Name
I currently don't have a decent name, so suggestions are welcome.
« Last Edit: September 05, 2024, 05:03:23 AM by JuhrJuhr » Logged

Rogod
Level 3
***



View Profile WWW
« Reply #1 on: September 01, 2024, 10:23:03 AM »

I admire the ingenuity, but oof, that's a sure fire way to wear out a hard drive lol

From Google: "The number of times a storage cell in an SSD can be written to is usually between 3,000 and 100,000 times."

I'd suggest playing this on a spinning-platter hard drive, as there is apparently no such limitation with magnetic storage.
Logged

JuhrJuhr
Level 0
**



View Profile WWW
« Reply #2 on: September 01, 2024, 10:47:24 AM »

I admire the ingenuity, but oof, that's a sure fire way to wear out a hard drive lol

From Google: "The number of times a storage cell in an SSD can be written to is usually between 3,000 and 100,000 times."

I'd suggest playing this on a spinning-platter hard drive, as there is apparently no such limitation with magnetic storage.

The actual number of file operations is very small, the game doesn't read/write contents of files, for example. Combine that with the expected play time of less than 30 minutes and the effect will be negligible.
Logged

JuhrJuhr
Level 0
**



View Profile WWW
« Reply #3 on: September 05, 2024, 05:07:36 AM »

Graphics, Equipment, and Combat!

Hello!
Since last time I've added a few cool things to the game, all of which really make the project start to take shape. You can see all of it in the gif below, and then some explanation below that.

(Sorry for wide image!)


Title
I'm very pleased with the ASCII art title, the text is generated using this nice web tool by Patrick Gillespie (The font used is Fire Font-k by MJP, with a few manual tweaks). I was also pleasantly surprised that the terminal title bar displays emojis. In the end I've decided on the name "DIRECTORY DUNGEON", it's simple and self-descriptive enough, and it was the working title anyway.

Graphics
It's surprising how much of a difference some custom icons and emojis makes to the feel and novelty of something like this. It's also interesting seeing what you have to do to have a folder display a custom icon (create a hidden .ini file in the folder pointing to your icon). I've left files with their default text file icon and just opted for a preceding emoji, I didn't want to use custom file extensions and icons as that feels pretty invasive. Originally I planned to find some free little icons to use but I ended up having fun making them myself.

Equipment
The player now has an "Equipment" folder inside themselves which will hold all of their equipped items. Each piece of equipment can alter the player's stats, and there are a finite number of slots for equipment (Head, Body, Main hand, Off hand, and Necklace). In the gif you can see the player moving the rusty sword they found on the Skeleton into their equipment folder, then a log line tells you what's happened and the effects it gives. I think this will be the only kind of "progression" in the game, as it won't be long enough to justify any kind of leveling mechanics.

Combat
Probably the most important interaction in an RPG is murdering things, the second being stealing things. Combat here is resolved automatically between the player and all NPCs in a given room. When entering a room there's a few seconds grace period before the NPCs detect the player so that they have chance to escape. After that each round of combat is resolved after a few seconds interval (these timings are adjustable via a config file) until the player is dead, has run away, or all the NPCs are dead. NPCs are text files but turn into folders with loot when killed, as you can see in the gif.

Folder Renaming Problems
Sometimes, during testing, after the player eats the cabbage the equipment folder also disappears. This is because eating the cabbage changes the player's health, which changes their folder name (the % in the folder name is a remaining health %). This means that the folder you were just looking at ("Player - 75%") no longer exists (renamed to "Player - 100%"), so the file explorer doesn't have anything to show you. I'm not sure if this is a pain enough to scrap showing health in folder names, I'll see how it feels going forward.

Next
Now that most of the interactions are in place, it's time to make this a complete experience that can be played from start to finish.
« Last Edit: September 05, 2024, 06:16:03 AM by JuhrJuhr » Logged

vitalash
Level 0
***



View Profile
« Reply #4 on: September 05, 2024, 06:45:29 PM »

Crazy interesting! I'm curious how this base set of file system interactions can combine to make cool things Smiley
Logged

Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic