Monday, November 10, 2008

Anaglyph Game

I had been playing around with making a little video game that makes use of 3D glasses, and I sort of ran out of steam on it so I thought I'd post up what I had. It's more of a proof of concept than a full game.

Welder Wait screenshot

It's just a regular side-scrolling platformer, but in addition you can use the up and down keys to move back and forth along the z-axis. With red/cyan anaglyph glasses on, you should be able to distinguish between solid blocks, spikes, and enemies that are at different depths, and plot your course appropriately.

I made it in the free version of Game Maker, which was super easy and fun. The full version might allow you to alter the low-level rendering routines to do the anaglyph offset at runtime, but I just made different versions of each sprite for the different depth levels and switched between them.

I was already playing with this stuff when I read about Kokoromi's Gamma 3D contest. Really interested to see what people come up with.

Anyway, here's the download link for Welder Wait 3D. The archive includes the Windows executable (Game Maker is Windows-only) and the Game Maker "source" file.


DU said...

Whoa, my kids are going to love this concept. (We'll see if they love the actual game...)

Is it just two Z levels? I guess so, because you mention switching "between" sprites. That's probably a good idea, since I bet you can't distinguish precise depth very well.

tps12 said...

Three levels ("between" is correct because you only ever switch from one level to one adjacent one, making "among" misleading): "screen-level," in back, and in front. And yeah, it's even a little hard to tell what's going on as it is.

DU said...

(I didn't intend that as a grammar argument. Just that "between" signals discrete rather than continuous values.)

I saw some game recently that was basically a series of 2D projections of a 3D game. You play at a certain Z depth and then can "rotate" to swap X and Z. You walk in that plane for a bit and then rotate back into a plane parallel to your starting point.

I might be making part of that up. But that would be pretty awesome!

tps12 said...

I think you might be thinking of the PSP game Crush, which is a 3D platform game where you collapse the world into 2D. Even more mind-blowing is that someone "demade" it as a 2D-to-1D game called Squish.

DU said...

The name and images look unfamiliar, so I think it must have been another game. Probably stole Crush's idea though, since it sounds similar to what I was thinking of.

Also, why not a 4D game played in 2 or 3D slices? Or in N-space?

DU said...

Sadly, it doesn't run. The error I get from Wine is:

fixme:d3d:IWineD3DSwapChainImpl_Present Unhandled present options 0x32fcbc/0x32fccc

tps12 said...

Ergh, no idea. Googling found one person with the same error under Wine, but it doesn't sound like they found a solution. If you can get Game Maker itself to run, you could try opening the .gmk file, but otherwise I don't know what to suggest.

Anonymous said...

«Shooting gallery»
(anaglyph game).

Use red/cyan glasses to view in 3D.