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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T12:31:46+00:00 2026-06-17T12:31:46+00:00

I am aware that LimeJS contains Box2d for collision detection. I am looking for

  • 0

I am aware that LimeJS contains Box2d for collision detection. I am looking for some help getting started creating the detection. This is what I have:

A ball drops from the top of the screen. There are three draggable platforms below. Essentially, I need the ball to hit a platform, and then roll along the top till it reaches the edge and falls off.

This detection is essential to the game I am creating (by the way, I am a Web Developer, not a game developer, but I know JavaScript, so this was assigned to me), as it will also determine scoring (there is a target at the bottom). I feel like if I can get help on the detection and change of direction, I could make everything else happen.

Thank you.

  • 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-17T12:31:46+00:00Added an answer on June 17, 2026 at 12:31 pm

    I don’t think it’s necessary for you to get weighed down by box2d. There’s a bit of a learning curve and it doesn’t sound like you need it, unless you want your ball to bounce realistically off of the platforms.

    Here’s a link for a very simple and easy to read collision detection function:
    http://www.gamedev.net/page/resources/_/technical/game-programming/collision-detection-r735

    Please note that in that example it considers the y-axis to start at the top of the screen with positive in the down direction.

    Basically, what you want to do is check if the ball is touching any of the platforms as it falls. You can use the bounding boxes of your sprites. When it touches, you need to make some sort of reaction. If the platforms are flat, then just stop the ball from moving in the y-direction. If the platforms are sloped then you’re going to need to do some trig to figure out the direction of the balls movement.

    After that, you’ll have to check if the ball touched the target. If it does, add to the score, play some bells and whistles and let the player start over.

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

Sidebar

Related Questions

I am aware that this question has been asked before, but I have tried
I'm aware that variants of this question have been asked before, but I do
I aware that this will be a less programming question, but still... How can
I'm aware that this is possible with the os module's os.system(color) function, but this
I am aware that this is a more subjective question than is preferred, but
I'm aware that an ArrayList is probably not the way to go with this
I am aware that this question is asked before but Azure Status Dashboard shows
I am aware that this: <?php $file2 = file('website/files/myfolder/file.html'); echo $file2[8]; echo $file2[9]; echo
I'm aware that there probably isn't a perfect solution to my question (this sounds
I'm fully aware that this is the wrong way of doing it, but I'm

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.