This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
notes:unix:fall2023:projects:fwg1 [2023/10/31 15:35] – [defining] cmazzara | notes:unix:fall2023:projects:fwg1 [2023/11/02 02:41] (current) – [declaring] xcroft | ||
---|---|---|---|
Line 18: | Line 18: | ||
Stanely.height = 74; | Stanely.height = 74; | ||
====declaring==== | ====declaring==== | ||
+ | int SpaceshipX = screen_width / 2 ; | ||
+ | can replace 2 with any number depending on where you want the starting point. Replace x with y for y axis | ||
====accessing==== | ====accessing==== | ||
=====displaying sprites on screen===== | =====displaying sprites on screen===== | ||
+ | To display sprites on screen, you must first make sure you define their textures. This should be done outside of " | ||
=====game controller input===== | =====game controller input===== | ||
+ | |||
+ | you need to let the program know that you have a controller with " | ||
+ | |||
+ | to get an input from the gamepad, use the gamepad_direction() function and make variables for the x and y directions. You can also check to see if individual buttons are pressed with their respective functions found in the input.h API |