quinton-ashley / p5play

JavaScript game engine that uses q5.js/p5.js for graphics and Box2D for physics.
https://p5play.org
GNU Affero General Public License v3.0
667 stars 184 forks source link

Complete controller test #294

Closed quinton-ashley closed 7 months ago

quinton-ashley commented 9 months ago

Add indicators for all standard buttons, triggers, and sticks.

https://openprocessing.org/sketch/2120550

Metamere commented 7 months ago

I made a more complete test this week for aiding in my game development, so I'll add a few finishing touches and share it.

Metamere commented 7 months ago

I took a few hours today to complete the controller tester sketch. You can review it here: https://openprocessing.org/sketch/2225968 I made it responsive, so it should work for the p5play website as well.

Metamere commented 7 months ago

I improved it a bit to include a check for analog triggers so it will add little slider columns only when present, as well as some more details regarding button labels for different controller types. I'm pretty proud of the custom drawn sprites for the sticks, how they turn to ellipses accurately when angled out. Do you think I should create a stick function so there's less repetition in the code? Probably fine how it is.

quinton-ashley commented 7 months ago

@Metamere It looks so good!!! I just published a fork of it on my profiles with credits to you.

https://aijs.io/editor?user=quinton-ashley&project=p5play_Controller_Test https://openprocessing.org/sketch/2227913

I'll add a link to it on p5play.org as well!