Comments on: Simple platformer game in XNA tutorial – part six "jumping and stopping" http://xnafan.net/2013/04/simple-platformer-game-in-xna-tutorial-part-six-jumping-and-stopping/ XNA tutorials, code and games Fri, 10 Aug 2018 04:55:21 +0000 hourly 1 https://wordpress.org/?v=4.2.22 By: Jonas http://xnafan.net/2013/04/simple-platformer-game-in-xna-tutorial-part-six-jumping-and-stopping/comment-page-1/#comment-63046 Tue, 14 May 2013 17:46:05 +0000 http://xnafan.net/?p=1009#comment-63046 Hi...

Thanks for the links. looking forward to your other tutorials...

]]>
By: admin http://xnafan.net/2013/04/simple-platformer-game-in-xna-tutorial-part-six-jumping-and-stopping/comment-page-1/#comment-62804 Sat, 11 May 2013 20:54:11 +0000 http://xnafan.net/?p=1009#comment-62804 Thanks Jonas! I will leave your comment as an idea for alternate control of the Jumper :)
There's a couple of good tutorial on per-pixel collision detection here:
http://xbox.create.msdn.com/en-US/education/catalog/tutorial/collision_2d_rectangle
and here:
http://www.andrewshough.com/development/per-pixel-collision-detection-in-2d-games/

Regarding A* - i will put that on the list, and make a tutorial on that in the not too far future. I am writing on two others right now :).

Kind regards - Jakob

]]>
By: Jonas http://xnafan.net/2013/04/simple-platformer-game-in-xna-tutorial-part-six-jumping-and-stopping/comment-page-1/#comment-62774 Sat, 11 May 2013 10:30:57 +0000 http://xnafan.net/?p=1009#comment-62774 I would recommend, change the movement class so the button for jumping is not so sensitive like and oldstate thing so you can't keep the spacebar held down to jump(of course unless you want that)

private void CheckKeyboardAndUpdateMovement()
{
KeyboardState keyboardState = Keyboard.GetState();

if (keyboardState.IsKeyDown(Keys.Left)) { Movement -= Vector2.UnitX * .5f; }
if (keyboardState.IsKeyDown(Keys.Right)) { Movement += Vector2.UnitX * .5f; }
if (keyboardState.IsKeyDown(Keys.Space) && IsOnFirmGround())
{
if (!oldState.IsKeyDown(Keys.Space))
{
Movement = -Vector2.UnitY * 25;
}
}
else if (oldState.IsKeyDown(Keys.Space))
{
// Key was down last update, but not down now, so
// it has just been released.
}
oldState = keyboardState;
}

Also a question. Any chance of making per pixel collision instead..(a tutorial maybe)
And finally i would really like to learn A* path finding, you have any expertise on that maybe do an tutorial.
Well appreciate all you work thank you very much.

]]>
By: admin http://xnafan.net/2013/04/simple-platformer-game-in-xna-tutorial-part-six-jumping-and-stopping/comment-page-1/#comment-61945 Sun, 28 Apr 2013 12:30:14 +0000 http://xnafan.net/?p=1009#comment-61945 You are most welcome! :)

]]>
By: Jonas http://xnafan.net/2013/04/simple-platformer-game-in-xna-tutorial-part-six-jumping-and-stopping/comment-page-1/#comment-61939 Sun, 28 Apr 2013 09:31:12 +0000 http://xnafan.net/?p=1009#comment-61939 Looking good. thank you for your work..

]]>