If I were you, I wouldn't do such complicated things. First of all, I think someone has already done it before you. After all, there is even Retro Arcade MachinesRetro Arcade Machines. And on the phone moreover there will already be a ready-made game. So do not bother. Create something more necessary. Of course no one has the right to tell you but to sound advice is better to listen.