So I've downloaded the current source of the Oolite engine and slowly coding in strafing (along with reverse thrust), anybody know what file in the source deals with the flight mechanics? I know that apart from getting the ship to go forward, roll, yaw and pitch I've also got to add in the mathematics to translate the ship position horizontally and vertically. I'll be providing examples of my code soon.
Even without the turreted and gimballed weapons of elite dangerous it would still be a lot easier to aim with more freedom of movement. Hopefully I can work on Flight Assist On/Off afterwards.
Other things I am working on implementing:
-Starboard, Port, Dorsal and Ventral shields
-Aft, Bow, Starboard, Port, Dorsal and Ventral Hull
-Structural Integrity, starts to go down when a hull section is at zero (or when there is a bleed through attack). More it goes down of course, the more damage modules take, 'warning, hull critical, eject eject eject' when at zero percent.
-Updated 32nd and 33rd century models based on FDev concepts.
Adding in Strafing
Moderators: winston, another_commander
-
- Quite Grand Sub-Admiral
- Posts: 6683
- Joined: Wed Feb 28, 2007 7:54 am
Re: Adding in Strafing
Welcome CMDR ARGHouse
It' is great to see that you are hacking away in the game's code; we could certainly do with more people who are willing to contribute in this field. To answer your question, check out PlayerEntity.m and PlayerEntityControls.m. The first is the main implementation of the player ship entity, while the second is where response to control inputs is handled. You may also want to take a look at ShipEntity.m, which is the main ship class the playership entity inherits from (watch out, there are maiy shipentity function overrides in the player ship class).
Keep in mind that adding strafing to the player will be a player-only thing and NPCs will not be able to have it. If you do implement this type of movement for NPCs too, they will need an AI update to make use of it. I would be certainly interested ti see what comes out of it, even if it is player-only. Theoretically everything that the player does the NPCs should also be able to do (and I appreciate that yawing is a violation of this unwritten rule), but I think the experiment might be worth it.
It' is great to see that you are hacking away in the game's code; we could certainly do with more people who are willing to contribute in this field. To answer your question, check out PlayerEntity.m and PlayerEntityControls.m. The first is the main implementation of the player ship entity, while the second is where response to control inputs is handled. You may also want to take a look at ShipEntity.m, which is the main ship class the playership entity inherits from (watch out, there are maiy shipentity function overrides in the player ship class).
Keep in mind that adding strafing to the player will be a player-only thing and NPCs will not be able to have it. If you do implement this type of movement for NPCs too, they will need an AI update to make use of it. I would be certainly interested ti see what comes out of it, even if it is player-only. Theoretically everything that the player does the NPCs should also be able to do (and I appreciate that yawing is a violation of this unwritten rule), but I think the experiment might be worth it.