Guest User

Untitled

a guest
Dec 22nd, 2019
108
93 days
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // Rocket Recorder Flatbuffer Schema
  2.  
  3. namespace RocketRecorder.Flatbuffer;
  4.  
  5. struct FlatVec3 {
  6.     x: float;
  7.     y: float;
  8.     z: float;
  9. }
  10.  
  11. struct FlatCarOrientation {
  12.     front: FlatVec3;
  13.     up: FlatVec3;
  14. }
  15.  
  16. struct FlatControllerInputs {
  17.     throttle: float;
  18.     steer: float;
  19.     pitch: float;
  20.     yaw: float;
  21.     roll: float;
  22.     jump: bool;
  23.     boost: bool;
  24.     handbrake: bool;
  25. }
  26.  
  27. table HitboxInfo {
  28.     halfWidth: FlatVec3;
  29.     offset: FlatVec3;
  30. }
  31.  
  32. table FlatActorData {
  33.     position: FlatVec3; // All data is automatically mirrored
  34.     velocity: FlatVec3;
  35.     angularVelocity: FlatVec3;
  36.     orientation: FlatCarOrientation;
  37.     boostAmount: float;
  38.     flags: ushort; // bitflags (onGround 1 << 0, jumped 1 << 1, doubleJumped 1 << 2, isBoosting 1 << 3, collidedWithBall 1 << 4, collidedWithCar 1 << 5, collidedWithWall 1 << 6)
  39.     reward: float;
  40.     goalScore: ushort;
  41. }
  42.  
  43. table FlatGameFrame {
  44.     localActor: FlatActorData;
  45.     ballData: FlatActorData;
  46.     enemyActor: FlatActorData;
  47.     controllerInputs: FlatControllerInputs;
  48.     sequenceNumber: uint; // Increases every frame, resets on kickoff
  49.     timeDelta: float; // Time since last frame, typically 1/120
  50. }
  51.  
  52. table FlatFullGame {
  53.     protocolVersion: ubyte; // 6
  54.     frames: [FlatGameFrame];
  55.     localCarHitbox: HitboxInfo;
  56.     enemyCarHitbox: HitboxInfo;
  57. }
  58.  
  59. root_type FlatFullGame;
RAW Paste Data