Planet Wars - interactive control
-
- Posts: 62
- Joined: Mon May 11, 2009 4:31 am
Planet Wars - interactive control
For my son's 5th birthday party I created a game. It's a 2 player cooperative fps space shooter played in our own solar system. It was targeted for Linux but with a little work it could be ported to any OS that Irrlicht supports.
To make it a bit more unique, I built a physical spaceship with a pilot's seat and a turret mounted cannon, for the two players. The pilot controls the spaceship with a mounted joystick (the trigger controls guided missiles), and the gunner shoots directly at the projection screen.
Shots on screen are picked up by a regular NTSC CCD camera and evaluated by a circuit that I built which looks for a laser dot on screen. The laser is very low power (eye safe) IR, and there's an IR interference filter on the camera so it works just fine under flourescent lights (I've got CFLs in the basement where this is set up). My circuit reports pixels on screen above a threshold set by a pot on the circuit. Turns out this works pretty well.
The party was a big success- the kids had a great time playing it. I plan to release build plans and sourcecode for everything (provided somebody is interested) but I've got a few bugs to fix first.
Anyway- here's a video of my boys in the spaceship:
http://www.youtube.com/watch?v=MzDrX_fjIk8
And here's one of the game (just a video of the screen)
http://www.youtube.com/watch?v=IsbFwmEBieM
I set up a blog while I was developing, but did a poor job of maintaining it. My upload rate is abysmal, so have some patience if you check it out:
http://dbarrett.no-ip.com/wordpress/
Finally, I'd like to thank all the folks here who helped me during the main development.
To make it a bit more unique, I built a physical spaceship with a pilot's seat and a turret mounted cannon, for the two players. The pilot controls the spaceship with a mounted joystick (the trigger controls guided missiles), and the gunner shoots directly at the projection screen.
Shots on screen are picked up by a regular NTSC CCD camera and evaluated by a circuit that I built which looks for a laser dot on screen. The laser is very low power (eye safe) IR, and there's an IR interference filter on the camera so it works just fine under flourescent lights (I've got CFLs in the basement where this is set up). My circuit reports pixels on screen above a threshold set by a pot on the circuit. Turns out this works pretty well.
The party was a big success- the kids had a great time playing it. I plan to release build plans and sourcecode for everything (provided somebody is interested) but I've got a few bugs to fix first.
Anyway- here's a video of my boys in the spaceship:
http://www.youtube.com/watch?v=MzDrX_fjIk8
And here's one of the game (just a video of the screen)
http://www.youtube.com/watch?v=IsbFwmEBieM
I set up a blog while I was developing, but did a poor job of maintaining it. My upload rate is abysmal, so have some patience if you check it out:
http://dbarrett.no-ip.com/wordpress/
Finally, I'd like to thank all the folks here who helped me during the main development.
Just wow :-)
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
-
- Competition winner
- Posts: 1123
- Joined: Sun Jun 10, 2007 11:14 pm
-
- Posts: 62
- Joined: Mon May 11, 2009 4:31 am
Rather than bugfix first, I thought I'd get the source out and at least have some version control from this point on. So here's the initial release available from sourceforge cvs:
http://alienplanetwars.svn.sourceforge. ... lanetwars/
From any linux command line (assuming you have SVN)
There's a .cbp in there since I used codeblocks in development. The .cbp is set up so that if you have already got irrlicht 1.7.1 unzipped, it make a subdirectory (called 'alienlanetwars') so run the above svn command from your irrlicht 1.7.1 root. Under alienplanetwars, you'll get a 'game' which has the compiled file (under Ubuntu 9.04- still has debug info enabled) and a 'space' which contains the source. It's using irrKlang for sound, so you should unzip irrKlang into the irrlicht 1.7.1 directory for all linking to work automatically. You might need to put the irrlicht and irrKlang .so files in the 'game' directory for the binary to run out of the box. Don't use the Makefile in there! I left it in by accident, since I started with the irrlicht 'helloworld' project. I'll bump it out or update it for the next release.
Warning! The code is a mess. I barely got it working in time for the party, so it needs some cleanup, fixes and some features added (right now I'm hardcoding calibration values for the hit detect). In addition, this was really my introduction to C++.
I've already got the schematic for the laser hit detect up on the blog, but I'll add the sourcecode under a new sourceforge project in the next few days.
Finally, many thanks to James Hastings-Trew, who gave me permission to use his planet textures. You can reach James, or check out his work here:
http://planetpixelemporium.com/planets.html
http://alienplanetwars.svn.sourceforge. ... lanetwars/
From any linux command line (assuming you have SVN)
Code: Select all
svn co https://alienplanetwars.svn.sourceforge.net/svnroot/alienplanetwars alienplanetwars
Warning! The code is a mess. I barely got it working in time for the party, so it needs some cleanup, fixes and some features added (right now I'm hardcoding calibration values for the hit detect). In addition, this was really my introduction to C++.
I've already got the schematic for the laser hit detect up on the blog, but I'll add the sourcecode under a new sourceforge project in the next few days.
Finally, many thanks to James Hastings-Trew, who gave me permission to use his planet textures. You can reach James, or check out his work here:
http://planetpixelemporium.com/planets.html
-
- Posts: 237
- Joined: Mon Jan 16, 2006 1:18 pm
- Location: Odessa,Russian Federation
Re: Planet Wars - interactive control
Will you adopt me?... I'm 30.