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 884653
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T12:46:58+00:00 2026-05-15T12:46:58+00:00

So I have been trying to recreate Pong in Box2D to learn how to

  • 0

So I have been trying to recreate Pong in Box2D to learn how to use the engine and I think creating pong in it is more complicated than i thought.
I have the collision down by itself, i have the ball restitution set at 1.0 , my only problem is I have no idea how to have the ball hit the paddle, bounce back at the right angle and have enough speed to reach the other side. I just want it to look like a natural Pong Game.
I have looked at c++,actionscript but it seems like no one has really fully implemented a pong game.

Would I have to just implement my own physics?

  • 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-05-15T12:46:59+00:00Added an answer on May 15, 2026 at 12:46 pm

    Basically, for an authentic Pong feel, you need to implement your own physics.

    Classic games generally implement physics as simple 2D velocity and position (and maybe acceleration), and then fake everything else.

    (It’s worth noting that even modern games fake as much as they can get away with. It’s not worth implementing something the hard way if you can do it the easy way and still get the same gameplay feel.)

    The “faked” physics for Pong should be fairly simple. Here is a very basic, not necessarily complete bit of simplistic physics for you:

    Vector2 position;
    Vector2 velocity;
    protected override void Update(GameTime gameTime)
    {
        position += velocity * (float)gameTime.ElapsedGameTime.TotalSeconds;
    
        if((IsInsideLeftBat(position) && velocity.X <= 0)
                || IsInsideRightBat(position) && velocity.X >= 0)
        {
            velocity.X = -velocity.X; // Bounce the other way
            // To change things up, maybe you can change velocity.Y too.
        }
    
        // And of course handle the ball going out of the play field, scoring, etc...
    }
    

    Now, say you really have need for real physics in your game. A pong game with real physics could be fun (in fact somebody has already done it, even real-er).

    The thing I said about “faking it” still applies. Physics in games is usually more about tweaking things to get something that feels right than actual realism. Perhaps you need to increase your bounce coefficient to 1.1, and maybe add some linear drag to the ball so it doesn’t fly out of control?

    (Or if you’re having trouble getting the ball to the other side, try reducing linear drag.)

    Actually what is more likely for a “main character” in a game – you want to keep it in the physics simulation so it can interact with things (perhaps your play field is littered with obstacles – that could be fun) – but you want to have complete control over its motion.

    To do this simply, after your physics engine update runs, go in and change any values you don’t like! In Pong’s case this might be something simple like resetting the velocity of the ball so it moves with a constant speed each frame. I imagine you’re already doing something like this for the paddles – to set their position each frame.

    (I used this approach when I made a platformer on a physics engine.)

    Another alternative way to fake things might be to add a collision handler to the paddles that sets the ball’s velocity just how you like it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been trying to learn Prolog and came across this syntax on some
I am trying to learn css. up to now I have been lagging behind
I had a HD hardware failure the otherday and have been trying to recreate
I am trying to recreate this , and I have been fairly successful. I
Have been trying to encrypt an xml file to a string so that I
Have have been trying to make a validator for my xml files. I have
I have been trying to setup git for our web development team unsuccessfully. Some
I have been trying for almost a week now to create an SQLite database
I have been trying to generate report as per age differences of different months
I have been trying to create a ListView which I can sort using drag

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.