MPU-6050 based game controller

Hi,
I'd like to make a arduino gyrscope based mouse-joystick device, in particular to use the gyro to be able to control the mouse cursor precicely. Something like this:

or this:

However the creators seem to not be sharing the code and it seems rather complicated.
Any ideas?
thanks