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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T18:03:50+00:00 2026-05-27T18:03:50+00:00

I may have a problem imagining the best solution for a collision detection related

  • 0

I may have a problem imagining the best solution for a collision detection related problem. I’m writing a 2D top-down game in Java with many objects that could collide. I am planning to use the approach to create a multi resolution map, with specific objects in specific resolutions of map squares, so that I can go around the O(n²) problem and narrow down the objects in an area that could be colliding.
I have to keep a list of all objects that are residing in each map square. However, since many or sometimes all objects are moving, I have to keep these lists updated all the time.
I guess using every render cycle of an object to update the map square lists will be quite resource consuming and will probably destroy the advantage I gained by using multi resolution maps to narrow down the number objects that could be colliding with another object.

My question is now, how to keep track of all objects and filling them into the according map squares? Is there an easy way, or should I maybe choose another concept for the collision detection?

I might have forgotte some details, if there is some more information I should provide, please reply.

Thanks in advance
Best regards

  • 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-27T18:03:51+00:00Added an answer on May 27, 2026 at 6:03 pm

    i assume that you have non moving objects and moving objects. the static objects needs to register themselves only once in the multi resolution map. the moving objects have only to check if they belong now to another square if they really moved.

    depending on how you do the actual collision detection you only need to recheck if the moving objects traveled a certain distance. that is the case when you check collisions with an object in the current and all surrounding squares.

    the squares far away from the players square usually also don’t need to be checked every single physics pass. there is usually no action going on anyway.

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

Sidebar

Related Questions

Solution to original problem (below) may have been discovered. I commented out <identity> ...
I think I have a synchronization problem...It may be too basic..Please help.. I have
Warning: I may have the wrong 'problem statement' but here it goes: A Campaign
I have problem to send array from database via email. I´m sure may people
I have a problem/question that I may have been staring at too long today.
I may have a small problem defining what I ask but I'll do my
I think I may have found a problem with ASP.NET MVC and it's event
You may have seen JavaScript sliders before: http://dev.jquery.com/view/tags/ui/1.5b2/demos/ui.slider.html What I'm envisioning is a circular
You may have noticed that we now show an edit summary on Community Wiki
You may have heard of PawSense , a Windows-only utility that prevents keystrokes from

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.