phranque - 11:35 am on Aug 12, 2009 (gmt 0)
1) if you want http://www.example.com/game/gamename to be your canonical url you should use that url in all your on-page/internal linking on your site.
the http://www.example.com/gamepage.php?num=n is only used internally.
the usage of mod_rewrite described above is an "internal rewrite" and that internal url is not exposed publicly.
if you get an external request for http://www.example.com/gamepage.php?num=n you should use an "external redirect" to your canonical url which is http://www.example.com/game/gamename and the subsequent request will be internally rewritten to http://www.example.com/gamepage.php?num=n.
in this way, only your canonical urls will be indexed or shown in the address bar of your browser.
2) for this purpose, the .htaccess file should reside in your document root directory.