google-site-verification: googlebaca44933768a824.html My XNA game - Old Royal Hack Forum

Announcement

Collapse
No announcement yet.

My XNA game

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    My XNA game



    so yeah made this simple game today...

    I'm learning XNA, I want to make an FPS game some day!
    ok bai

    #2
    Re: My XNA game

    wow great.

    Comment


      #3
      Re: My XNA game

      Thanks!

      here's the snippet for the rotation & speed vectors
      Code:
      if (modelRotation >= (MathHelper.Pi*2))
                  {
                      modelRotation = 0.0f;
                  }
                  if (modelRotation < 0)
                  {
                      modelRotation = (MathHelper.Pi * 2);
                  }
                  modelRotationstr = Convert.ToString(modelRotation);
                  speedx = (Math.Sin(modelRotation)) * 30;
                  speedz = (Math.Cos(modelRotation)) * 30;
                  float speedxdouble, speedzdouble;
                  speedxdouble = (float)speedx;
                  speedzdouble = (float)speedz;
      
                  KeyboardState keyboardState = Keyboard.GetState();
                  if (keyboardState.IsKeyDown(Keys.Up))
                  {
                      shipPosition += Vector3.Forward * speedzdouble;
                      shipPosition += Vector3.Left * speedxdouble;
                  }
                  if (keyboardState.IsKeyDown(Keys.Down))
                  {
                      shipPosition += Vector3.Backward * speedzdouble;
                      shipPosition += Vector3.Right * speedxdouble;
                  }
                  if (keyboardState.IsKeyDown(Keys.Left))
                  {
                      modelRotation += 10 * MathHelper.ToRadians(0.1f);
                  }
                  if (keyboardState.IsKeyDown(Keys.Right))
                  {
                      modelRotation -= 10 * MathHelper.ToRadians(0.1f);
                  }
      ok bai

      Comment


        #4
        Re: My XNA game

        thanks :)

        omg 3d awesome video.

        but you will get the complett sources public ?

        Comment


          #5
          Re: My XNA game

          Originally posted by Bankock337 View Post
          thanks :)

          omg 3d awesome video.

          but you will get the complett sources public ?
          sure if you want to...



          You need Microsoft Visual C# (2010) and XNA library installed
          ok bai

          Comment


            #6
            Re: My XNA game

            Updated it, now it is like 3rd person game, it shows the spaceship like in driving games (from back)

            like this:
            ok bai

            Comment


              #7
              Re: My XNA game

              Originally posted by lolimsoasd View Post
              Updated it, now it is like 3rd person game, it shows the spaceship like in driving games (from back)

              like this:
              Nice ;)





              Comment


                #8
                Re: My XNA game

                I'm working with Ogre3D atm and havent got half as much done as you already have because I'm at work, keep up the good work!
                lolmaoman: Germans are born with a lifetime x22 login engraved into their birth certificates. True story.
                I DONT HAVE TEAMVIEWER AND IM NOT GOING TO GIVE ANY 24/7 ONLINE SUPPORT VIA STEAM, XFIRE OR OTHER IM PROGRAMS SO DONT BOTHER ASKING. THANKS.

                Comment


                  #9
                  Re: My XNA game

                  Well coding games on xna is ridiculously easy. You can make things which would take weeks on c++/opengl, in under one day
                  ok bai

                  Comment

                  Working...
                  X