May 19, 2013 — Progress on Space Nerds In Space. Lately I’ve added a “damage control” station. The idea is there’s an “Engineering deck”, and on that deck are various systems, the Warp Drive, the Sensor Array, the Navigation System, the Shield System, the Photon Weapons system, the Phaser Banks, etc. Each of those systems has a number of components which may fail or be damaged. The Engineering deck is irradiated by the Warp Drive (or somesuch bullshit) and thus is inhabited not by people but by a remote controlled robot. The player controls the robot by driving it around, and using the robot he’s able to repair or replace the various components of the various systems. In this way the role of “damage control” is made more active and less passive than (what I imagine to be) the system used by Artemis, in which various computer controlled agents are ordered to various parts of the ship, and as time passes they either repair or don’t repair the systems without any real intervention from the player. Whether my idea to make this a more active role on the player’s part is a good idea or a bad one remains to be seen.
And finally, we held the 3rd meeting of the Recreational Computer Programming Group at TX/RX labs on March 10th, 2013. I presented a procedural castle generator.
The program is on github, and there’s a little write up on the TX/RX Labs blog.
Chris Ertel presented some cool effects applied in real time to web-cam output implemented via OpenGL shaders, as well as some code to procedurally generate a city map that he was using for a kind of zombie infestation game or simulation. Marlin Mixon demoed an Android application that he’s been working on to enable people to find and view passing satellites in the night sky in an urban environment.
I demoed a few different things. First up, qix-kaleidoscope, a kaleidoscope like application based on the ancient videogame called Qix. Here’s a video of it in action:
Next up, I demoed stipplebomb, a 200 line python script which converts a grayscale image into a stippled representation by an interesting method.
The method is as follows:
A rectangular field is mapped to the image so that coordinates in the field correspond to coordinates in the image.
“Balls” are introduced into the field. The radius of the balls is proportional the intensity of the image at the corresponding coordianate. The balls are given some initial velocity, and there is some friction to slow them down. The balls also have a repulsive magnetic field which varies in strength that is again proportional to the radius of the ball (and to the image intensity at the ball’s corresponding image coordinate). The force of this repulsive magnetic field diminishes with the square of the distance (so very rapidly falls off.)
As the simulation is run, the forces on each ball due to the surrounding balls is calculated, and the corresponding acceleration is applied to the balls.
Perhaps surprisingly, the balls eventually settle down to form a stippled rendering of the underlying image.
Here are some examples of the program’s output:
I got the idea for this algorithm from here: http://roberthodgin.com/stippling/. There you will find a much faster and better looking implementation of the same essential idea, implemented in C++ with the cinder library.
Last, I presented Laser Lander, a simple lunar lander game I’ve mentioned previously on this blog.
I totally need to write an openlase output driver for Word War vi.
[...]
I instrumented Word War vi to see how many lines it draws per second, just to see if it was in the ball park, and in a 54 second run, it drew 2516975 lines, about 46000 lines per second. Since openlase is designed for a 48Khz sound card, I’m gonna take a wild guess and say that 46000 lines per second is beyond its capabilities. Oh well.
Last month, my friend Jeremy informed me that he’s building a laser projector, and suggested Word War vi would be something good to run on it. Great minds think alike, I guess.
But not quite, because Jeremy didn’t give up when I told him Word War vi makes ~40000 lines per second, two orders of magnitude more than the laser projector could handle smoothly. So we started cutting down models in the game, and reducing the number of sparks, debris and other crap in the game, like, oh, the frame rate. And holy shit, it’s actually playable!
Here’s a poorly shot video:
watch on youtube
The video doesn’t really do it justice. In person, the thing just looks incredible.
If you want to try it on your own openlase laser projector (all 10 of you on the planet) the code is on github, here: https://github.com/smcameron/wordwarvi on the open-lase branch. I will probably merge this branch to master fairly soon. To compile with openlase support, you will need to build openlase, and copy libol.h and libopenlase.so into the Word War vi source directory, then:
make OPENLASE=1
if you don’t have full color RGB, but only a monochromatic laser projector, you can do:
make OPENLASE=1 OPENLASEGRAYSCALE=1
It’s much better with color though. Everything kind of runs together in the monochrome version.
If you don’t have a laser projector, you can still try it, as openlase has a simulator. For color, you’ll need Jeremy’s modified variant of openlase: https://github.com/jv4779/openlase.
To run it in the simulator:
Start qjackctl
Start jack running at 48000Hz.
Start the openlase simulator
Start Word War vi (you will need to “export LD_LIBRARY_PATH=.” to pick up libopenlase.so.)
Connect “libol” in qjackctl to “simulator”
You should see Word War vi running in both the normal gtk manner (but with cut down graphics and frame rate) and in the simulator. Input (keyboard) should be directed to the gtk window, but things are a lot better if you have a joystick, preferably an Xbox 360 joystick.
When we began cutting down Word War vi for the laser projector, I was a bit worried we’d never get it to be playable, so I made a 2nd game — very simple — a lunar lander simulator. Laser Lander. This game requires an xbox 360 controller. The buttons control 3 thrusters, and the idea is to land on the little rainbow colored landing pads. There’s no monochrome setting for laser-lander, as it was written in rather a hurry.
Recent Comments