The following 176 words could not be found in the dictionary of 615 words (including 615 LocalSpellingWords) and are highlighted below:

about   adapter   all   allowed   analog   and   around   array   arrays   axes   Axes   Axis   axis   balls   be   between   but   button   Button   buttons   Buttons   by   called   calls   can   certain   changes   Close   cluttering   component   components   console   controller   controllers   Conversely   corresponded   created   current   decided   deletes   describe   Describe   detail   determine   device   did   different   discard   down   each   effect   etc   exploration   explore   filtering   find   following   for   found   from   front   further   get   Hat   hat   hats   held   how   idle   if   image   implemented   in   indepently   initially   inputs   interface   intially   Joystick   joystick   Knowing   L1   L2   learn   left   like   mapped   mapping   me   methods   move   moved   movements   name   no   number   of   on   only   opened   or   other   our   out   Playstation   plugged   poll   possibly   prevent   printed   printing   program   provide   queried   R1   R2   range   ranges   reset   resetted   returned   right   rotating   rotation   scaling   Select   select   several   should   similar   simply   slow   slowdown   smoothly   so   space   specifically   speed   speeds   speedup   Start   states   sure   sustain   tapped   texture   textures   that   The   the   there   These   This   through   to   To   translation   two   up   used   using   values   we   were   what   When   Whenever   which   window   with   without   would   wrote   You   you   your  

    EdmondYap/Assignment4

1. Describe your exploration of your device - how you did it and what you found - in detail. You should describe your joystick, what code you wrote to learn about it, how the inputs mapped to the STJoystick interface we provide, ranges of values returned, etc.

I used a Playstation controller with two analog axes, plugged in through a USB adapter. 10 buttons, 2 axes, and the hat were all implemented.

To explore the joystick, I first "opened" a joystick and used the different STJoystick methods to find the number of balls, number of buttons, number of axes, and number of hats the joystick hats (I also intially queried for the joystick name, but decided to discard it). Knowing that there's no balls, I created arrays for the other joystick components. Whenever idle(), I would poll the states for each component by using methods getHat, getAxis, and getButton. To further "explore," I initially printed out all changes in the states (filtering out only for changes to prevent cluttering the console space). This allowed me to determine which button/axis/hat number corresponded to which. It also allowed me to get the range for the axes (simply by using the axes and printing out the values).

I implemented several methods for the texture and controller. I'm not sure if the mapping is similar from controller to controller, so the following may be specifically for the PS. I used the hat to move the texture smoothly left, up, down, right, and in between. I used the 4 buttons on the front (buttons 0-3) for rotating on the X and Y axes. I used buttons 4 and 5 (L1 and R1 on PS) for rotating on the Z axis. These buttons can be held to sustain the effect.

Buttons 6 and 7 (L2 and R2 on PS) are used to speed up or slow down. L2 (button 6) could be tapped to slow down rotation movements and the translation using the hat. Conversely, R2 (button 7) speeds up. Button 9 (Select on PS and possibly "reset" on certain controllers) is used to select between two different textures on the window. These textures can be moved and resetted indepently. Button 8 (Start on PS) can be used to "reset" the current texture. The left analog (Axes 0 and 1) are used to move the image around like the hat, but without the speedup/slowdown effect of L2/R2 (button 6/7). The right analog is used for scaling the image.

10 buttons, 2 axes, and the hat were all implemented.

When the 'Q', 'q', etc. is called, the program calls Close() on our Joystick and deletes the array for states.

Recent