update devlog.md

This commit is contained in:
lee2sman 2021-03-28 04:24:45 -04:00
parent 1f64c656ea
commit 82dace0af1
1 changed files with 15 additions and 1 deletions

View File

@ -4,9 +4,15 @@ lee2sman
# Devlog
## 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!
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.
@ -18,6 +24,14 @@ Okay, starting to integrate screen rendering via blessed. There are a number of
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.