dungeon-of-the-day/devlog.md

34 KiB
Raw Permalink Blame History

7day roguelike 2021

lee2sman

Devlog

4/8/21

Worked out some more with the audio. Tried out using node to load all directories of audio and pick random selection track. I also bitcrushed all the tracks so they'd be tiny and mono. Maybe that was stupid. But they're all small files now. Currently, when you walk over an album on the map it just starts playing. And when you walk off, it stops. There's a bug that is triggered intermittently and crashes. Need to spend more time on it when I'm not tired.

4/4/21

Found troubadour node package for audio playback. Again, a bit too simple for my needs but I can modify it with a hack to allow looping playback. Doesn't allow modifying playback rate or reverse.

4/2/21

In a flash of inspiration, and because I'm coding this in the least-efficient, highest-improvisatory manner I seized on a new 'core mechanic' and decided to make this about collecting/creating new ambient noise music. The player is an itinerant sound collector and creator. Added random album / track generation.

Next spent several hours looking for a cross-platform node.js audio player that would also allow looping, or at least let me write my own loop. Surprisingly difficult to find. Why? Everything was 5-10 years old or didn't work well, having minimal primitive affordances.

Eventually found play-sound, but it was too simple for my needs.

4/1/21

I added ability to drop or eat items. The effect is almost exactly the same but with eating, the item is gone. With dropping, the item is left at the location the player is standing. You can eat any inventory item. Maybe I should add some funny saying or special abilities relating to this, like they each have some magic potion effect. I don't know. I've limited player to being able to hold up to 10 items, for convenience in keypress detection and max height of screen requirements).

Day 8ish

Came back the next day to do more cleanup. Finished some detail/clean-up to move text to print out on the correct location on the screen. I'd say I'm at an alpha. The 'game' (zen-like simulation) now works okay and is playable. It's a bit much random, and maybe should be constrained more, and needs some refinement of the design. I'd also like to add in more actions the player can take beyond just picking items up. Now it's time to look at the roadmap and decide what I feel like adding on to decide what should be in the v1 release.

I added in some water features and increased item/place/grave spawning.

 ቃᛉᛉᚡᚵᛉᛘᚴᚴᛉᛉᚠᛘᚶᚴᚵᚠᚴᚵᚶᛘᚴቈᛘ
 ᚵᚵᚡ⎅ᚡᚡᚠቊᛉᛘᛘᚡᚵᚵᚶᛠ☗ᛠᚠᚴᛘᛉቃᛉ
 ᚶᚴᚠᚴᛘᚶቝᚴᚵᛠᚴᚶᛉᚶᛘᚴᚵᚡᚴᛠᛘ⛆☗ᚶ
 ᚠᛘᛘᛠᚶᚠᚡᚵሥቄᚵᚶᚵᚶᛠᚶ⛆ᚠᚵᚶᛉᛉᚴᚡ
 4☗ᚠᚴᛘᚡᚵ⛆ቇᛠᚵᛠᚶ⛆⛆⛆⛆ᛠᚠ✟ᚡᚵᚴᚴ
 ᛉᚴᚴᛉᚵᚠ@ᚶᛉᛘᚡᛘᚵᛉ☗ᚶᚵᛘᚡᛘ⛆⛆ᚡᛉ
 ᚵᚡᚴᚶᚡᛉᚡᛘᚵᚠᚠቍᛠ☖ᛠᛉ(ᚴᛘᚵᚶ⛆ᛠᚴ
 ᚠᛉᚡᛉᛠᚠᛉᛠᛠᛉᚴቈᛘᚠᛠᚴᛉᚶᚠᚶᛉᛘᚠᚠ

 The rusted gates of an abandoned bemusement park

Note: this looks better in the actual CLI where I can leverage color.

Day 7+

I failed to finish within confines of 7 days for the 7drl challenge. The last day I was busy with schoolwork, and then got stuck wading through the documentation for the 'blessed' screen-writing library. Partly this is my own limitation, but secondly it's also because this library is a do-all, be-all kind of screen-drawing library and frankly just too big. They boast it's 16,000 lines of code, and it sure feels like it. I just want a simple ncurses clone. The API is huge and the documentation leaves something to be desired. But as my college roommate Doug would be sure to remind me, "a poor worker blames their tools." I looked for a simpler alternative but did not see much on npm. In the end, I failed to get blessed to integrate and work with my code within the deadline. Pretty dissapointed but I vowed I'd return.

And I did: 2 weeks later. I started by taking one of the 'minimal' examples that come with blessed, then stripping it even further down. You'll see this in the examples folder, labeled keypress-blessed.js. My minimal example renders the entire screen of text, rather than creates some box (like in the examples) since I couldn't get far enough and was totally confused by how it does its rendering. So I made a test where it checks for keypresses and prints out whether you chose up, down, left, right (and also checks with vim-keys), and quits if you press q, or tells you to try again if you type anything else. This then became the starting point for a new round. Using that, I systematically added back in the original buggy code I'd had before I started trying to integrate blessed. I saw where I had gotten confused (rendering the dungeon map back and forth to code), and made some improvements. Gradually, by the end of the (late) night, I had a working version! I will come back to clean this up, make it look better, and perhaps add some additional functionality before I publish to Itch.

Day 7

Hard to believe it's my last day. Looking forward to finishing and having something playable! (update: I didn't finish this day!)

With some sleep and brunch in me, I feel refreshed. First step, I do some initial tests, creating little example files with blessed and seems to render out okay. I test out loading in a file and render to screen. Great, now I can integrate this back into my main program.

I decided I was ready to try replacing emojis with unicode from the Useful Unicode page. I tried changing out each of my arrays of terrain or items or buildings, etc and creating ones of unicode instead of emjois. I finished this and tested and....crap... still doesn't align. I went through my code looking for errant emoji, and then realized I was using east asian extra wide latin characters and they seemed to be causing this mis-alignment, so I switched those out. I can't say I love the aesthetic of the unicode exactly either. I guess would have been better to change fonts perhaps.

Strangely, the smiley player character seems too wide, though it doesn't throw off the grid. One of the houses (hut) seems to as well. I'll switch those out.

Okay, starting to integrate screen rendering via blessed. There are a number of bugs and I can't figure out a simple reset and redraw screen. Their example code and documentation leaves a lot to be desired. This program is overkill compared to curses! Anyway, let's see if I can wrap this up. I'm in the home stretch. Almost gave up a little while ago. Not even kidding. I thought I'd just abandon and say I failed to complete and try to get it done later, but no, I want to finish this. I've put in so many hours so far and I want people to try this out. Now that i'm getting the program to recognize directional keypresses in a gameloop i'm feeling a bit better, but still need to get a better handle on how the screen refresh -> draw works so I can wrap this up. Taking a little break to come back at it fresh.

Making a bookmark here to say if I can build a simple example blessed file that can identify the 4 cardinal direction keypresses with arrow keys and to move a little @ symbol around the screen, I should publish that (and possibly do a pull-request). I'd be doing quite a service for future node.js/roguelikers!

intermission

Ok, I've come back and at first was as confused as before. But now I've implemented a test case, a bit more minimal than I proposed. Now I'm just moving a player @ symbol left and right on a one-dimensional line of ascii text, but it does work. Will try to integrate this back into my main code and attempt to wrap up!

I can do the initial render of the dungeon after declaring new but can't seem to get the movement to work right now.

Feels awful to give up so close to the end.

Day 6

Did no work all day. It's now 11:55pm and I'm starting. LOL.

Well, my generator still makes me laugh...

🏛️: Great Pickle Camp
⛺: Embarrassed Cake Watering Hole
⛺: Fragile Actor Village
⛺: Nasty Company Village
🏚️: Toothsome Caption Camp
⛺: Typical Purpose Hideout
⛺: Cynical Credit House
⛺: Tranquil Knife Shack

First thing, fix the terrain generator. Ugh. Will report back. Goal is to get this working and switch to blessed (curses-like bindings) tonight.

Fixed terrain generator. Didn't take me that long.

Next step, looked into using blessed. I looked at some examples and played around with them. I tried changing colors of text, writing text to different lines, etc. That all went fine. Then I tried to load in a blank dungeon file and draw lines to the screen with blessed. That went okay. Then I tried to load in emojis. Darn, that didn't work. Emojis came out as ???? question marks. Time to abandon that.

Useful Unicode

Ok, so next I tested loading an external savefile with unicode text as terrain. That seemed to render okay. I tried it in gnome-terminal, st and tilda terminal emulators and all seemed okay at loading all of these unicode, in monospaced.

Test unicode text:

...▒....྿྿྿....
...▙.......྿྿྿.
.┼..྿...☭ .....
...●/..፨....ᛍ..

Next step is to build blessed into my full program file. Not looking forward to this. Probably should have done this from the beginning. I should still think about if I want this to have the program run as the "message of the day" when booting up a terminal. That was my original idea at least.

Day 5

Started at 11:30 and worked a few hours. Added random places/names, used a project-name-generator to get some honestly great (funny, silly) place-names generated.

Used a different npm package to generate people to be listed on tombstones. I copied the approach of Qud and made them silly, again. It's definitely easier. Under Covid, I wondered if this wasn't funny to do anymore. But I also think I'm looking for this kind of comedy now, even if it's only very juvenile.

Example output

Today: 2021-2-11
life: 18
Unarmed Ladybug Trading Post
🌲🎄🌲🎄🏚️⛺🌲🌲🌲🌲🌲🎄🌲🎄🌳🎄🎄🌳🌳🌲
🏛️🎄🎄🎄🌳🎄⛺🌲🎄🎄🎄🌲⛺🎄🌲🌲🎄🌳🌲🌳
🌳🌲🌲🌳#🌲🎄🌳🌲🌳🌲🌲🌲🌲🌲🌲🌳🌳🌳🌲
🌳🎄🎄🌳🌳🎄C⚰️🌳🌳🎄🌳🌲🌳🎄🌳🌲🎄🎄🎄
🎄🌲🌳🌲🎄🧛🎄🌲🎄🎄🎄🌳🌲🌳🌳🌳🌲🌳🌳🌲

another:

Last movement: 2021-2-11
Today: 2021-2-11
life: 21
Bill Brekke
Dissapeared investigating dying
🌲🌳🌲🌲🎄🌲🌲🌲🏚️🎄🎄🎄🌲🌳🌲🎄🎄🎄🌳🌳
🎄🌳🌲🌲🌲🎄🎄🌲🌲🌲🏚️🌳🌲🌲🌳🎄🎄🎄🌳🎄
🌳🌲🌲🌲🌲🌳🌳🎄🌳🎄🌲🎄🎄👸🌲🌳🎄🌳🌲🌳
🌲🎄🎄🌲🌳🎄🌳🌳🌲🎄🌳🌲🌲🌲⛺c🌲🌲🌲🌳
🎄🎄🌲🎄🌳🎄🌳🎄🌲⛺🌳🌳🎄🌲🎄🎄🎄🎄🎄🎄

A few things to note in the above. It does record when you last played, and each move you take it ticks down a life. That's a misidentified word. It's how long you have until you go to sleep. When you are 'asleep' you can't play any longer that day, until the next day or until you create a new game.

Still to come: can i translate this to blessed, the node.js curses-like library? And what about a different tileset then? What else should be added? Some actions? Monsters? The to-do list is medium long but at least it's at a somewhat playable state now, at least in a minimal viable 2d dream walkabout "zen"-like.

SpindleyQ, webmaster of Glorious Trainwrecks (a community of frankly weird game-makers - yep I'm one of them) pointed me to his Fringe Games podcast episode with Leonard Richardson, creator of robotfinds kitten.

Fringe Games Ep. 5 - Leonard Richardson

From this discussion and the show notes I realized I had attended Roguelike Celebration 2017 when he spoke about the game but I had missed the talk! I would have loved it. Thankfully, it's preserved online

Leonard Richardson - Robot Finds Kitten at Roguelike Celebration 2017.

Leonard's slides and notes

Leonard talks about the surprise, the discoverability, the quirkiness, and how rfk references things in the wider world. This game that he made in 3 days as he was a beginning programmer ignores some of the roguelike conventions (permadeath, inventory, what else?) and places an emphasis on the moment of discovery. What is this crazy thing? Ascii only added to the effect as you couldn't tell what the item was until you walked up to it and examined it. Noted.

Next I took a turn creating my own generator. I added a book generator and really had fun creating rules for deriving the title of the book. I used the project-name-generator npm package, combining it with my own lists of parts of descriptions and connecting words so that a very large and compelling, seemingly-infinite amount of books and simple descriptions can be generated. This part was really fun.

Lastly, I started reworking the terrain generator. I didn't want to sink too much time because I have a hunch I may switch to ASCII and Blessed tomorrow. There's a bug that I'll look into with fresh eyes. Mostly, I'm enjoying walking around and the discovery of books, items, tombstones. That was the goal, so now I just need to work on the play/nav/UI experience since this 'core mechanic' currently feels good.

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.

Later in day...

I downloaded robotfindskitten objects and added to game. I load them externally. I added collision detection and have it read out the robotfindskitten description of the item you're on. I also added the ability to "grab" what you're standing on, and save it to inventory (which gets written to file as well). Hmm. Now that i've implemented, the tone of robotfindskitten doesn't seem to perfectly fit here, though there's something nice going on in a few of them. I think it's possibly too wacky, which doesn't match the emoji tileset/theme.

Rewatched Josh Ge's How To Make a Roguelike talk from Roguelike Celebration a few years ago. It was helpful. Concentrate on core gameplay! That's where I'm at now!

How To Make a Roguelike talk on Youtube

I now have a pretty big TODO file going on, adding tasks, and checking off ones I've completed and bugs I've solved.

I'm thinking I may want to actually use a cool tileset, or just revert back to ascii. Undecided! But I'm still worried there's not enough emoji, and they're too specific to represent the range of text description I want to hit on. Hmmm.

I've also refined some of my core concepts ideas. Thinking now you'll have a limit of number of moves in a day before you "fall asleep." Perhaps you can extend your action by programming a robot, in a simple LOGO-language. ! (I'm probably adding too much But I'm thinking of this as a stretch goal).

Tomorrow I need to work more on generating the tiny village. I'd like to generate tombstones to read, book titles, probably a more specific good list of random items-objects. They should all be compelling, interesting, that the player cares about being a caretaker/digital owner of. That's the "point" of this game, so the text needs to meaningful. I may need to use Tracery I think.

It's pretty late, time for bed.

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