Ilmari Karonen is right. An exact solution would be numerical, which would occupy a fair amount of computing power for a game application. It may be more practical (if less accurate) to use an approximation model which is easier to compute. This is analogous to the way Kerbal uses patched conics.
One strategy would be to pre-calculate nested invariant manifolds in the orbital plane, since most of the game action will be in that plane. With only 2 massive bodies, the manifolds would be much less complex than those you may have seen for the Sun/Earth/Moon/JWST system. The parameters for the pre-calculated manifolds could be stored in a look-up table. The game spacecraft could be assigned to the nearest manifold. If the spacecraft’s state vector does not match a manifold, you could revert to patched conics.
I may be completely OTL with this since I am not a gamer, programmer or mathematician. I hope your project works. One great thing about Kerbal is the way it displays the projected track in real time as you vary the control inputs. It’s a great way to acquire an intuitive understanding of orbital mechanics. I hope your game will display the surface of the manifold your vessel is currently travelling on, as well as showing the manifold shape change with control inputs.
Good luck with your project.
https://www.aanda.org/articles/aa/full/2006/25/aa4653-05/aa4653-05.fig.html
