Wii-ing yourself isnt always fun
Had some major problems this week porting my project over to the framework scott and I made for AGT, originally i was using the 2D boy framework but i decided i might want to do some 3D stuff so i figured i may as well port it over….wasnt quite as easy as i had anticipated!
I was initially using the wii yourself library and when i first set it up i had some major problems getting it to play nice, eventually i got it going and i was quite happy with it. However when i ported it over to the new engine all those teething problems were showing their ugly faces again and i thought i would have a look to see if there was a better solution instead of spending hours getting it running again…only for it to break on a different computer.
I found wiiuse which felt a lot nicer and was intially very easy to set up so i quickly integrated that into my engine and made relevant changes.
Alas as i got up to the part where i wanted to render points again i came across a problem, wiiuse has some great stuff for Wiimote I.R. tracking but it automatically works out the average dot and stuff based on the position of the sensor bar for you, which is great….if you want that, however i wanted to access each I.R. dot individually…which it didnt seem to give access to sooooo it looked like it was back to wiiyourself.
I went back to my old gamedev posts to re-find the solution, the basic problem is, wiiyourself needs the windows ddk (for the hidpi stuff) and the windows ddk seems to need the msdn sdk (although that might not actually be true, it could be it just seems that way) however there is some sort of confliction in the .h files of at least the windows ddk with another include which is a default include. The fix is to order them in a particular way:
Of course this is not ideal so what i did was build wiiyourself into some libs and use them instead =]! And anyone reading this who wants to do a similar thing i would recommend you do the same, i might put the libs up for download at some point with a full tutorial on getting started with the Wii and C++ after i email wiiyourselfs creator and ask if thats ok.
Saying all this and the title sort of puts WiiYourself in a bad light but its not a bad library, the complete opposite in fact, its actually quite nice to use, especially for what im doing, if you were doing stuff that literally involved creating a wii game then i would say go with wiiusecpp, however if you want to do I.R. tracking and generally a bit more then go with wiiyourself. If i was to sum up id say the wiiusecpp is more high level and so slightly more user friendly perhaps, but wiiyourself lets you get a little bit more nitty gritty with it which is always something that appeals to a C++ programmer =]!
The problem isnt really wiiyourselfs its the microsoft ddk, and these strange conflicts it likes to have, and it definatley does not like being in the same include list as Direct X stuff ooohh no!
Definatley make a nice library for yourself, it will save alot of headache! trust me!
I’m happy to report that i now have it all integrated (its a bit messy and needs cleaning up) and i have some nice debug stuff including drawing of the I.R points (again a little messy, ogre primatives are a bit ugly when u haven’t wrapped it up in a derived/manager class).
For some reason im having some problems getting the average point to work properly, it constantly thinks all I.Rs are visible, which means that its always adding the values of the I.Rs that arnt there i.e. 0,0 and dividing by 4, when at the moment im only using 2 I.R.s which is annoying! And also cegui doesnt seem to have a “set mouse cursor” which is annoying because im forced to use “inject mouse move” and sort of adjust it via I.R changes. which makes controlling the mouse via I.R a litle annoying aswell!
However i have set up a thing were you can click by pinching ur fingers which is cool to use with CEGUI, even though it requires a little patience =P! its all a little jittery and theres plenty of teething problems but im getting there!
EDIT: For anyone who needs it, here is the pre-built wiiyourself libs, for 2005, 2008 debug and release versions! Download: WiiYourselfLib