Source Code. Projects. Nerd Stuff. Art Stuff.

Space Invaders


Posted on November 15th, by amoeboar in classes, icm. No Comments

My midterm project was to begin working on a classic Space Invaders-style game. I’m trying on throwing in a twist in that it is voice controlled, using a java library I found called voce. Unlike contributed Processing Libraries, this one requires placing a voce.jar file into a separate code folder within your sketch folder, and then calling the .jar from within your sketch. You load words to be recognized into a “grammar” directory, and when you run the sketch, voce compares what you said to one of the words in this directory. For my purposes, I only need three strings: “Left, Right, and Shoot.”

It’s a bit cumbersome to play with, but the advantage is that I can make use of voce’s speech recognition functionality to “hear” what I say, store it as a string, and then return some value based on what string was heard. I’m only at the beginning of this process, but with any luck I’ll be able to create a voice-controlled shooting game a la PewPewPewPewPewPewPewPewPew.

The enemies and ships were created by “hand-drawing” a rectangle at each point in a two-dimensional pixel array. It seems like a nice nod to classic 8-bit Nintendo games. More to come as the project develops. The flocking behavior is adopted from Dan Shiffman’s excellent Flocking Class.

More info about voce: Voce White Paper

As it stands, the project is incomplete. Source code will be provided upon completion.





Leave a Reply