Trying to make my fork of sim-eth-es a 2d game (like AsteroidPanic). I’m trying to wrap my head around how the camera, rotation and thrust relates, in order to only move in the x,y-plane and only use z-axis to rotate (when turning the plane). Right now, in the PlayerMovementState, there is this:
Asteroid Panic is a single player game… so things are simpler.
In sim-eth-es, the thrust flags are sent to the server and this controls the body in the simple physics engine. The velocity and so on is managed there… but the motion model is very different than Asteroid Panic because it’s a different kind of game. In Asteroid Panic, your directional velocity is always working against your current velocity. In Sim-eth-es (and basic), the direction of your velocity is always the same direction you are facing because I feel it’s an easier way to fly in 3D.
Sure, first you need to change the camera as you know already. Then you have to set thrust to be either x or y instead of z, Then you need to disable the mouse moving the camera. Finally you need to change the keys to rotate your ship and update the rotation Quaternion to reflect that before sending it to the server. Almost all the changes required are in PlayerMovementState.java
It might be best if you spend some time looking at the code very carefully to figure out whats going on. I personally recommend doing a mindmap or something similiar with xmind to try and sort things out in your mind. This is mine from a old version of sim-eth-basic https://sli.mg/bcFWCX
I think PlayerMovementState to make sure you send good rotations. Then if you really want to be sure, the ship driver down in the physics system to make sure thrust is always applied flat. Everything else could continue to think it’s 3D.
…then obviously the camera related changes, of course. I was mostly talking about the simulation side.