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

about   add   Additional   advapi32   against   all   always   an   analog   and   answers   argument   Arguments   arguments   asked   Assignment   assignment   Assignment4   at   axes   be   being   best   between   both   but   But   can   case   changes   check   class   Close   closes   Command   command   Comment   Compiling   continue   control   controller   controls   corresponding   course   cs148   debug   Debugging   default   Default   Dependencies   directions   Discussion   does   doing   don   down   Drift   drift   easier   easily   edu   either   else   enough   even   Ex   exactly   exiting   Exits   experimenting   figure   file   for   forces   frequently   from   get   go   Go   got   handle   handling   how   However   if   If   ignore   immediately   Immediately   imp   implement   in   include   information   input   Input   isn   its   Joystick   joystick   keep   Key   know   lib   Line   line   link   Linker   lists   Make   makes   making   Missing   monet   move   my   name   next   no   Non   object   of   once   one   only   Open   option   or   orientation   out   own   page   Page   Part   perfect   performs   png   post   program   Program   Project   Projects   properly   Properties   provided   pushed   pushing   Query   Question   question   questions   quickest   range   reflect   Reg   released   Remember   requires   response   rest   return   Return   returned   run   Runs   safely   scaling   see   See   self   set   share   should   skeleton   slightly   so   something   sometimes   special   specify   specifying   square   staff   stanford   starts   startup   stick   sticks   still   Student   Studio   submission   sure   Symbols   takes   texture   The   the   then   there   this   through   to   To   touch   track   triggers   under   Use   used   user   uses   using   Value   value   values   ve   Visual   was   way   What   what   when   which   Why   will   win0607   window   with   without   You   you   your   Your   yourself   zero   zip  

    Assignment4Discussion

Assignment 4 FAQ and Student Discussion Page

The course staff will post answers to frequently asked questions about assignment 4 here. Feel free to add to this page yourself if you've got information to share with the rest of the class. Remember, the quickest way to get a response from a TA is to post to cs148-win0607-staff@lists.stanford.edu

Return to the Assignment 4 page.

Error Compiling, Missing Symbols (__imp__RegCloseKey, __imp__RegQueryValueExA, __imp__RegOpenKeyExA)

Go to Projects -> control Properties... -> Linker -> Input and add advapi32.lib to "Additional Dependencies" it should link properly.

Question: Program Runs But Exits Immediately

The program requires an argument specifying the texture to be used (which makes it easier to keep track of the orientation of the square). If you run from Visual Studio with Debugging then the command window closes immediately after exiting the program and you can't see the error. See the next question for how to add the command line argument. Use "monet.png" as a default, which is provided in the zip file.

Comment: Command Line Arguments in VS

The skeleton code uses a command line argument to specify the texture to be used. To set the command line argument through Visual Studio (so you can easily debug your program), go to Project -> control Properties... and set the "Command Arguments" option under "Debugging". The option takes only the arguments, without the name of the program.

Question: Drift

Why does my object continue to drift as if I was pushing the analog stick slightly even when I have released it?

The input isn't perfect and sometimes the value being returned to you doesn't reflect exactly what the user is doing. The analog sticks don't always return exactly to (0,0) and this is a case you should handle. Part of handling this is experimenting enough with your controller to figure out what range of values you can safely ignore and still easily control the object.

Question: Non-zero Default Value

I'm using my own controller and one of the analog controls starts at 0 but once I touch the control the default value is something else (e.g. -32768). What do I do?

The STJoystick class forces the values of analog controls to be between SHRT_MIN and SHRT_MAX, making the default value 0. Not all controls move in both directions (e.g. triggers can be analog, but may only be pushed down). However, there's no way for STJoystick to know this so it always performs the scaling. Your best option is to create a special case for your joystick - check against its name and set the default value for the corresponding axes at startup. You can either implement this in the STJoystick code or in your own code. Make sure you include any changes with your submission.

Recent