Java-Gaming.org
Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
Featured games (78)
games approved by the League of Dukes
Games in Showcase (406)
games submitted by our members
Games in WIP (290)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
   Home   Help   Search   Login   Register   
  Show Posts
Pages: [1]
1  Game Development / Game Play & Game Design / Re: Quadtree-like structure for dynamic / moving Game Objects on: 2012-11-21 19:07:36
Hi All,

I ask before, but it seems like my post got lost near the top.

It seems a few people are really against using QTs, but for larger worlds I don't see how they can be worse than using a grid.  So again I ask this question to learn ..

Quadtrees are not efficient in today's CPUs. Use a grid instead.

It's both incredibly easy to develop, and much, much faster.

@Riven, as per my previous quesion .. I would have said it depends entirely on your scene and the implementation of the quad-tree whether grids are faster.   I say this because I imagine that the way you store the grid would be exactly the same way you'd store a qt (in that both are essentially just AABB - but, unless I am missing something, you can then cull huge areas of your game world with a qt which you cannot do with a grid).  So it would seem to me like the only difference between a grid and a at is you are removing the tree structure? 

That, and you have to do bounds checking (on AABBs) for every level, up to 4 times. All in all, there are lots of conditional jumps and lots of scattered memory access. In modern CPUs you get a rather large penalty for such code.

Needless to say, using a grid is just simpler to code, which, in this case, is probably most important.

@Riven Here you mention AABBs as if they are only applicable to QTs, but you would need to do this on a grid too surely?  Also, can you tell me which CPU penalties you are referring to ?

Thanks,
-John
2  Game Development / Game Play & Game Design / Re: Quadtree-like structure for dynamic / moving Game Objects on: 2012-11-21 08:43:48
Quadtrees are not efficient in today's CPUs. Use a grid instead.

It's both incredibly easy to develop, and much, much faster.

Hi all,

In my quest to learn new things, could you explain this a little more? 

I would have said it depends entirely on your scene and the implementation of the quad-tree whether grids are faster.   I say this because I imagine that the way you store the grid would be exactly the same way you'd store a qt (in that both are essentially just AABB - but, unless I am missing something, you can then cull huge areas of your game world with a qt which you cannot do with a grid).  So it would seem to me like the only difference between a grid and a at is you are removing the tree structure? 

Thanks,
3  Games Center / WIP games, tools & toy projects / Re: [WIP] Daedalus on: 2012-11-03 19:33:31
Hi deathpat,

The game looks and plays great!

I just wanted to ask though as I couldn't see any options for it - have you considered not having the camera rotate around with the aiming like that?  I cannot help but feel the game would be more fun with a cannon fodder control scheme.

anywho - good work.
Pages: [1]
Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
 
Get high quality music tracks for your game!

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

The invasion has landed! On Mars! And you're there to beat 'em!
cubemaster21 (64 views)
2013-05-17 21:29:12

alaslipknot (73 views)
2013-05-16 21:24:48

gouessej (104 views)
2013-05-16 00:53:38

gouessej (101 views)
2013-05-16 00:17:58

theagentd (111 views)
2013-05-15 15:01:13

theagentd (101 views)
2013-05-15 15:00:54

StreetDoggy (146 views)
2013-05-14 15:56:26

kutucuk (169 views)
2013-05-12 17:10:36

kutucuk (168 views)
2013-05-12 15:36:09

UnluckyDevil (177 views)
2013-05-12 05:09:57
Complex number cookbook
by Roquen
2013-04-24 12:47:31

2D Dynamic Lighting
by Oskuro
2013-04-17 16:46:12

2D Dynamic Lighting
by Oskuro
2013-04-17 16:45:57

2D Dynamic Lighting
by Oskuro
2013-04-17 16:23:20

Noise (bandpassed white)
by Roquen
2013-04-05 17:36:01

Noise (bandpassed white)
by Roquen
2013-04-03 16:17:38

Java Data structures
by Roquen
2013-03-29 13:21:12

Topic Request
by kutucuk
2013-03-22 21:42:01
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!
Page created in 0.187 seconds with 21 queries.