Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7864447
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T23:47:35+00:00 2026-06-02T23:47:35+00:00

http://pastebin.com/YTiNw7rX If you test the code out, Pushing the paddle all the way up

  • 0

http://pastebin.com/YTiNw7rX

If you test the code out, Pushing the paddle all the way up to the top of the screen, and let it go, the paddle jumps down a few pixels. And I can’t seem to figure out how to fix this. I would imagine it has something to do with the texture.

Edit: Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T23:47:36+00:00Added an answer on June 2, 2026 at 11:47 pm

    This is what happens:

    1. You hold the key.

    2. The functions checks and/or adjusts the current Y.

    3. The function updates the current Y according to your key press.

    4. The current Y is displayed on the screen.

    5. You let go of the key.

    6. The functions checks and/or adjusts the current Y.

    7. The corrected Y is displayed on the screen, causing a jump from the previous Y.

    So, you will want to update your current Y before the check, not after it.

    protected override void Update(GameTime gameTime)
    {
        // Allow the game to exit.
        if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed)
            this.Exit();
    
        // Update the paddles according to the keyboard.
        if (Keyboard.GetState().IsKeyDown(Keys.Up))
            PongPaddle1.Y -= paddleSpeed;
    
        if (Keyboard.GetState().IsKeyDown(Keys.Down))
            PongPaddle1.Y += paddleSpeed;
    
        // Update the paddles according to the safe bounds.
        var safeTop = safeBounds.Top - 30;
        var safeBottom = safeBounds.Bottom - 70;
    
        PongPaddle1.Y = MathHelper.Clamp(PongPaddle1.Y, safeTop, safeBottom);
        PongPaddle2.Y = MathHelper.Clamp(PongPaddle2.Y, safeTop, safeBottom);
    
        // Allow the base to update.
        base.Update(gameTime);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

http://pastebin.com/index/9M2rA8cx that has all my code. You will notice that the two div's are
http://pastebin.com/1btVw8Cb There are two classes in the above code. So above is my code
FULL CLASS CODE HERE: http://pastebin.com/rdjDGLJS EDIT: Latest code snippet taken from original posters comment
I have this code: http://pastebin.com/Sd9WKZFr When i call something like rate(60, -6000, 120000) it
Code: http://pastebin.com/h8WuYbJn Full error: Fatal error : Call to undefined function AddUser() in C:\xampp\htdocs\scripts\steam.php
A copy of my code is here http://pastebin.com/jcLRCrQr Everything loads fine and the CCS
i am porting opera recovery from alredy existed c++ code http://pastebin.com/ViPf0yn6 i struck at
I am porting opera recovery from already existing C++ code http://pastebin.com/ViPf0yn6 I struck at
I am trying to learn Flex and now i have the next code: http://pastebin.com/rZwxF7w1
http://pastebin.com/rXbeKqAa Hi all I have been trying to parse the above JSON into a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.