0ad/binaries/data/mods/public/gui/session
Yves 8e30410109 Improve PickEntitiesAtPoint
First, do a ray intersection test with the bounding-sphere for all
entities on the map and then check the more detailed selection shape for
the remaining candidates. Do checks that require component lookups after
the ray intersection tests because these are relatively expensive.
The old method for figuring out which entities are below the mouse
cursor was incorrect because it does a 2D check to filter out the first
candidates which can lead to incorrect results with lower camera angles
and high buildings or buildings with a large footprint. Such problems
were avoided with quite a large radius for this 2D test and resulted in
a large number of candiate entities after this first test (200-500).
Also rename PickEntitiesAtPoint to PickEntityAtPoint and make it return
only one (the closest) match.

I've tested performance with the tracelogger by starting a map and then
moving the mouse in circles for one minute. The results were relatively
stable. I've compared the total time percentage of input.js:836, which
spends nearly all of the time in PickEntityAtPoint.
Ardennes Forest - Normal size:       Original: 41.46%    Patched: 31.6%
Ardennes Forest - Giant size:        Original: 40.59%    Patched: 51.55%

As we see, it's faster on normal map sizes but slower on giant maps with
a lot of entities.
This approach can be further improved with some kind of spatial
subdivision for the culling (like an octree), which would help the unit
renderer too. This way it should be possible to make it faster (and
still correct) on all map sizes and with a large total numbers of
entities.

This was SVN commit r16098.
2015-01-01 23:05:26 +00:00
..
dialogs Add yes-no dialog and general dialog code to present choices to players. Can be used by triggers. 2014-07-02 14:48:22 +00:00
hotkeys Fix warning when following units. Fixes #2971. 2014-12-29 18:56:00 +00:00
selection_panels_left Split the selection panels in session.xml into multiple xml files 2014-06-18 13:03:59 +00:00
selection_panels_middle Split the selection panels in session.xml into multiple xml files 2014-06-18 13:03:59 +00:00
selection_panels_right Split the selection panels in session.xml into multiple xml files 2014-06-18 13:03:59 +00:00
session_objects Split the selection panels in session.xml into multiple xml files 2014-06-18 13:03:59 +00:00
top_panel Internationalizes in-game menu text, based on patch by Jaison, fixes #2540. 2014-10-27 01:32:11 +00:00
diplomacy_window.xml Make hotkeys and top panel fully moddable by splitting up the xml file. Allow entire directories to be loaded via an 'include' to provide extra moddability (modders don't have to edit any files, they can just add new ones). 2014-06-17 13:03:55 +00:00
input.js Improve PickEntitiesAtPoint 2015-01-01 23:05:26 +00:00
menu.js Flip the buttons in the leave game confirmation dialog to the no/yes order to match other dialogs. 2014-11-16 22:21:57 +00:00
menu.xml Internationalizes in-game menu text, based on patch by Jaison, fixes #2540. 2014-10-27 01:32:11 +00:00
messages.js Properly localize tribute messages. 2014-12-12 01:11:04 +00:00
minimap_panel.xml Split the selection panels in session.xml into multiple xml files 2014-06-18 13:03:59 +00:00
placement.js Improve gui moddability by allowing to load an entire directory of scripts at once, and being able to split up big gui XML files. Fixes #2622 2014-06-11 17:14:35 +00:00
selection_details.js Change GUI tag parsing to use a FSM instead of using CParser. Refs #2589. 2014-11-16 02:10:28 +00:00
selection_panels_helpers.js Properly escape a character and remove a stray tag. 2014-11-16 18:00:02 +00:00
selection_panels.js Remove duplicated layers of unescaping which required multiple escapes in some places. 2014-12-13 01:08:29 +00:00
selection.js Slightly improve fogging performance by avoiding the constant deletion/re-creation of mirages. 2014-11-12 15:56:45 +00:00
session.js Escape special character. 2014-11-16 22:06:18 +00:00
session.xml Improve PickEntitiesAtPoint 2015-01-01 23:05:26 +00:00
setup.xml Add build/research/train time to tooltips. 2012-11-11 23:08:44 +00:00
sprites.xml Internationalizes in-game menu text, based on patch by Jaison, fixes #2540. 2014-10-27 01:32:11 +00:00
styles.xml * Add support for fallback fonts in the font builder. 2014-03-17 10:13:49 +00:00
top_panel.xml Make hotkeys and top panel fully moddable by splitting up the xml file. Allow entire directories to be loaded via an 'include' to provide extra moddability (modders don't have to edit any files, they can just add new ones). 2014-06-17 13:03:55 +00:00
trade_window.xml Make hotkeys and top panel fully moddable by splitting up the xml file. Allow entire directories to be loaded via an 'include' to provide extra moddability (modders don't have to edit any files, they can just add new ones). 2014-06-17 13:03:55 +00:00
unit_actions.js improve gui performance, refs #2179 comment 28 2014-10-18 16:37:53 +00:00
unit_commands.js improve gui performance, refs #2179 comment 28 2014-10-18 16:37:53 +00:00
utility_functions.js GUI cleanup. 2014-11-13 01:26:36 +00:00