Jump to content

Distinct quadtrees for static and moving objects


yahiko
 Share

Recommended Posts

I am currently implementing a quadtree (in TypeScript) for a game prototype.

In order to optimize performances, a little bit, instead of managing just one quadtree for all game objects, I am wondering if it would be speed-wise to separate static objects (like walls) from movings objects (like characters).

This way, the static layer shall never be updated (cleared and populated) each frame which may save some CPU cycles.

Obviously, in order to check collision, we will have to retrieve objects from the static and the moving objects layers.

What do you think about this idea? Is it relevant?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...