Saturday, August 4, 2012

Stereoscopic 2D Game - Space Shooter

Last year, I managed to prove that HTML/CSS/Javascript scripting languages are able to create beautiful stereoscopic 2D games, by making a small prototype 2D game with stereoscopic 3D visuals running in Internet Explorer 7 and above, without the need of ANY plug-in (not even using Flash, Java, etc.). Stereoscopic 3D effects allow to trick the player's brain for it to perceive deepness and pop-up effects (even vertigo), just like it is currently possible with the nVidia 3D Vision kit or with the Nintendo 3DS. The only difference here is that you need to cross your eyes and focus in a certain manner in order to perceive the stereoscopic effects, which leads to more eye fatigue than if you were passively looking through a pair of active 3D glasses, since those are doing that for you automatically. In this case where I used a side-by-side technique, a peripheral to simplify and to make the current experience comfortable does not yet exist. But this experience definetely opens new gaming possibilities, since a cheap head-mounted USB screen with standardized technical specifications could eventually be manufactured (remember the oldViewmaster toys?).

The game also showcases a powerful and random 2.5D particles system. For optimization purposes, it is coded to never display more than a variable quantity of particles on screen at the same time. This variable can be changed by typing a new number in the input field located at top-left of the screen. You can read more about stereoscopic graphics, and the side-by-side method over When seen in stereoscopic 3D, you can view some particles fading away, and some others popping out close to your eyes, in full volumetric awesomeness!

You can play the tech demo over there:
It works only in Internet Explorer (ideally, older versions).

If you are not able to see the 3D effect, one easy trick is to place your finger mid-way between your eyes and your screen. Keep looking at your finger, and move it very slowly towards your nose. Stop moving it as soon as your peripheral vision succeeds to merge the left and right images into a crisp middle image on the screen. When that happens, keep the very same focus and move your glance smoothly to the screen image; you should be able to admirate the game in full stereoscopic 3D flavour. Maintain this focus and control the game. The more often you repeat this experience, the easier and faster your eyes and brain will be able to perceive the effect with low efforts.

Use WASD keys to move the spaceship, and Q to fire missiles.

No comments:

Post a Comment