The Shoebox. A place for lil' apps to live in peace and harmony.

This was a demo of drawing 3D boxes in one-point perspective. Now it’s a little tank-driving game.

Use the mouse to move and fire. Some keyboard keys can do each of these as well.

For now all you can do is drive and shoot. In the future I want to add, or anyone is invited to add:

  • Collision with the outer wall of the environment
  • Targets to shoot
  • Time trial mode—get around and shoot all the targets as fast as you can.
  • Enemy tanks
  • More levels
  • High scores
  • “Combat” style bouncing bullets
  • New weapons
  • Sound effects

I’m pretty new to Ruby so I’d love for someone to refactor my code and show me what tricks I could be using!


Speak now or forever hold your peace:

kevinc
February 24, 2008

I left the fill color as transucent, but if you set it to an opaque color and perhaps sort the boxes short to tall, the fronts of boxes should render unobscured. However the sides of boxes are just wireframe so they can’t occlude things. If Shoes gets a polygon drawing feature then we’ll be set.

kevinc
March 14, 2008
Changes this version:
  • Added collisions with buildings for the tank and for shells. Still haven’t added collision with the outer boundaries.
  • If you collide with buildings too much, you’ll get hurt and your tank won’t go as fast. If you lose all your health the game will end, in which case you can press “n” to start a new game.
kane
March 20, 2008

WOW!! this is awesome! it looks really classy like those old games I used to play.. good job!

I just noticed something – when you click left or right on the right spot the tank will not reach the spot but will circle around it :)

kevinc
March 23, 2008

thanks! :) i’m not sure what to do about that circling bug. i like the controls as they are so much that i’m inclined to just leave it.

Ernest Prabhakar
April 11, 2008

Version 4 is massively refactored for greater elegance, but much slower. :-(

DrErnie
April 11, 2008

Okay, version 5 is officially a “playable” game. It has enemy tanks whom you can shoot at (and vice versa), as well as a Radar to help you locate them. The downside is that I had do drastically cut down on the firing rate, display rate, and transparency in order to make the rendering times acceptable. Further improvements welcome!

poopoo
July 12, 2008

Holy cow, awesome.


How do I use this?