HomeGamesUpdatesPricingMethodology
Steam News20 January 20233y ago

DevLog #1: Using CoPilot to speed up development

When Soar development started, after one weekend we had a solid prototype of the flight model scripted in blueprints.

Full notes

Full Soar update

Read the full published notes in a cleaner layout. The original post stays linked below.

What changed

0 fixes0 additions1 change1 removal
  • Gameplay
  • Performance
removedI was seriously mindblown. At first by knowing by what an angle of attack is and how to calculate it. Secondly by understanding that wing is generating lift when angle of attack is below critical angle of attack (when above, the wing will enter a stall state, where it's no longer generating lift.
changedDoes Copilot generate bug free code that always makes sense? Far from it. But can it greatly improve performance when used carefully? Absolutely

When Soar development started, after one weekend we had a solid prototype of the flight model scripted in blueprints. The next step was to move it to C++, as we eventually need to execute it as part of the physics substep / asynchronous tick. So the task is to rewrite the blueprint code to C++, something I wanted to test Copilot with.

My expectation? Be able to help with function names and correct syntax, something like Intellisense 2.0. Reality?

I was seriously mindblown. At first by knowing by what an angle of attack is and how to calculate it. Secondly by understanding that wing is generating lift when angle of attack is below critical angle of attack (when above, the wing will enter a stall state, where it's no longer generating lift.

There is however one problem with the code - the local speed. It simply takes the speed in world coordinates instead of local, which is needed for lift and drag calculations. Despite this, the Angle of Attack is calculated correctly.

I was interested what else it can do, so I let it write the lift function for me. It took the lift equation and tried to apply it our environment. It substituted the air density with the mass of the wing, which is an understandable mistake. Then it tried to apply lift in direction of forward vector, instead of up vector, which is a less understandable mistake.

Does Copilot generate bug free code that always makes sense? Far from it. But can it greatly improve performance when used carefully? Absolutely

If you found this interesting, you can wishlist Soar to get more updates in the future. And if you're not a technical person, you can wishlist Soar anyway!

Source

Steam News / 20 January 2023

Open original post

Changelog.gg summarizes and formats this update. How we read updates.