Skip to main content

A New Interactive Experience, Part 1

For a while, I’ve wanted to create a kind of “game”, but not in the typical game sense.

Most would consider a game to consist of something like 2D or 3D graphics, with emphasis on more than just text. Older folks who remember the MUD days, or those who ever played Zork might consider a game to be something as simple as text on a screen.

Ever since I played the Memory of a Broken Dimension demo, I wanted to try my hand at making something where you’re faced with nothing but a terminal window. It would be a virtual Rubik’s cube, trying to unscrable whatever mystery lies within. There are a lot of challenges ahead, but I’ll cover what I’ve done so far.

First was grabbing user input, to emulate a terminal window. Pretty easy, just set up a JavaScript event handler that does something every time a key is pressed. Now I have to show the user that when they press a key, it shows up on the screen. That’s a bit more logic to handle, plus any extra keys like the modifiers. Those are placed into a reserved list to interate over. If any reserved keys are pressed, an action is taken if one is assigned. Otherwise, if any regular keys are pressed, we just send that to the input element to be displayed.

Next steps are to make the user interface look slightly better and ensure that, after a certain number of commands are entered, the screen properly handles the text overflow.

Keep an eye out.

> XV.io