-
Notifications
You must be signed in to change notification settings - Fork 360
Closed
Description
Enhancement request:
Replace current arcade has_line_of_sight implementation with shapely library for faster visibility-checking.
What should be added/changed:
1. shapely library in the requirements.txt
2. shapely imports in arcade.paths.py
3. paths.has_line_of_sight function would look like this:
What would it help with?
Checking visibility between Sprites would be much faster. Shapely is extremely efficient in finding intersections between geometries.
What documentation needs to change?
Docts for has_line_of_sight method of arcade.paths
What is wrong with it? How can it be improved?
Current has_line_of_sight function works, but it is not so efficient. With just 25 sprites and 25 obstacles if each sprite try to find line of sight to each other, it takes roughly 7 seconds for frame to update! With Shapely it is just 0.18 second: 35 times faster! With 1 player-sprite checking line of sight against 1156 enemies and 25 obstacles, it currently takes about 16 seconds per frame, whereas shapely does the job within 0.09 second
Metadata
Metadata
Assignees
Labels
No labels

