An interesting feature of Steam is that you can invite your friends to join your game and you can also specify the command-line arguments that will be appended to the default ones of the game.
The Steamworks API to use for the invitation is the following:
// rich invite support
// if the target accepts the invite, the pchConnectString gets added to the command-line for launching the game
// if the game is already running, a GameRichPresenceJoinRequested_t callback is posted containing the connect string
// invites can only be sent to friends
virtual bool InviteUserToGame( CSteamID steamIDFriend, const char *pchConnectString ) = 0;
So if we set pchConnectString to "-blah blahblah" then the game of the friend who accepts the invite will run with that additional arguments.
The problem is that the invited user will see the full custom command-line before accepting the invitation and so no fun for us:
Let's try to add some bad chars like those below space (0x20):
Yeah no fun yet.
Steam has an interesting interface option for improving the quality of the font, DirectWrite is switched off by default but many users like to improve everything:
Let's send the same message sent before and watch the result
Probably you are thinking that it's not that good but before the 11 July 2014 you didn't see those messy covered chars, the command-line was completely hidden.
The reason is probably explained in this changelog:http://store.steampowered.com/news/13846/
Fixed Korean text being cut off
Anyway it doesn't mean that we can't have fun doing things like the following:
The command-line has been completely covered.
If you trust your "friend" why don't you accept the invite?