This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
notes:spring2025:projects:mtb0 [2025/02/12 22:33] – [Design your sprites / custom texture] cgrant9 | notes:spring2025:projects:mtb0 [2025/02/12 22:38] (current) – [translating read joystick value into X and Y] cgrant9 | ||
---|---|---|---|
Line 82: | Line 82: | ||
</ | </ | ||
====translating read joystick value into X and Y==== | ====translating read joystick value into X and Y==== | ||
+ | You can also check explicitly for certain button presses instead of using gamepad_direction() with the gamepad functions, most pertinent to this project would be gamepad_left(), | ||
+ | These functions return a value based on how long the button is being pressed/how long it has been unpressed, decreasing starting from -1 every frame it is unpressed, and increasing starting from 1 every frame it is pressed; The value returned is never zero | ||
=====Playfield bounds checking===== | =====Playfield bounds checking===== | ||