Project Starfield, Xna game

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
13,430
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Jan 4, 2009

I made this game for experimental purposes :) To learn some more about 2D programming. And it turned out to a kind of funny game, so I posted a video of it :)
Showing the only currently working mode, survival mode.

Developed in C#/Xna all by myself, just had a lil. bit of help with background.

Feel free to comment and give feedback!

Carl Douglas - Kung Fu Fighting

Category:

Gaming

Tags:

License:

Standard YouTube License

Link to this comment:

Share to:

Uploader Comments (SimonAJager)

  • I have a few questions if you don't mind me asking? How did you get your bullets in all directions to go the same speed? I just started making an XNA game and have had some issues with this, also, how did you get your firing working in all directions? If you want to PM me, I can send you my coding thus far so maybe you could see what I'm doing wrong.

  • @foulplay2 Absolutely. The trick was to use Cosine and Sinus to calculate the trajectory of all the bullets. This was something I didn't have much understanding of when I did this, though now I do - Learning by doing that is.

    I would recommend that you look up trigonometric functions to learn how Cosine and Sinus works - if you dont already that is. You can find these under the "Math" class. (Math.Cosine(rotation)) for instance.

  • @foulplay2 Here is away of calculating a bullets speed. Though I'll be doing this straight from my head so there might be some spelling issues or something like that.

    Vector2 bulletLocation = Vector.Zero;

    float bulletSpeed = 5f;

    Vector2 bulletTrajectory = new Vector2(bulletSpeed, bulletSpeed) *

    new Vector2(Math.Cos(firingRotatio­n), Math.Sin(firingRotation));

    And then multiply the bulletLocation with the bulletTrajectory every frame. Hope this helps abit.

  • @foulplay2 You might have to throw rotation that you pass into the Math.Cos and Math.Sin functions to radians or degrees. Not sure which one it wants. You can do this by using the "MathHelper" class. For Instance. MathHelper.ToRadians(firingRot­ation);

  • so nice man! i like the particles (;

    what is this song? i love it! ^.^

  • @Grinchok Haha thank you! The song is Database - Alexander Perls my friend :).

see all

All Comments (32)

Sign In or Sign Up now to post a comment!
  • @SimonAJager Thank you so much for your reply I'll do as you suggested and research cosine and sine. The one difference with my program is that the character is free moving, and can fire in any direction (using 360 controller). I'll just have to figure out how to apply this to my game, but it shouldn't be too simple, probably taking the x and y of the joystick and converting it to radians.

  • Very good job!

  • nice.

    simple but cool :)

  • @SimonAJager your welcome! thanks a lot!, you can watch some basic particles in my account.. i made they.. but they are a little bit old.. xD

Loading...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more