My first game... Asteroid Defense.
- In this game you are a ship protecting a planet from incoming asteroids.
Controls:
360 controller:
Left Joystick -- Move ship left and right.
A -- Shoot
Right or Left Trigger -- Change Weapon.
Keyboard
Left and Right Arrow Keys -- Move ship left and right.
Up and Down Arrow Keys -- Change Weapon
Space -- Shoot
The weapon you are using is shown in the top left corner. The stronger the weapon you use, the less points you get for destroying an asteroid. Levels progress at timed intervals and more and more asteroids come down. You lose when one of them reaches the planet.
Screenshot:
http://www.rocketsoft.gm-school.uni.cc/uploads/ADScreen.JPG
Game File:
http://www.rocketsoft.gm-school.uni.cc/uploads/AsteroidDefense1.1.rar
All in all this game took around 24 hours to complete, and comes in at 601 lines of code(including comments.) Awesome job Microsoft, I can't imagine making a game like this using purely DirectX in that amount of time and with so few lines of code(I'm sure I could've gotten it lower if I knew the language better.)
All Replies
Izzy can I/you add that to the Personal Project screenshot gallery?
http://xbox360homebrew.com/photos/default.aspx
- You bet, I just put it on there :)
- Congratulations Izzy! I'll definitely be giving this a try tonight. Thanks for making your code available to the community. Very generous of you and truly appreciated.
George Clingerman wrote: Congratulations Izzy! I'll definitely be giving this a try tonight. Thanks for making your code available to the community. Very generous of you and truly appreciated.
Actually, the code isn't included at this point... However I do plan on making a tutorial in the future based on making this kind of game.- What jolly fun that was, are you going to include sound in a later version? I just finished my version of Pong (Pong360), you can download it from this link: http://www.freewebs.com/csfile1/Pong360.msi if you want to. Anyway, it's surprisingly easy to get a game up and running with XNA GSE, isn't it, I mean this is my first Pong game ever, and I've done 3D stuff and a small 2D game called StickMatch in SDL/C++. Though, I don't have any real physics in the game, just poor-man's physics. So, congrats on your game, Izzy545.
hey can you please help me out I am making space invaders, with one alien, can you please help me out I can't figure out how to shoot. For some reason I am just not thinking about it write can I see what you did for that plz it is all i have left in the game.
if you don't want to post it here can you e-mail it to me please percent20 _at_ gmail.com thank you.
percent20 wrote: hey can you please help me out I am making space invaders, with one alien, can you please help me out I can't figure out how to shoot. For some reason I am just not thinking about it write can I see what you did for that plz it is all i have left in the game.
if you don't want to post it here can you e-mail it to me please percent20 _at_ gmail.com thank you.
Yea, here's the logic behind my shooting code... I have an array called Laser[] with 3 dimensions. Laser[i,0] holds laser i's X position, Laser[i,1] holds laser i's Y position, Laser[i,2] holds whether or not laser i is active or not(1 is alive, 0 is dead)
Basically every update loop I check to see if the laser is alive, if it is I'll move it upwards and check for collision with an asteroid. If it's dead I do nothing.
In the draw sub I draw the laser if it's alive. If it's dead I do nothing.
Once these loops are in place to check if a laser is alive, and if it is perform actions on it, I just have to set a single laser to alive when I press the right button.
If you need a better explanation just say so, I'm happy to help.teh_programerer wrote: What jolly fun that was, are you going to include sound in a later version? I just finished my version of Pong (Pong360), you can download it from this link: http://www.freewebs.com/csfile1/Pong360.msi if you want to. Anyway, it's surprisingly easy to get a game up and running with XNA GSE, isn't it, I mean this is my first Pong game ever, and I've done 3D stuff and a small 2D game called StickMatch in SDL/C++. Though, I don't have any real physics in the game, just poor-man's physics. So, congrats on your game, Izzy545.
Thanks! I would like to include sound but I haven't learned how to get that in the game yet, but it's a definite possibility.
And yes, it is awesome how much easier it is to make games with this. We get to focus on the game coding without having to worry about all that messy background stuff.
I'm downloading your pong game right now.I installed it and it runs great.... man that ball can go fast! i like the forcefeedback that you added and the sound effects. Good job! Post a screenshot at http://xbox360homebrew.com/photos/default.aspx
- Hey Izzy, why not use the Spacewar sound and wave banks to get started? Sound.cs should guide you. :)
Mitch Walker - MSFT wrote: Hey Izzy, why not use the Spacewar sound and wave banks to get started? Sound.cs should guide you. :) Are there any restrictions on using those sounds/meshes - are we only allowed for learning, or are the provided "as is" for us to do what we want with?
(I'm not saying I'd be upset if I can't, it'd just be cool if we could :D)
Mark Coffman wrote: I installed it and it runs great.... man that ball can go fast! i like the forcefeedback that you added and the sound effects. Good job! Post a screenshot at http://xbox360homebrew.com/photos/default.aspx
Thanks a lot. it's great what you can do in a couple of days, anyway, I'm also going to add two-player over the next few days. Also, adding sound is very easy, I only hacked my game together, but with a few days more I'm sure I can clean up my code.
Izzy545 wrote: In this game you are a ship protecting a planet from incoming asteroids.
Game File:
http://www.rocketsoft.gm-school.uni.cc/uploads/AsteroidDefense.rarAny chance of a zip version? :-) I just uninstalled some rar garbage, but I'd be interested in seeing your game play :-)
Danny Tuppeny wrote: Izzy545 wrote: In this game you are a ship protecting a planet from incoming asteroids.
Game File:
http://www.rocketsoft.gm-school.uni.cc/uploads/AsteroidDefense.rarAny chance of a zip version? :-) I just uninstalled some rar garbage, but I'd be interested in seeing your game play :-)
I've put it in an .msi file format (if you don't mind Izzy545) @ http://www.freewebs.com/csfile1/Asteroid%20Defense.msi also I've got multiplayer support in Pong360 (try it without a controller connected : )) http://www.freewebs.com/csfile1/Pong360(2).msi . I really hope you don't mind about the intrusion, Izzy545.
teh_programerer wrote: Danny Tuppeny wrote: Izzy545 wrote: In this game you are a ship protecting a planet from incoming asteroids.
Game File:
http://www.rocketsoft.gm-school.uni.cc/uploads/AsteroidDefense.rarAny chance of a zip version? :-) I just uninstalled some rar garbage, but I'd be interested in seeing your game play :-)
I've put it in an .msi file format (if you don't mind Izzy545) @ http://www.freewebs.com/csfile1/Asteroid%20Defense.msi also I've got multiplayer support in Pong360 (try it without a controller connected : )) http://www.freewebs.com/csfile1/Pong360(2).msi . I really hope you don't mind about the intrusion, Izzy545.
It's no problem... Thanks for putting up the .msi for people that can't do RAR files.teh_programerer wrote: I've put it in an .msi file format (if you don't mind Izzy545) @ http://www.freewebs.com/csfile1/Asteroid%20Defense.msi also I've got multiplayer support in Pong360 (try it without a controller connected : )) http://www.freewebs.com/csfile1/Pong360(2).msi . I really hope you don't mind about the intrusion, Izzy545.
Cool, that's better. I'd rather not have to install it (so zip would've been more user-friendly), but I'll go play :)
Dude, that game is wicked! :)
Ok, it's no GRAW, but if my first XNA game is half as good as that, I'll be chuffed. I played it with the controller (rumble n all!), and it's impressive. I understand if you don't want to ship the source, but I think building that game from the ground up would make an awesome XNA tutorial. You should really consider it :-)
- Great game guys, My only only suggestion for these smaller games can we try to stay away from the MSI files I like just droping the files on my desktop and playing and it make for easy clean up.
BIG GRIN!
I think there's something else we're not seeing here.
The original post is an EXE file!!!
DIdn't MS say you'd have to distribute your source to share code?
Huge, major grin, if you don't have to share source!!!Charley Jones wrote: BIG GRIN!
I think there's something else we're not seeing here.
The original post is an EXE file!!!
DIdn't MS say you'd have to distribute your source to share code?
Huge, major grin, if you don't have to share source!!!I think that's only for XBOX 360 games.
- I've added in sound effects, as soon as I get in some music I'll upload the new version... I must say it adds a lot just to have some sort of sound in there :)
- Alright, sound is in there, and I also added in some animated sprites... That's all the work I'm doing on this game, as I'm moving on to a new project which I think should turn out very nicely :)
What kind of game are you going to make next, Izzy545?
http://www.freewebs.com/csfile2/Asteroid%20Defense%20Ver%202.msi
- Info about my new game is on my development diary...
http://izzy545devdiary.blogspot.com/
I've had this idea for a while and I think it's going to be a really unique and fun game... What would really be icing on top would be the ability to add XBox Live functionality to it when it's completed, but that's just a dream right now. teh_programerer wrote: Charley Jones wrote: BIG GRIN!
I think there's something else we're not seeing here.
The original post is an EXE file!!!
DIdn't MS say you'd have to distribute your source to share code?
Huge, major grin, if you don't have to share source!!!I think that's only for XBOX 360 games.
Thats only for the XBOX, but you can easily extract the source code from any .NET assembly (since its not compiled, just stored in MSIL). I use Reflector - its quite popular. Theres also a command line tool in the .NET SDK to extract source code, etc.- Izzy, I posted this up at 2old2play.com as a nice XNA event. If you want take a look at the write-up (its short, but to the point) check out: 2old2play.com.
Great progress!
CodeMonkey - Thanks for the write-up. I must say, I'm surprised this little game of mine has gotten so much attention... First Major Nelsons podcast, now Kotaku and this!
- how come whenever i try to play this game it comes up with an error report
- What's the error you get?
Does that mean you have the XBOX 360 controller connected to your computer?
Great start of a game by the way! : )

