A version of Arcade which allows running Arcade games in a web browser
Minor tweak to repo URL This is to prevent the "homepage" link on the PyPI project page from causing HTTP 404 responses.
Merge pull request #66 from Keyacom/Keyacom-patch0
Minor tweak to repo URL
This is to prevent the "homepage" link on the PyPI project page from causing HTTP 404 responses.
Thanks for the fix, didn’t know this was happening!
So we have had a big hitbox re-work very recently, and this problem still exists, however we've had a lot of performance improvements, and are able to achieve greater than 20x speedups to the are_polygons_intersecting
check that this bounding box check tries to ignore via the upcoming arcade-accelerate
package. Given all of this, I'm tempted to say that we can just remove the check altogether, and always use the full are_polygons_intersecting
check which will stay true to the hitbox.
I'm creating a PR to ask someone else to run this benchmark, too. Because I'm confused by the results.
I'm running on Windows 11, python 3.11.2:
& 'C:\Program Files\Git\bin\bash.exe' ./benchmarks/bench-shapely.sh
But the important bit is really that it's running benchmarks/collisions/bench.py
with shapely enabled and then disabled. I enable and disable using an environment variable. In both cases, shapely is imported -- we pay the startup cost -- but it's only used for collision detection in one of the benchmark cases.
Here are my surprising results:
| Command | Mean [s] | Min [s] | Max [s] | Relative |
|:---|---:|---:|---:|---:|
| bash ./benchmarks/bench-shapely-helper.sh enabled
| 90.945 ± 2.481 | 89.190 | 92.699 | 3.54 ± 0.10 |
| bash ./benchmarks/bench-shapely-helper.sh disabled
| 25.715 ± 0.029 | 25.694 | 25.736 | 1.00 |
We have decided to remove Shapely entirely with #1646. Much of the pure python implementations were faster or only slightly better with shapely, and we are providing better acceleration options for that functionality via arcade-accelerate
coming up with Arcade 3.0.
Implementing some of the ideas from #1568
So far, what I have is incomplete, but it shows that we can skip a ton of hash remove/add operations for sprite movements, when those movements don't change the sprite's hash. This makes hashing viable for very dynamic sprites.
Sorry these results are hard to read.
Without this optimization, adding spatial hashing to the moving bullets slows it down. Compare rows 2 and 4 to see this. But with this optimization, adding spatial hashing to the moving bullets gets much faster. Compare rows 1 and 3 to see this.
| Command | Mean [s] | Min [s] | Max [s] | Relative | |:---|---:|---:|---:|---:| 95d85e2e WIP optimize spatial hash updates so that sprite is only added/removed when necessary | 16.206 ± 0.717 | 15.699 | 16.713 | 1.00 | d2f267a4 update benchmark, add variant that hashes the bullets | 33.140 ± 1.306 | 32.217 | 34.064 | 2.04 ± 0.12 |
| Command | Mean [s] | Min [s] | Max [s] | Relative | |:---|---:|---:|---:|---:| 95d85e2e WIP optimize spatial hash updates so that sprite is only added/removed when necessary | 21.312 ± 0.589 | 20.895 | 21.728 | 1.00 ± 0.03 | d2f267a4 update benchmark, add variant that hashes the bullets | 21.237 ± 0.014 | 21.227 | 21.247 | 1.00 |
_hit_box_max_dimension
to be a tuple describing the max extent of the hitbox along each axisThrough much conversation and work on discord. We have landed on the API introduced with #1641 which serves the purpose of giving us a more pluggable HitBox API that we can accelerate via Rust.
Thanks @cspotcode for the input on this system as we've built it out more.
#1590 Has been merged in for this. It covers most of the API, however I do think we could still use some better examples at some point, so I'll leave this open if anyone wants to add more tutorial/examples, it is an easy place for new contributors to get started.
Quick docs fix (#1647)
Co-author: @JDLiang100, @michellejtan, @Aurelioghs
How to use controller documentation/tutorials issue(#1475) (#1590)
background
Added a zombie character
object moves
deleted the .py file and set up the .rst file
trial
Update joystick_controller.rst
Update joystick_controller.rst
Update joystick_controller.rst
Update joystick_controller.rst
Update joystick_controller.rst
Update joystick_controller.rst
Update joystick_controller.rst
Update joystick_controller.rst
Update joystick_controller.rst
Update joystick_controller.rst
Update joystick_controller.rst
Update joystick_controller.rst
Update joystick_controller.rst
Update joystick_controller.rst
Update joystick_controller.rst
Update joystick_controller.rst
Update joystick_controller.rst
Update joystick_controller.rst
Update joystick_controller.rst
Update joystick_controller.rst
Update joystick_controller.rst
Update joystick_controller.rst
Update joystick_controller.rst
Update joystick_controller.rst
Update joystick_controller.rst
Update joystick_controller.rst
Update joystick_controller.rst
Update joystick_controller.rst
Update joystick_controller.rst
Update joystick_controller.rst
Update joystick_controller.rst
Added inforamtiona about how (-1, 0, 1) workds
Expalined (-1, 0, 1) for controller joystick
Explained values for joystick
Update joystick_controller.rst
Update joystick_controller.rst
Adding the Deadzone section
Update joystick_controller.rst
Update joystick_controller.rst
Update joystick_controller.rst
changes to DEAD_ZONE
added Joystick hats under types of controllers
Update joystick_controller.rst
Update joystick_controller.rst
Update joystick_controller.rst
Update joystick_controller.rst
Update joystick_controller.rst
Update joystick_controller.rst
Update joystick_controller.rst
Update joystick_controller.rst
Update joystick_controller.rst
Update joystick_controller.rst
Update joystick_controller.rst
Update joystick_controller.rst
Update joystick_controller.rst
Update joystick_controller.rst
Update joystick_controller.rst
Update joystick_controller.rst
Update joystick_controller.rst
Update joystick_controller.rst
Update joystick_controller.rst
Update joystick_controller.rst
Update joystick_controller.rst
Update joystick_controller.rst
Update joystick_controller.rst
Update joystick_controller.rst
Update joystick_controller.rst
Update joystick_controller.rst
Update joystick_controller.rst
Update joystick_controller.rst
Update joystick_controller.rst
Update joystick_controller.rst
Update joystick_controller.rst
Update joystick_controller.rst
Update joystick_controller.rst
Update joystick_controller.rst
Update joystick_controller.rst
Update joystick_controller.rst
Update joystick_controller.rst
Update joystick_controller.rst
Update joystick_controller.rst
Update joystick_controller.rst
Update joystick_controller.rst
Update joystick_controller.rst
updates to Different types of controllers
update to Different types of controllers
Update joystick_controller.rst
deleted temprunner
Update joystick_controller.rst
Rename joystick_controller.rst to controller.rst
Update controller.rst
changed name of the controller picture
Update controller.rst
Update controller.rst
Update controller.rst
Update controller.rst
Co-authored-by: JDLiang juandavidliang@gmail.com Co-authored-by: JDLiang100 86375529+JDLiang100@users.noreply.github.com Co-authored-by: Aurelio Lopez aureliolopez@Aurelios-MBP.attlocal.net Co-authored-by: Michelle Tan michelle0223@gmail.com
There is a lingering issue with the sphinx build, but it's only slightly related to this PR, I will just go ahead and merge this and fix it.
Complete Removal of Shapely (#1646)
Complete Removal of Shapely
Removal accidental inclusion of arcade-accelerate
Removal accidental inclusion of arcade-accelerate
Accomodate geometry module re-work in Arcade
Use list for get_adjusted_points instead of tuple (#1645)