I got tired of looking at all of those rooms with the bitmaps on the wall so I decided to make something with no bitmaps whatsoever! And Shazam! I made a
The premise is simple: you have 256 rainbow colored paintballs with which to
draw a picture.
The little crosshair shows where the paintballs will hit the wall
(but they're a little inaccurate, so don't try recreating the Mona Lisa).
You move the crosshairs around using 'g', 'j', 'y', and 'h'.
Oh yeah, and press 't' once to start
shooting and then press 't' again to stop. One more thing: 'u' is the special weapon -
don't press 'u' unless you really know what you're doing!
Here's a little table:
| t: Fire! |
y: Crosshair UP |
u: Death Attack! |
| g: Crosshair LEFT |
h: Crosshair DOWN |
j: Crosshair RIGHT |
'LEFT' and 'RIGHT': circle around the device
'UP' and 'DOWN': circle over and under the device
'w': zoom in
's': zoom out
'b': wireframe mode...it's actaully pretty cool!
'c': clears the wall of paint
At first I set out trying to make a robot...but then I got bored of that idea so I decided to make a set of guns that shot at something that floated around in the air...but then I decided that I wanted something interactive that I could play with. So I came up with the Super Paintball Gun Art Creator!
The guns are actually just for show. Trigonometry keeps them trained on the crosshair, which is moved in the YZ-plane. The barrels spin on their own axis, using a matrix push-pop to prevent their rotation from being forced on the rest of the system. The muzzle flashes and tracers are psuedo-random to keep the imagery from becoming stale. These parts of the gun were easy.
The hard part was making the shells pop out the back of the gun. Originally I had planned to make each shell its own object, because by doing so I could make them fly about with some randomness, just like a real shell getting kicked out of a gun. I figured out how to find the vector that represented the direction of a shell's ejection from the gun, but I could only find it in the vector space of the gun--in order to apply realistic gravity and what not, I would need to have the vector in terms of the main platform's vector space, but the converstion algorithm eluded me, and alas, I had to settle for the cheap looking shells you see in the program.
I was really pleased with the way the shot pattern worked out, using a modification of the built-in rand() function. The special weapon is just a scaled-up version of the shot pattern, kind of like a shotgun.
The reason I used 256 bullets is twofold: First, I didn't want to stress out the lab machines. Second, 256 bullets made it easy to apply a color-changing function to each bullet. I set it up so that a sine function governed R, G, and B independently. In order to get the color seperation that you see in the program, I phased the channels out of alignment, so that only one would be expressed strongly at any given time.
That's pretty much it. The reason I didn't use bitmaps is mostly because I don't like all these picture-perfect games these days: all they have is good looks, but as every CS geek like me knows, it's all about what's underneath! As a wise guy once said: "Flash makes it crash."
Fear the might of the Gatling Guns!
Wireframe mode is lookin pretty darn cool...
...Can you learn how to use the special weapon?
Self Portrait. I look good, don't I?