Games 101 w/ Verax
Página 1 de 1. • Comparte
Games 101 w/ Verax
GAMES 101 w/ VERAX:
A simple topic where I share tips and tricks within game programming, game designs, and just about everything within games.
A simple topic where I share tips and tricks within game programming, game designs, and just about everything within games.
Verax- Messages : 1139
Data de inscrição : 27/06/2014
Re: Games 101 w/ Verax
QUADTREES FOR COLLISION DETECTION:
If you have a game where your collision detection is taking way too much CPU power and is making the game slow, you can use a quadtree to reduce the number of collision detection operations.
A quadtree is basically a variant of a binary tree; it has four child nodes instead of two. The idea of a quadtree is to avoid calculating collisions for objects that cannot possibly collide. This is done by splitting our tree when it reaches x objects. Have a look at this:
Here we have a quadtree that has been split into four, then yet again it has been split into four. The objects in the top left cannot collide with the objects in the bottom left, and therefore we reduce the number of collision detection calls/calculations. Neat, eh?
If you have a game where your collision detection is taking way too much CPU power and is making the game slow, you can use a quadtree to reduce the number of collision detection operations.
A quadtree is basically a variant of a binary tree; it has four child nodes instead of two. The idea of a quadtree is to avoid calculating collisions for objects that cannot possibly collide. This is done by splitting our tree when it reaches x objects. Have a look at this:
Here we have a quadtree that has been split into four, then yet again it has been split into four. The objects in the top left cannot collide with the objects in the bottom left, and therefore we reduce the number of collision detection calls/calculations. Neat, eh?
Verax- Messages : 1139
Data de inscrição : 27/06/2014
Temas similares
» Ω Verax's Programming Tutorials Ω
» Games Club
» Crimson Izanagi's RP Storage (Do Not Post)
» ♡ Clube de fãs de The Hunger Games ♡
» Mini-games highscore!
» Games Club
» Crimson Izanagi's RP Storage (Do Not Post)
» ♡ Clube de fãs de The Hunger Games ♡
» Mini-games highscore!
Página 1 de 1.
Permisos de este foro:
No puedes responder a temas en este foro.
|
|