Scene sorting

I recently treed to add coalition detection into my game and was shocked by the decrease in performance.  While my code was not yet optimized and I can probably speed it up with simple optimizations, I think scene sorting would be necessary for a real speed increase. Scene sorting is code that places Spatial in nodes based on there location. Different types of programs would use different types of sorting. For example in terrain the Spatials would be put in the closest TerrainBlock. Scene sorting would improve both coalition detection and cuddling. Bsp and Portals should also implement seen sorting. The Sorting should be dynamic, updating every time a Spatial is move. Forgive me if this is already on the ToDo list, I know Mojo mentioned something similar a year ago but I can not find it on the list. 

I think zou only should take a look at the upcoming features of 0.10

theres what u try to find i think



http://jmonkeyengine.com/index.php?option=com_content&task=view&id=40&Itemid=64&PHPSESSID=b884e37c9ff367c00c1ce61046468f71

As you already wrote, Badmi, there are many ways to organize a scenegraph. One might even want to organize the scenegraph in an inefficient way for collision detection to allow easier transformations and have a second hierarchy for collision detection…

BSP implementation, which was planned for 0.10, might help you…

…but obviously you can already reorgnize the scenegraph for your needs. TestSwarm does that already - you can compare the speed of the collision detection of 1000 objects with and without scenegraph organization by toggling it on and off in the test. It is done in a separate class that you could use in your own application, too. It is questionable tough if the specific algorithm is suited for your needs…

Cream said:

I think zou only should take a look at the upcoming features of 0.10
theres what u try to find i think

http://jmonkeyengine.com/index.php?option=com_content&task=view&id=40&Itemid=64&PHPSESSID=b884e37c9ff367c00c1ce61046468f71


I understand that bsps and portals are part of .10. There are different ways of handling moving objects in bsps and portals, I was requesting that a specific one be available.

i know this ist maybe a violation of the forum rules, but badmi: you have to tell us where you're from!