Monday, September 26, 2011

making supermemo drills a little more fun - with the help of a PS3 controller

Currently, my main task is actually not to be heads down in development, but rather to be reading documentation. My reasoning for this is that a lot of the time spent in "heads down" development is really just wasted in figuring out how to do this or that, and as a consequence a lot of mental context switching occurs and many otherwise valid ideas are not able to surface. If, on the other hand, the how is completely known and understood, the what is able to flow much more freely, thereby enabling not only faster results (at least in the mid- to long-term), but better results, because those sometimes hard-to-reach and rare-to-find veins of gold within the subconscious can be mined much more effectively. Much more complicated ideas can simply be prototyped in a much shorter timeframe than before. More upfront work can actually be done on the machine, rather than on paper or on a whiteboard. Dreams are able to become reality much faster and more efficiently. Practice and iteration occur more rapidly, and the path to mastery is accelerated. In the long term, ultimately, this means bigger and better games, while still being able to stay small and focused, which is full of win.

What this means right now, though, is that I have a lot of documentation to read. Too much, in fact. It's not enough to just read the documentation, though - the idea here is to memorize it, completely. Every class, every function, every variable, enumeration value, default, setting, and all the little nuances and gotchas. At the moment, I'm focused solely on Unity3D, because that is where the rubber meets the road with what I do. It is the one tool I can use all by itself to make a pretty well-featured game and be able to have it run on pretty much every platform that I care about right now. I might add some other tools like 3DS Max or GIMP later, but for now Unity3D is where it's at.

The editor itself is pretty straightforward. Where there's a ton of meat to digest is in all the components, especially the scripting, as well as in the shader language it uses for creating custom materials.

The tool I use for all of this is called SuperMemo. I highly recommend for anyone taking on a lot of memorization-type material. If nothing else, it is good for random introduction of material - the serendipitous discovery of things-you-didn't-know-you-wanted-to-know - and the subsequent committing to memory of (they purport) 95% of said material. Of course, this is all done by selecting just the relevant bits of the material to memorize, which is a lot of what goes on in the "processing" phase, and then drilling you flash card-style

This is all very useful, but I do often find myself making a lot of repetitive keystrokes in the process, and sometimes find my mind wandering off over to Twitter or a can of soda as a result. In contrast, when I'm playing a good video game, I'm really into it, and even the slightest distraction is either completely tuned out or, failing that, really irritating. My theory on this is that the brain doesn't have to exert as much effort in navigating a gamepad as it does with a fairly complex keyboard/mouse setup, especially one that may be switching around between several programs, typing things in, switching back, etc, while simultaneously doing some pretty hefty reading and recall work.

What I noticed about my usage of SuperMemo is that, for the most part, especially during the "final drill" phase of each day's worth of material, there's a lot of repetitive button pressing. Even during the regular repetitions, where there may be somewhat more processing - following up on a lead, downloading a web page and importing the HTML, breaking things down into smaller chunks, there's really not a whole lot of variety in the space of inputs being fed into the computer by me. A lot of the time it's just pushing a button to say "next", and then right/left once or twice to press another button to grade myself. That's Enter, and the right and left arrow keys.

Enter the handy-dandy PS3 controller:

A nice feature of the Dualshock 3 controller is that it can be plugged into a PC via USB (or bluetooth, if such an adapter is present) and used as an HID gamepad. For the actual driver, I installed the MotioninJoy Gamepad tool. The key-mapping functionality on this, however, is pretty non-existent. The top result on Google for this is Xpadder. Granted, there are a lot of other cheaper/free gamepad-key mappers out there, but I was in a hurry and the fact that it actually costs money($9.99, via Paypal) led me to believe that it would have at least some level of professionalism to it.

A couple hours later - after some confusion probably related to a driver conflict caused by installing another PS3 gamepad solution prior that didn't work as expected, and subsequent manual uninstallation, I did manage to get to work quite nicely, even after a system reboot and device unplug/re-plug. Be sure to run that test on your setup.

I did (finally) get the controller to (mostly) work with my system, enough to do what I wanted to do with it, and the result is the above-pictured mapping in Xpadder. The d-pad is mapped to the direction keys (via the joystick x/y-axes, which surprisingly is not as much of an issue as I had initially thought it might be), alt-tabbing via R1/L1+(L2 or select), enter mapped to the X button, a simple Play/Pause mapping to Start for music playback while I'm SuperMemoing, and Windows system access via the PS button. The Square button maps to L-Ctrl, which maps to "Fire1" in Unity games. It's for after I'm done with Supermemo for the day :)

Drills in SuperMemo now seem like a breeze. It does really feel a bit more like a video game now than typing up a book report. The more keyboard/mouse-intensive repetitions are still done with a keyboard and mouse, although even those seem a bit more fluid now. It's like the usage of the keyboard/mouse is more focused, a la the McIlroy principle of "do one thing really well."

If this allows me to get through the material faster, awesome. What matters more to me, though, is that I do so with less mental friction. My thinking is that will help me learn the material better - more effectively. If I get more time during the day, more than likely I'll spend it putting this stuff into practice via one or more game projects focused more on implementation and practice than of design. And of course, if one or more of those happens to get to a finished state, and seems awesome enough, I'll be sure to put it up somewhere

Thanks :)

1 comment:

  1. This is amazing! Can't wait to try this with Supermemo!!!