I'm working on a way of simulating orbits for a video game I'm making. It works by taking the apoapsis, periapsis and current distance and calculating from there the velocity, radial velocity, period etc. There are no vectors involved, as no 2D space is being simulated - only the numbers themselves. The simulation works well with the orbit put on rails, but I run into problems as soon as I change the orbital velocity, because I then need to re-calculate the apoapsis and periapsis based on this change.
I've tried a few methods, but they don't seem to be working due to the lack of vectors, which they all use. What's the correct way of doing this? If we say that I'm orbiting an object where mu is 10,000, my current distance from the object is 500 metres, the apoapsis is 700 metres, the periapsis is 300 metres and I accelerate by 20 m/s, what would be new apoapsis and periapsis be? Bearing in mind that this is intended for programming use so any pseudocode would also be appreciated.