I set myself some goals at the beginning of this year. Now seems like a reasonably good time to reflect on why I’ve chosen them and how well I’m progressing with them. I want to figure out if they’re realistic and if they’re worthwhile. If they’re not, I want to figure out what I should change.
Let’s get down to it.
Read 20 Books
I’m not reading as voraciously as I once did, and I’d like to fix that by building my habit back up. Technical stuff (e.g. a book on how to approach certain programming problems) not included in the count as I don’t read those linearly.
Not including short stories and comics, I’ve read 3 novels so far, but I need to read 2 books per month to be on-track. I need to catch up!
My current book is Ursula Le Guin’s The Disposessed and am itching to read some of it whenever I get the chance, so it’s not that I lack motivation. The thing I lack is time.
Go Vegetarian
I’ve been sort-of vegetarian for a few years, avoiding meat and eating it as an occasional treat or when it’s the only option (e.g. at family meals). I’m curious to see what happens when I push the boat out.
I haven’t noticed the switch, to be quite honest. Life has continued much as before. I’ve eaten meat once because my brother invited me around for dinner and I forgot to tell him I’d gone fully veggie.
Learning Swedish
I’ve been learning Swedish using Duolingo for a couple of years now, and I’m still not a confident speaker or reader. Clearly, work is to be done.
Reach 100% fluency on Duolingo
Read some Swedish books
Hold conversations in Swedish without running away
I’ll manage this one.
Do Some Short Courses
Last year I enjoyed attending a couple of short courses run by Edinburgh University, and would quite like to do some more this year. I’m not sure if this will happen, but I’m okay to let it slide.
Post On Here Every Week
Posting makes me feel good, but I suck at getting on with it. This is another case where I just need to manage my time and focus much better. You know, it’s that simple…
Release Quarrel on itch.io
This is a big one, I hope not too big. There will be some small variety of enemies to shoot, some small number of levels, and some sort of story for people to complete.
Release Quiver 1.0
Another big one. Hopefully once I’ve released Quarrel I will be able to say ‘this is version 1 of Quiver’ and feel comfortable packaging a release up and inviting others to make games with it. If not, the release of Quarrel will still be a big milestone and a good point at which to start using some kind of versioning system (I guess SemVer?).
Make a Podcast
Me and Natalie have had this idea for a podcast in which we sort-of ‘Let’s Play’ our way through various Choose-Your-Own-Adventure books such as Fighting Fantasy classics like Deathtrap Dungeon and Citadel of Chaos. To make this achievable, I minimized the requirements:
5 episodes
Each about 30 minutes long
Released when we get them done rather than on a schedule
Natalie, we need to work on this!
Miniatures!
Finish assembling and painting my miniatures pile o’ shame. Then I can get new ones! And paint those! I have no worries about this one. If there’s something I reliably find myself wanting to be doing, it’s hobbying.
This year’s going to be a very busy one professionally and personally, so I fully expect a few of these to slip (even more, in some cases). We’ll check back in June.
On Saturday I attended Edinburgh Uni Game Dev Society’s ChillJam, a one-day game jam with a relaxed atmosphere. I teamed up with Norgg to make a little game about making a cup of tea.
It’s very broken, as you’d expect for something made in about 9 hours, but I’m quite pleased with how it turned out. I really like the idea, too – I think it would be lovely to someday make a webpage people can visit and simulate making a cup of tea (or some other kind of beverage!), filled with all kinds of nice, rich interactions. A warm, comforting place on the web.
Also, Norgg’s daughter helped by drawing the pictures you can see on the mug and kettle, which was the sweetest thing ever.
Enormous thanks to the organizers of the jam for creating such a fantastic event and to all the other participants for sharing their amazing creativity. I am already looking forward to the next one!
Finally, you cannot drink the tea. Don’t worry about it.
Before this blog, I had another blog, and another blog before that blog, and so on until the beginning of time. At the moment I’m trying to dig up the best stuff I put on those old sites and re-post it here. This serves two purposes:
Maybe some of this stuff is actually worth preserving.
I get to put off writing actual new posts for a bit longer.
So here is a post I wrote in university, re-hashed a bit but otherwise unchanged.
Preamble
When we were making the musical platformer AMPS, I had a problem to solve.
Objects in the game world use a song’s beat like a clock. The song is a group of FMOD Events which function as layers, all playing at once. We wanted to speed up the song and thus speed up the clock. The problem is that the FMOD::Event class1 doesn’t provide a method for changing the speed of playback. It does, however, provide SetPitch and GetPitch functions.
FMOD increases the pitch of audio tracks without worrying about smart pitch-shifting (no, I don’t know what the technique to increase pitch independently of tempo is actually called), so that increasing the pitch doesn’t just make the song sound higher, it makes it sound like it’s being played faster. Imagine making a record play faster than the RPM it’s meant to be played at.
So we can just modify the pitch to make it play faster or slower, but how do we keep our game objects in time with the beat of the song?
Event::SetPitch and Event::GetPitch measure pitch as follows: a pitch of 0.0 is the base pitch of the audio sample. Nothing has been altered about it. A pitch of 1.0 means the pitch has been shifted up by one pitch unit, and -1.0 means it’s been shifted down by one pitch unit. Obviously.
What are “pitch units”? Semitones, tones or octaves. It depends what you pass to Event::SetPitch or Event::GetPitch as the second parameter. The options are FMOD_EVENT_PITCHUNITS_SEMITONES, FMOD_EVENT_PITCHUNITS_TONES, FMOD_EVENT_PITCHUNITS_OCTAVES. e.g.
I use semitones. There are 12 semitones in an octave, so the stuff below should be adaptable to not-using-semitones.
You need to know the base BPM (beats-per-minute) of the track you are pitch-shifting.
Here’s the general formula to pitch up from 0.0 semitones to n semitones:
new BPM = base BPM * (2 ^ (n / 12))
e.g. pitching up by a semitone…
105 bpm * (2 ^ (1 semitone / 12)) = 111.24 bpm.
…pitching down by a semitone:
105bpm * (2 ^ (-1 semitone / 12)) = 99.11 bpm.
Pitching up increases BPM more than pitching down decreases it, because pitch scales logarithmically.
Additionally…
We’re using a ‘song-based delta-time’ for updating game objects. Normally the delta-time would be the time since the last frame, but in this case it’s the amount of time the song has progressed since the last frame, so basically the same thing. To account for music going faster or slower, we make world go faster or slower by multiplying this delta-time by a variable equal to (new bpm / base bpm).
BPM to Pitch
Where m is the number you’re multiplying the base BPM by to get the new BPM:
new pitch-shift amount (in semitones) = 12 * (ln(m) / ln(2))
new pitch-shift amount (in octaves) = (ln(m) / ln(2))
We were using the FMOD Ex API, I think (?), but I can’t find a reference online to link to. There is, however, this article about the differences between that API and more recent versions of FMOD. ↩
Here is a sub-500-word story that I wrote for the 4th PodCastle flash fiction contest that ran through July and August 2017, with the three winning stories aired on episode 499 of the podcast in December. Telling any story in less than 500 words is an interesting challenge, and what I ended up producing trades more in tone and tension than in plot or payoffs. It was received fairly well and made it into the semifinals, but there were many stories that were better-written, more interesting and much more deserving of the prize. A lot of fun was had in the process, anyhow, and I’m proud of this little story and myself for finally getting some fiction out into the world, however short it may be.
I’m hugely thankful to David Ferguson who provided feedback and editing on the story. Without his great input it would be utter rubbish.
I hope you enjoy it! Let me know what you think in the comments below or on Twitter.
They came into the cities like countless other wild creatures had before them. At first they were cautious, caught by humans only in brief glimpses when they darted through the glow beneath lampposts and windows. On the walk home a person might see a pair of reflective eyes watching from the bushes, cold and wary, before they disappeared in a blink. They were mostly silent, which helped them go unnoticed, and when one did make sounds it was easy to mistake its yowling for a cat’s or even a baby’s. They ran from adults but did not mind children. In fact when a child was alone they would observe it closely, curiously, almost as if trying to remember something.
As their numbers grew so did their confidence. They rummaged in bins and fouled on lawns. They stole food and trinkets through open windows. They were seen breaking into containers, smashing them with rocks or prying them open with sticks. They would peer in the windows of family homes, hiding the moment an adult turned to look. Sometimes a ground floor window would have a new crack in it in the morning. People would wonder.
Their nests became larger and easier to find. The media buzzed for a morning about the novelty of an abandoned nest found on the twenty-first floor of a construction site. Perhaps its inhabitants had lived off builders’ unfinished lunches, or the rich pickings that could be raided from the alleyways behind nearby restaurants. Footage surfaced online of one appearing to beckon to a toddler who was alone in a garden, and a clip showing a group catching pigeons went viral.
People got wiser about living in their presence. The popular advice went like so: don’t leave doors or easy-to-reach windows open, don’t encourage them by leaving food out, and put locks on bins. The less-given, less-taken advice was to nail a horseshoe above the door, but it sounded far too superstitious for most. Regardless of the precautions people took, they got smarter in response. It turned out they could open doors, teaching each other the technique. It was rumoured they could even pick locks.
In the countryside they had merely survived. In the city, they thrived. Newspapers and politicians began to talk about “pest control” as they went from curiosity, to nuisance, to threat.
It was near midsummer when a baby girl went missing from her ground-floor bedroom. At first it was a routine investigation, given little more than a paragraph buried near the middle of the national papers, but it quickly became clear something was different. Something the police were avoiding questions about.