You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hitboxes can not be seperated, meaning multiple hitboxes cannot be be generated from one texture.
System Info
Arcade 3.0.0.dev39
vendor: Apple
renderer: Apple M2
version: (4, 1)
python: 3.12.3 (v3.12.3:f6650f9ad7, Apr 9 2024, 08:18:47) [Clang 13.0.0 (clang-1300.0.29.30)]
platform: darwin
pyglet version: 2.1.rc1
PIL version: 11.0.0
Actual behavior:
Let everything in RED be the image and everything that is not red be transparent. If the hitbox is calculated for a png like this, arcade draws the hitbox as shown in blue.
Expected behavior:
Instead of the behavior shown in Actuall behavior, there should be a option to seperate hitboxes as shown in the image above.
Steps to reproduce/example code:
Simply have a png with a few seperate shapes and let arcade calculate the hitbox.
The text was updated successfully, but these errors were encountered:
TL;DR: Splitting textures into multiple hitboxes seems like a new feature worth considering
To my understanding, Arcade's API assumes the following:
Textures will each have one contiguous sprite element
There will be one contiguous unscaled hitbox per each texture
Sprites have one current texture and one scaled hitbox
Most users will use smaller convex sprites or grid-based games
The last item is important. From what you said on Discord earlier, you had perf drop when using detailed hitboxes:
oh and the fps of the game dropped from 60 -> 30
If the terrain is non-moving, try enabling spatial hashing by passing spatial_hashing=True when creating the terrain list. Since your sprites are large and detailed, you will need to be extra careful about making sure you don't move your sprites. Otherwise, it seems likely you'll have big perf drops.
Bug Report
Hitboxes can not be seperated, meaning multiple hitboxes cannot be be generated from one texture.
System Info
Arcade 3.0.0.dev39
vendor: Apple
renderer: Apple M2
version: (4, 1)
python: 3.12.3 (v3.12.3:f6650f9ad7, Apr 9 2024, 08:18:47) [Clang 13.0.0 (clang-1300.0.29.30)]
platform: darwin
pyglet version: 2.1.rc1
PIL version: 11.0.0
Actual behavior:
Let everything in RED be the image and everything that is not red be transparent. If the hitbox is calculated for a png like this, arcade draws the hitbox as shown in blue.
Expected behavior:
Instead of the behavior shown in Actuall behavior, there should be a option to seperate hitboxes as shown in the image above.
Steps to reproduce/example code:
Simply have a png with a few seperate shapes and let arcade calculate the hitbox.
The text was updated successfully, but these errors were encountered: