Writing

A screen, a show, and twenty invisible boxes

  • vj-simulator
  • devlog
  • unity
  • vr

One day since the last entry, which is a new record and almost certainly not a sustainable one. Three chunks, and each one only happened because the one before it did.

The stage from the player's view: note prompts closing in and being hit, the light row firing overhead, and video playing on the screen at the back

The default song finally loads into the real stage. I ended the last post complaining that pressing play dropped you into an empty room, because the song that loads by default had never been moved over to the new stage. So I moved it. Both songs that ship with the project now know which room they belong in and what each part of that room does when a note lands — the top row of lights fires all at once, the bottom row chases across, the lasers take the sliders. It's a small thing that had been sitting there looking like a big broken thing.

One detail I hadn't thought about until it bit: that song is a real recording, and its notes were found by analysing the actual audio. But the song file had never been told which recording it came from — the game knew, because I'd wired that up by hand once, and the editor had no way to find out at all. Opening it in the editor would have laid a hundred and thirty-eight beats detected from a real track over a completely different synthesized one. Songs carry their own audio now.

Then, with the stage finally loading, I couldn't hit anything. Notes appeared, the lights idled, the pointer pointed, and clicking did nothing. No error, no complaint, just nothing — always the fun kind.

Every spotlight in the room has an invisible box around it so you can click on it in the editor. Selecting a light is how you tell the editor which lights a reaction is for, and you can't click a shaft of light, so each one wears a box you can click instead. Perfectly reasonable — except the room is one object shared by the editor and the game, so the game got the boxes too, and those boxes are sized to the entire cone of light: sixteen metres long, five and a half wide, twenty of them, in a room eight metres tall. The place was packed with invisible furniture and the pointer was faithfully hitting a box every single time instead of the note in front of it. The old room never showed this because it had three small lights tucked near the ceiling. Scale the room up and it becomes impossible to hit anything else. Now the game just switches the boxes off, since nothing in the game ever wants to click a light.

And the back wall plays video. Ten metres across, behind the light rows, which is where a screen goes on a real stage — the lights hang in front of it and cut across it. That part was easier than expected, because a screen turned out not to need a new concept: it's a fixture, same as a spotlight or a laser, a thing in the room with a name that the song can talk to. Everything that already knew how to find a light knew how to find this too.

The interesting part is what tells it to play. Until now everything in a song was something you do — a note you hit, a slider you drag. The whole file was a list of moments you're responsible for. A video isn't that. It starts at 1:12 whether you're playing well, playing badly, or standing there with your hands down. So songs now have a second kind of thing in them: something that just happens. It doesn't score, it can't be missed, and nothing floats in front of it asking you to act. I went back and forth on making it a weird kind of note and I'm glad I didn't — every part of the game that handles notes counts them, draws a target and judges how close you were, none of which a video wants.

You point at a video by dropping an mp4 in a folder and naming it. No importing anything, no rebuild. That matters more than it sounds: a song is a text file, and the point of a text file is that you can hand it to someone. The editor lists whatever's actually in the folder rather than making you type a name and find out at play time whether you got it right. The cues sit in their own thin lane above the notes on the timeline, which means the timeline has started to look like it has tracks — probably where this is heading anyway.

Still rough, and some of it structural. A cue can start a video but nothing can stop one — it runs to the end, or loops forever, and there's no "cut to black" you can write into a song. That's the obvious next piece. There's one screen and only in the main stage. Video plays silent on purpose, since the song is the audio, which does mean you can't use a clip meant to be heard. The notes on the light rows still float closer to your face than they should, for a reason I understand and haven't fixed. The editor is still ugly. The rig is still white.

More soon.