Skip to content

Instantly share code, notes, and snippets.

View JoshuaGrams's full-sized avatar

Joshua Grams JoshuaGrams

  • Vienna, Maine, USA
View GitHub Profile
@JoshuaGrams
JoshuaGrams / first-up.c
Created August 23, 2017 17:08
First-up chord algorithm
Chord prev_keys = NONE, can_trigger = ALL;
void process_sample(Chord keys) {
Chord released = prev_keys & ~keys;
if(released & can_trigger) {
send_chord(prev_keys);
// These keys do not fire a chord the next time they are released.
can_trigger = ~keys;
}
@JoshuaGrams
JoshuaGrams / narrative-notes.md
Last active September 2, 2017 16:54
Thoughts on Narrative Structure and Tools

Thoughts on Narrative Structure and Tools

My local gamedev group is having a meeting tomorrow, on the subject of narrative structure and design in games. I thought I'd collect some thoughts and links here beforehand. I'm a programmer, not a writer, so I'm sure I'm missing stuff and probably misinterpreting other things. Take this with a large grain of salt.

Parser vs. Choice

Historically there has always been a big distinction between parser-based and choice-based IF. Parser IF allows you to type

@JoshuaGrams
JoshuaGrams / indented-lexer.js
Last active September 16, 2017 21:08
moo + indentation tokens.
(function() {
'use strict';
function IndentedLexer(lexer) {
this.lexer = lexer;
this.indents = [''];
this.tokens = [];
this.nextBlankIsIndent = true;
}
@JoshuaGrams
JoshuaGrams / Character Progression.md
Last active June 1, 2018 10:43
Notes on Character Progression

Character Progression

What kind of stats do you have?

  • Resources - Acquire and spend them like currency.

  • Personality trait - some actions just check the stat, while narratively significant decisions change it.

@JoshuaGrams
JoshuaGrams / skill.lua
Last active June 2, 2018 09:53
skill.lua
-- Skill Progression
--
-- Deterministic - each skill has XP which counts up.
--
-- Each level costs x% more than the previous one.
--
-- You learn the same amount whether you pass or fail a skill
-- check.
--
-- Learning is curved based on skill vs. difficulty. The
To unlock level 18, type ADUMBRATE at the title or the level select. (means make a faint image of, sketch; it's the window title and the letters on the title screen).
The other two are hinted at in the image but they're so badly drawn I would never have gotten them without searching the data files.
To unlock level 19, type DNA (yeah, I guess those are supposed to be DNA molecules).
To unlock level 20, type PETRICHOR (the earthy scent produced when rain hits dry soil. Yeah, he's smelling it, not singing or casting a spell or whatever else you might have thought it was).

Things That Might Be Off-putting

  • It feels like Phoenix uses the asterisk much more than Plover, at least for beginner/common stuff. So if this puts you off...For me it has mostly been fine, but things like *PBG for "-nk" where you have to "reach over" the -FR have given me some trouble. Especially when paired with right-hand vowels: I had to drill *EUPBG ("-ink") relentlessly before it started feeling comfortable. It helped a lot to think of it as "-ing" with a reach for the star, instead of prioritizing the star and letting that pull my hand out of place/shape.
  • There is something to be said for Plover's mature dictionary. The Phoenix dictionary is fairly good-sized, but it's still a starter dictionary. I've added more words than I did with Plover.
  • It's human-curated, so while most of the inconsistencies are due to the quirks of the English language, I have definitely found several definitions that were wrong or missing.
  • It uses prefixes and suffixes much more than Plover, so many c

I think Stardew Valley/Harvest Moon style "farming" mechanics are far too binary and feel like a factory rather than a farm or garden. I also think that watering is a poor choice of stand-in for all the repetitive farm maintenance tasks. So here are some specific suggestions for extending those mechanics in (relatively) easy ways to make the system feel more organic.


Back Toward User

back (toward user)

Far Side From User

front (away from user)

Top

@JoshuaGrams
JoshuaGrams / key.tw
Last active September 20, 2020 09:55
Lock and Key: TinyQBN/SugarCube
:: StoryTitle
Lock and Key: Variable in SugarCube
:: Start
<<set $key to false>>
<<include "LocationCheck">>
:: Front-Room [sticky-card req-not-passage-Front-Room]
<<include "LocationCheck">>