Ask a questionAsk a question
 

General DiscussionMy first game... Asteroid Defense.

  • Friday, September 01, 2006 8:44 PMIzzy545 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    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

  • Friday, September 01, 2006 8:49 PMMark CoffmanMVPUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Izzy can I/you add that to the Personal Project screenshot gallery?

    http://xbox360homebrew.com/photos/default.aspx

     

  • Friday, September 01, 2006 8:55 PMIzzy545 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    You bet, I just put it on there :)
  • Friday, September 01, 2006 8:59 PMGeorge ClingermanMVPUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    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.
  • Friday, September 01, 2006 9:01 PMIzzy545 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
     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.
  • Friday, September 01, 2006 9:02 PMteh_programerer Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    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.
  • Friday, September 01, 2006 9:04 PMpercent20net Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    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.

  • Friday, September 01, 2006 9:12 PMIzzy545 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
     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.
  • Friday, September 01, 2006 9:14 PMIzzy545 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
     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.
  • Friday, September 01, 2006 10:25 PMMark CoffmanMVPUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

     teh_programerer,

    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

  • Friday, September 01, 2006 10:57 PMMitch Walker - MSFT Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hey Izzy, why not use the Spacewar sound and wave banks to get started? Sound.cs should guide you. :)
  • Saturday, September 02, 2006 9:22 AMDanny Tuppeny Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

     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)

  • Saturday, September 02, 2006 11:16 AMteh_programerer Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
     Mark Coffman wrote:

     teh_programerer,

    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.

  • Saturday, September 02, 2006 2:49 PMDanny Tuppeny Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

     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.rar

    Any chance of a zip version? :-) I just uninstalled some rar garbage, but I'd be interested in seeing your game play :-)

  • Saturday, September 02, 2006 3:49 PMteh_programerer Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
     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.rar

    Any 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.

  • Saturday, September 02, 2006 4:44 PMIzzy545 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
     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.rar

    Any 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.
  • Saturday, September 02, 2006 5:16 PMDanny Tuppeny Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
     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 :)

  • Saturday, September 02, 2006 5:21 PMDanny Tuppeny Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    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 :-)

  • Saturday, September 02, 2006 6:01 PMaka_Big_Wurm Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    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.
  • Sunday, September 03, 2006 3:16 AMCharley Jones Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    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!!!

  • Sunday, September 03, 2006 11:19 AMteh_programerer Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
     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.

  • Sunday, September 03, 2006 2:47 PMIzzy545 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    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 :)
  • Sunday, September 03, 2006 5:59 PMIzzy545 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    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 :)
  • Sunday, September 03, 2006 7:44 PMteh_programerer Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    What kind of game are you going to make next, Izzy545?

    http://www.freewebs.com/csfile2/Asteroid%20Defense%20Ver%202.msi

  • Monday, September 04, 2006 8:41 PMIzzy545 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    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.
  • Monday, September 04, 2006 9:07 PMJim.Welch Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
     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.
  • Tuesday, September 05, 2006 7:07 PMcodemonkey420 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    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
  • Tuesday, September 05, 2006 7:20 PMIzzy545 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    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!
  • Saturday, September 09, 2006 2:04 PMSpinal Fish Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    how come whenever i try to play this game it comes up with an error report
  • Monday, September 11, 2006 3:56 PMJim PerryMVPUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    What's the error you get?
  • Tuesday, September 19, 2006 5:20 AMJusedawg Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Does that mean you have the XBOX 360 controller connected to your computer?

    Great start of a game by the way! : )