dungeon-of-the-day/README.md

18 KiB
Raw Blame History

Dungeon of the Day (working title)

7day roguelike 2021

Devlog

Day 4

Did not work as much work in on this today as I would have liked. So it goes. I spent most of the day prepping for teaching and working on my podcast, which I'm as excited about, so it's okay. So I put maybe only an hour and a half or two into coding today.

I was confused why my grids were still not lined up properly in the Terminal. River Smith on Mastodon pointed out that to get consisted full-width characters I could use east asian full-width latin characters, something I wasn't previously familiar with. These are unicode characters (there are so many!) that appear like western latin characters with extra spacing around them, so they will fit in a grid properly with the emojis I think, and my early testing bears this out. I replaced my @ with . Can you tell?

@ or 

Then I went back to looking at emojis for spawning items, and it dawned on me how limiting that is. The brilliance of ascii roguelikes is partly what's so brilliant about reading books for pleasure. Our mind fills in a picture-idea of the environment. I don't fully know how it works, and it's not the same as a visual experience, but I feel things that I read, even those that are described. This is why we can almost jump out of our chair when playing rogue and a certain monster appears. I enjoy Brogue but usually can't get past level 10 or 11. I get so thrown off when a purple g appears, and I know it's a goblin conjurer! The emojis are a bit different. They are a representation that's more 1-to-1 with what they symbolize. A tree for example. It's hard to let them to serve as mere symbols rather than the specific object they're depicting perhaps. I'll have to spend more time considering this. I could have particular emoji represent certain types of items. In any case, currently I am spawn emoji terrain and player (or @) and chars as item symbols. It's a strange combo and I've not seen that before. We'll see if it sticks or I move one way or the other or switch to a tileset.

I'm also feeling like I might simplify the mechanics. A small 'tiny village' is spawned each day, and a new one isn't spawned until the next day, replacing the previous. That shouldn't be too bad to do, and perhaps feels not only in scope but also an appropriate amount of gameplay. Less than a coffeebreak, more like an espresso-break. Which is in keeping with the feel I'm going for here. An ambient mini village walking sim that you return to each day, easily, from the command line. But the inventory should be carried over, and perhaps a quest or other things? Maybe just inventory for simplicity at this point. And you collect the items just like the "You are carrying bot" by Andrew Vestal. You can't do anything with them beyond enjoying them. You can drop items and leave behind, or hold onto things you like and read them. Maybe there's a limited size backpack or something, so you have to choose each day what items to keep and what to drop.

You are Carrying bot on twitter

Now that I have a particular goal in mind I need to collect a good number of interesting items to be spawned. I read that You are Carrying bot uses a list of items from Infocom classic games like the Zork series, Hitchhiker's Guide to the Galaxy and Planetfall. Unfortunately, I can't seem to find those lists of items readily. It's probably obscured in the source code, but I don't see it in my initial searching.

So next I am checking Darius Kazemi's corpora for ideas.

There are 450 objects in this file

words relating to new technologies

a list of appliances

a list of 1000 nouns, though many are ideas rather than objects An article with 151 items to bring camping

List of 181 survival kit items

Maybe these last few can be added to Darius's Corpora. They seem in particular a good fit for the outdoor environment setting, though I do like wacky items generation as well.

I think it would be nice to also add messages in a bottle you find and/or books or poetry.

I'll try to get at the items from Zork and maybe examine the items from robotfindskitten if possible. Perhaps I'll also use a form of Kate Compton's Tracery to develop a grammar. Not sure yet. Depends how ambitious I feel and my time available.

Day 3

Last night when I solved a vexing (but simple) bug that was causing weird rendering of the dungeon I had decided that I was next ready to work on the actual gameplay mechanics! Well, today I started out actually by implementing the date function instead. My original idea had been to make a game somewhat indebted to the game-ritual Vesper.5 by Michael Brough, which allows the player to only move once a day. So I started out by implementing a function to get the date, check if it's the same as the last date appended to a savedate file, and then report back whether it's a new day or the same day. If it's a new day, you can move the player, otherwise, you can't.

Vesper.5

Then I promptly turned this off so I can work on and debug and play the game as I develop it! Maybe I'll turn this back on later, maybe not. Will see how it turns out. The goal would be to turn this back on when I release.

So now I started to go through emojis to look for people, and then after to look for items to add to the game procedurally. I started realizing I don't really want to add monsters. I'm still after a personal quest to make something more like a roguelike walking sim, something that doesn't rely on attacking for its game mechanics. I love wandering in Caves of Qud, exploring, seeing what comes up, and having conversations. Can I make it something more like that? It does have quests, which helps move the action forward, and it has danger/risk.

Caves of Qud

Simulating a giant ecosystem I think is outside the scope of what I can accomplish or work on in a week, though I could extend this after the 7drl finishes. I started thinking about the almost roguelike Robotfindskitten, by Leonard Richardson, originally from 1997/2000. It's described as "yet another zen simulation."

robotfindskitten

The gameplay dynamics are simple. You are a lowly robot wandering around. There are lots of letters (aka objects or maybe other creatures) that you see but can't identify until you bump into them, the same way that you bump into monsters in other roguelikes. And that's it. When you find kitten or quit, then the game ends.

Here's a list of items I came across in my current playthrough just now, and the letters that were representing them, which appears entirely arbitrary:

  • . - An unripe orange
  • L - For a moment, you find something in your hands. But it disappears.
  • Q - This is an anagram.
  • g - Ten yards of avocado-green shag carpet.
  • l - a traffic signal. It appears to have been recently vandalized.
  • o - an aromatherapy candle bright with healing light
    • a ketchup bottle (nearly empty)
  • < - an old bootable business card, unfortunately cracked down the middle
  • P - "appears to be" an ancient Roman breastplate
  • = - a mere collection of pixels
  • P - a warranted genuine Snark
  • t - a black screen filled with colorful ASCII characters
  • i - a rusty mellon baller
  • ) - an oil portrait of you, about to find kitten
  • b - he letters O and R
  • A - a stupid mask, fashioned after a beagle
  • r - robotfindskitten!

A quick animated ascii text of the robot moving to the kitten over a few frames, and then the program ends and quits!

This is a petite game that leverages its procedural algorithm so that the player's goal is really to explore the items just for the satisfaction of seeing what items get generated and how they're described. That's basically the entirety of the experience, and its pretty minimal at that. But it's an occasional thrill.

Likewise, in the Roguelike Caves of Qud, one of my favorite things to do is to go visit the graveyard that lies above Joppa. Reading the tombstone epitaphs brings a thrill, not because it's a serious experience but because of the zaniness of what's written there, and the variety of things that appear. Beyond that, the world of Qud rewards exploration for the lore, books, factions, and histories discovered there.

My own game will likely be more Robotfindskitten-like, but let's see.

Before bed at 3am I started thinking about how being able to make a single move might not be the most compelling. Even if you could amke a single move, then continue to interact with a person or object at that space. What if it was more like you could play in a single section each day, then a gate opens and you can move to the next 'room' or area. I'm thinking about how when you finish enough tasks in untitled goose game it opens the gate to allow you to walk to the next mini area.

I'm also thinking about Tiny Villages. I love the villages in Qud, and even the primitive town maps of roguelikes Larn and Moria. Perhaps I can make small generated outposts and mini towns that can be explored each day, with robotfindskitten items as well as occasional graves or magical items. And a gate or passageway allows one to proceed to the next area (and closes off previous one?) when it's a new day.

//----------------create zone---------------

let buildings = ['🏛️','⛺']

let landscapes = ['🏔️''','🌿','🌱','🌾','🌻','🌵']

let plants = ['🌹','🌺','🌻','🌼','🌷','🎋']

let shrines = ['⛩️','🗿']

let items = ['🍄','🌰','

I'm wondering if i'll find enough hut, house, stall, building emojis I want to use. Might have to switch to a tileset? But if that's the case, I'll need a different approach to drawing the screen. I guess I'll need to do that anayway. Maybe time for Curses or Blessed.

Blessed library

Or maybe like the original Robotfindskitten, the individual letter characters can be just as arbitrary, their description when you walk into them doing the work of describing a world (in our mind) much more than the limited graphic representation of the emoji.

Day 2

I taught, had meetings, cooked and had a nice dinner with friends in my household (we're in a "pod"), spent a few hours actually cleaning up and backing up some hard drives tonight, so I spent less time on this than I had hoped today, but I did get stuff done, and I tracked down an annoying bug.

🌲🌲🎄🌲🎄🌳🌲🎄🌳🌲🎄🌳🌳🎄🎄🌳🎄🎄🌲🌳
🌲🌳🎄🎄🌳🌳🌳🎄🌳🌲🌲🌲🎄🌲🌳🎄🌲🌳🎄🌳
🌲🌲👵🎄🌳🌲🌲🌲🌲🎄🌲🎄🌳🌳🎄🌳🌳🎄🌳🌲
🌳🌳🎄🌳🎄🌲🌲🌳🌳🎄🌲🌳🎄🎄🌳🌲🌳🎄🌳🌳
🌲🎄🎄🎄🎄🌲🌳🌳🎄🌳🌳🌲🎄🌳🌲🌲🌲🎄🌲🌲

Today I mostly explored terrain. I kind of decided to keep exploring emojis for my tileset. Perhaps this is a mistake. Emojis, at least to me, are often "ugly aesthetic." But I use them! One thing that's nice is that they are probably present on most people's systems. And there are already a variety of clear options for the player avatars, enemy "sprites", terrain, objects.

For example, here's a clear trophy like in Indiana Jones and the Temple of Doom. Very roguelike-y to me, and pretty clear that this would lead to the end of the game or be a big prize to get in any game.

🏆

So if I proceed with emojis for my tileset, I'm thinking about avatars for the player. Does this get selected by the player? Or does the player select a class like in so many other roguelikes, and that determines the avatar? If the player does end up playing this game over days, weeks and months, it's important that they feel connected to their avatar on screen, and I think that would be aided by the player getting to choose their own avatar. Here's some of the options I'm looking at. Notice that these each speak different vocabularies.

const avatars = ['👳','👶','🧛','🤺','🕵','👲','🧕','👵','👧','🧔','👸','☹','☺',🤠','@']

Ok, so to just get moving, I now have the program choose a random avatar emoji from this array when a new dungeon-game gets created.And I am testing moving using flags. So for example, to move left currently is:

node dotd --left

or

node dotd -l

That's probably a bit silly but i'm going with it for now. I'm using yargs to parse the flags in the CLI.

Just had an interesting idea that perhaps the player submits a short program file like 'right right right up up right' so that you have to program your player-robot, and that you submit that and it runs. Would that be interesting? Rather than turn-based? I get too many ideas but should probably just proceed with standard, and then modify later if I don't have a clear goal other than 'wouldn't it be cool if....".

Tonight after coming back to things I noticed an annoying bug. When opening a saved game file and loading the terrain would be slightly messed up. One char to the left or right of the player wouldn't render correctly, and the player would be a few spots over from where they should actually be. I tried all sorts of things and after some brute force debugging and console.log'ing I realized I was rendering the terrain at the wrong time, moved it until after saving out the terrain/game file (so it doesn't over-write anything in the dungeon permanently). And now it works fine. One question: should i be saving all of the terrain tiles? Quite possibly. So then maybe i should save it out! Or save it to a json table? Seems silly. The issue of why/how to save would come up if tile persistence of terrain is necessary. If a player moves left and walks over a tree, should that same exact tree be there after they walk off? I think so. That's of course the standard course of fare. I mean, I only have different tree terrain not because they act differently but because of 'visual interest'. Would a player notice if the trees were scattered each time they loaded if a day had passed? Maybe? Anyway, I'm tired and will revisit this decision in the next few days. Am assuming I should store all tiles in all positions. It's not particularly computationally difficult.

Next step when I come back is to add gameplay mechanics. I think I'd like to have tents, markets, lore?, conversations? monsters? What else?

Day 1

i started by creating a an array of arrays (2d array) to 'hold' the level. i looped through it to assign a blank characters, at first a zero, but now a period. it took me some time to figure out how to properly point to a x,y position properly with this method. argh. lots of trial and error and i copy-pasta one line i didn't really understand from stackoverflow but understand what it outputs and worked backwards. actually, here it goes. this is cool. separately, maybe i can revisit making my own processing-derivative drawing parser in ascii. ok ok, that's a later project. anyway, i can now address a grid of text with x,y coordinates. great. proud of myself! lol. i have a grid of periods.

next i pick a random x,y position on the grid for the player. drop an @ there.

now i save to an external file. i think a core mechanic of my game will be that you can only play one move a day. inpsired by michael brough's vesper.5 'ritual'-game where you can (only move one square a day). that game got a lot of notice. oh, but it wasn't ascii. and it was 7 or 8 years ago. argh. anyway. i think i like this idea. and it's doable. and even though the command line and ascii art does not appeal to my 'art' base, my hacker phreaks like this, and i like this too! lol. it's not visual though. michael's work is so appealing because it speaks its own visual language. should i just work in p5 again? i have a half-engine for roguelikes in p5. maybe i could revisit? but way, i like this idea of a "Message of the Day" (Dungeon of the Day?) roguelike where it's in the command line, since that's my primary interface on my computer. i mean i'm typing in the command line now.

the concept is loosely that it's an ambient game. when you open a new terminal window the board (perhaps) is displayed as the message of the day. you can make one move a day. (how?). other than moving, maybe you can also use an item, talk to npc's, buy something at the market? or maybe you can move up to 3 different characters, like Lost Vikings (o.g. nintendo game that i liked that there doesn't seem to be any modern clones of).

okay, need to figure out more core mechanic/compelling gameplay. an ambient game is nice perhaps but needs some juice to make people want to play this and not skip over it.

other roguelike ideas i'd been thinking of but maybe not this time:

  • monome teletype-based roguelike for my modular synth. moving/fighting/spells would each play a different sound. i wish i could plug a nintendo/snes controller though instead of a keyboard. i guess i could use a numpad instead. each number to trigger a different script, for each direction and maybe 0 for something.
  • use p5.js to make more out-there experimental compelling visuals, a la a Broughlike
  • use Lua. which i really enjoy, and there are (brough-like again!) tutorials for
  • use pico-8 which i also enjoy, and is a subset of Lua with extended API, and i have some tutorials and previous experience on. i particularly love how it combines a CLI with visuals on same screen. i wish i could do this with p5/js.
  • use my PLOGO logo-language to make a roguelike. kind of a funny idea. also, i did built a console into it.

anyway.... no end of (bad) ideas

Day 1 1/2

What should terrain look like?

Old PETSCII? ZZT? (Can i get this with unicode or do i need to load a special font in the terminal, and then have to package that font? Can node do this?

oh wait, or should i just do this. it's easy. emoji.

🎄
🌳
🌲
🌴
🎋
🏡
🌱
🌿
🏕️

too cheesy? possibly