Ferram-Aerospace-Research icon indicating copy to clipboard operation
Ferram-Aerospace-Research copied to clipboard

TODOs

Open dkavolis opened this issue 5 years ago • 0 comments

  • [ ] Clean up and reformat code (in progress)
    • [ ] Fix inconsistent naming (may break some other mods like PWings)
    • [ ] Fix inconsistent file layouts (fields, ctors, properties, methods...)
    • [ ] All fields should be private and exposed through properties
    • [ ] Replace copy-pasted code with methods (mostly voxelization)
    • [ ] Split huge methods into smaller chunks for maintainability and clarity
    • [ ] String concatenation can be replaced by string interpolation with explicit ToString() calls, the compiler will generate concatenation automatically this way (possible NREs when calling ToString)
  • [x] Build platform specific shaders
  • [ ] Convert IMGUI to UGUI (in progress, building in 2018.3 with nested prefabs and downgrading with a script)
    • Less garbage
    • Use events to bypass polling
    • Faster to extend
    • Changes are visible immediately in Unity Editor
  • [ ] Export simulation results (csv, json or something other?)
  • [ ] Separate voxelization/aerodynamics logic from MonoBehaviours
  • [ ] Make aerodynamics calculations thread safe by working on object data instead of objects (something similar to Unity ECS, not in 2017.3 obviously). If/when KSP upgrades to Unity 2018.3+ this should make it easier to convert to ECS/Jobs/Burst for improved performance.
  • [ ] Flight envelope simulations and plots (built-in Wind Tunnel, needs threadsafe aerodynamics, otherwise the UI would lock for multiple seconds)
  • [ ] Cache mesh data for the same parts and their transforms (transform names look to be unique)
    • [ ] There should be a way to voxelize in local part coordinates and then merge with the vehicle voxelization, can use caching. Should improve performance with animated parts.
  • [ ] Use coroutines:
    • [ ] In GeometryPartModule instead of waiting in FixedUpdate (there may be more places where this could be used)
    • [ ] In FARAeroPartModule for visualization (should use a callback in AeroVisualizationGUI to set up and stop coroutines)
  • [ ] Replace Component.SendMessage with GameEvents

dkavolis avatar May 03 '19 21:05 dkavolis