Zachernuk.com

September 19, 2009

Where we have been, and where opticks is going

Filed under: Games, The Order, doodles, flash, opticks — Tags: , , , , , , , , , , , , , , — Brandel Zachernuk @ 6:36 pm

Long time no post! Mid-year break is a very long holiday in the Chinese Highschool system, so we made the most of it by doing a lot of traveling.  We saw a lot of wonderful and amusing historical and contemporary sights, and managed to catch up with Family.  I don’t have a laptop, though, so after a couple of days of trying to program (and debug) on paper, I decided to turn my attention to more promising things.

I began thinking about how to write an optics engine in about September 2008.  At the time, I thinking about more minigame scenarios for Casebook – specifically, to find something do with microscopy more that was more interesting than just pulling the focus, taking a stab at the correct zoom level or panning over an endless  expanse of dust specks.  I became intrigued by the complexity present in microscopy – beams of light reflected, focused, dispersed and focused again.

I started writing a 2D ray-casting system which could do the basic laserbeam-like  stuff. Intersecting with linear mirrors and bouncing off if they were reflective.  From there it was a simple step to add in partial reflectivity – (a white beam hitting a red mirror would reflect red, a blue beam wouldn’t reflect at all).   After that, it’s not a far step from that to implementing solid polygonal objects.  From there, in theory, it’s just a short jump to including a 2d physics (mechanics) engine like Box2D. From there it looks worthwhile to include image textures on said polygons, as well as applying forces on them at the point of ray intersections.

You may be able to see where this is going.  It’s a hobby project, so there’s no harm in it continuing indefinitely, though it helps to have an idea to work toward.  Since I’m in China, I thought it would be interesting to draw on some of the culture around me – my first idea*  was “There was a medieval order of monks in China whose daily lives revolved around doing interesting things with beams of light”. This is the picture I came up with to express that.

With a slightly more concrete direction to move toward, I was able to avoid considering the detail of what the game would be about or how the player would engage with it, adding the necessary engine features that would be required irrespective of how those decisions panned out.

So far, so good.  When I found myself with nothing to do but ponder what the game would actually involve, though,I was at a bit of a loss.  What does the player control?  How would a game progress?  It seems that no matter where a game is supposedly rooted, be it feudal Japan, post-apocalyptic Mars or Victorian England, the game always finds a way of shoehorning in the same mechanics.  I’m something of an activist when it comes to how the and how the interaction in a game relates to its premise, so if possible I’d like to go against that trend.

I’ve got here a bundle of (very) novel mechanics here, so I started by trying to extrapolate from the basic functions, what kind of play experience might to possible.

The first thing that springs to mind is the optics stuff.  As in the image above, having to get a goal object to be lit up, or for a beam to pass from one room into another without interruption would be a reasonable game task, and it could be explained in the context of the Monastery by saying that the place runs on light, and intermittent blockages, dusty mirrors or wild animals can come and interfere with the operation of the place.  Great! You could start out as a janitor!

Next, given what a mechanics engine is typically able to perform, I knew we could have the mechanics stuff like shapes falling, turning, connected by pivots and whatnot.  If you add in to that the ability to use lasers to cut those shapes, I figured we could develop some kind of object deformation, and that could allow for levels where the player is required to destroy an object or a machine. It would be a solid mechanic, but very similar to Nitrome’s Icebreaker or Eugene Karataev’s two Splitter games.   There would be differences – timing would become a factor, as a laser doesn’t have to cut through a block instantaneously, but it would be much the same mechanic. I anticipate daydream that it would look something like this:

channeling blue light to cut up a red stone

Channeling blue light to cut up a red stone, but with Drama! (Drama = lens flares)

Then I remembered you could use this constructively, too – by chipping away at an object, or cutting out pieces of it carefully, you could fashion replacement pieces for existing machinery – a new cam, piston casing or something.  You could be the Order’s handyman too!

From there, I started to think about how the player could rise through the ranks of the place, and what other roles there might be to play.  Living in the Monastery, you may need to defend it, or attack it in order to oust invaders who have already infiltrated the place.

... Turning on the outside light?

Acting as an impromptu mirror during an inconvenient flood of godrays.

Acting as an impromptu mirror during an inconvenient flood of god-rays.

Also, since the life of the people in the Order is defined by this light, they’d probably use it as the basis of technology.  I’ll write more about this later, but I’d like to see what I call “Brown-box” technology.  It’s not black box because you’re allowed to see inside it, but it’s not white box either, because you don’t need to (and indeed, unless you do, the action of the box is simplified down to being that component.   It’s something I’ve been pondering over for a long time, and a post by Colin Northway of  Fantastic Contraption got me thinking about how to have my cake and eat it too. Anyway, the brown boxes:

A mess of componentry in no particular order

A mess of componentry in no particular order

More junk.  I have some idea what it could be, but it's all just some idea at the moment.

More junk. I have some idea what it could be, but at this point, all of this is just some idea.

Next are some images that just help set the scene – I imagine that the monastery complex will have some very tall buildings, though the tallest classical structures in China (other than the walls and gatehouses) are these heavy stone pagodas. This one is fairly squat, but they can be quite dizzyingly high.

One of the shorter pagodas on a misty morning.

One of the shorter pagodas on a misty morning.

Finally, Some pictures that have more to do with just feeling out what the world will be like.

A precious stone protected by a cage of light beams.  The beams just happen to look very dramatic too.

A precious stone protected by a cage of light beams. The beams just happen to look very dramatic too.

Dangerous fire-light could be used as a defensive mechanism, protecting valuable things and stopping animals from wandering into places.  Special stones and crystals could be used to convert light from one colour to another, to store energy, or to change properties (density, velocity etc.) upon charging.

A monument to the first guy who figured out how to play with light.  May or may not be based on the Buddha.

A monument to the first guy who figured out how to play with light. May or may not be based on the Buddha.

Like the standard representation of magic, preparation or the special treatment of substances to reveal their particular powers could be quite fun.

Collecting... something?

Collecting... something?

All in all, while the scope of the idea is probably a little impossibly large, it means there is something to work towards, which I’m looking forward to continuing.

* Actually, the second idea.  Apparently “you’re an undergraduate physics student, experimenting at an optics workbench” doesn’t doesn’t set fire to the imagination as much as I had initially hoped.

Powered by WordPress