I know how to rig characters for animation, but how to rig for game engines? I mean BGE, Unity, Unreal Engine, Cryengine, Stingray etc. Is rigging for games any different than for animation and how different? Also how to export the rig to OBJ or FBX so that it can be imported in these engines, do these file formats support rigging at all?
The main difference between games and animation (not only) in terms of rigging are the limitations that are dictated not only by the game engine itself but also by the platform you are aiming for.
Since multi-platform is a big thing today you are limited to what the weakest in the row dictates. Last gen consoles could handle rigs with up to 120 joints "just fine" while PCs from the middle to the end of that generation would easily work with the double amount.
Exporting to obj is limited to mesh and material info (.mtl file), it does not contain any rigs or animations.
In the BGE you can use your rig as it is but you have to animate using the Action Editor. To play these animations you need to use the action actuator.
If you want to use the rig in Unity you simply just need to export the rig from Blender as *.fbx. Select 'Armatures' in the export options. When importing to Unity you have to select 'Rig' in the import settings.
I don't know much about CryEngine but you might consider taking a look at the addon 'CryBlend'.
As far as I know you can import *.fbx files in Stingray too, so it's the same steps I explained above for Unity.