Saturday, September 9, 2017

Street Defender VR64 Video Game




The year is 1986 and modern man has made a mess of it!

Space aliens recovered the Voyager 1 spacecraft, listened to “Jonny B Good”, and immediately invaded earth’s cities with their green exoskeleton bug warriors. The robots created to make mankind’s lives more comfortable have decided they aren’t comfortable, and have risen against man. And the Central Asia Ninja Team (CANT) grew angry at the repeated portrayal of Ninjas as silent, expendable warriors in video games, so it launched an attack of its massive blue Ninja squad who have taken a vow of silence. Apparently, irony isn’t well understood in the Ninja culture.

Mankind has set up Street Defenders on every street corner to fight the invaders. They are trained to fight the invaders as long as they can before being “retired”.

You are Street Defender number C-64. 

To look for your enemies, press the “<-” key to rotate left and press the “1” key to rotate right.

The Street Defenders have multiple weapons available which are activated by function keys “F1”, “F3”, “F5”, and “F7”. These weapons will damage the nearest enemy as shown in this table. 








Only the Punch is unlimited. However, it only works if the enemy is very close.

Flashing enemies contain “power ups”. These can be collected if the enemy is killed when very close.



How many kills can you get, Street Defender number C-64, before you are “retired”?



 <-- Optional Paypal support for these projects

Link to disk image:

VR64, Virtual Reality Goggles for the Commodore 64



The VR64 project is my attempt to make VR goggles for the commodore 64.



The project started with my 12 year old daughter's science fair.  She studied VR goggles.  We were able to make our own "Google Cardboard" style goggles, 3D images, and even a 3D movie.  Of course we used our smart phones as screens and video cameras.

I kept thinking, why can't this be done for our beloved commodore 64?  So I built the VR64 using three components, a $10 plastic VR goggle, a $32 LCD and a cheap power transformer (plus lots of glue gun fun!).
VR64 Demo Video

I split the screen into two sections, one for the left eye and one for the right.  Each section is 19 columns by 25 rows, and the center two rows are not used.  Each eye, has 152X200 pixels in high resolution and only 76X200 in multi-color mode!


After experimenting, I found that objects at the same location in both eyes looked like a "normal" distance.  If the objects both moved towards the center, through the VR64, the object would appear in the same location but closer to the user!  I found that I could move objects up to 10 pixels towards the center each (20 pixels closer to each other) and maintain the 3D effect.  At a movement of about 13 pixels, my eyes got confused.

At first I was also moving the objects away from the center, but images with objects both away and towards the center were hard to focus on.  After thinking about how the eyes look at objects close and far, it seems obvious that objects far away approach being straight in front of each eye.  When objects are close, each eye sees it as closer to the center.  In no case in reality do the objects move further out.  
Graphic from my daughter's science fair poster!

So I settled on objects at the same center being the furthest out and only moving them both towards the center, up to 10 pixels each, as the 3D effect.  It actually works quite well!

I made a few 3D images from actual camera shots.  They are OK, but not too impressive.  I honestly didn't spend too much time on this.  It may be better to use high resolution dithered images.

Of course you can't have fun on a c64 without playing video games.  So I made a VR64 game.  This is only my third computer game and my second ML/Assembler program.

My VR64 Game is "Street Defender"


I am very happy with the 3D effect of this game!






I have tried to make a video so that people can view this through something like google cardboard or compatible devices.  Hopefully I got the spacing right!

I made it by balancing my phone above the LCD used in the VR64.  Compared to real life, it is worse than what is seen when using the VR64.  It is too washed out in the beginning.  The black background is glowing and not pure black in this video.  Also the text is blurry in this video.  When the game screen comes on, the contrast looks better, but some color is lost.  For instance the moon is much more yellow in the real thing.  However, I hope this gives you a good idea of the 3D effect that is achieved!  Let me know if this doesn't work with your goggles.
Google Cardboard compatible video


Here is my build video of the VR64.  I hope you build your own!  The alignment program is on the "Street Defender" c64 disk. (see link below)
Build Video of VR64

Here is my presentation at the ECCC 2017 / VCFMW 12 show where this was debuted.
Show presentation of the VR64

* UPDATE *
The latest version of the game supports an Atari Driving controller to be used to rotate your view.  Here's a video about it!



 <-- Optional Paypal support for these projects
Free links to components, artwork and VR64 game: