diff --git a/as3/README.md b/as3/README.md index df4c677..54fc145 100644 --- a/as3/README.md +++ b/as3/README.md @@ -33,3 +33,20 @@ run the executable with the following command: ``` # Instructions on how to use the program + +Use W and S to accelerate the penguin forward and backward. Use A and D to +change heading direction. The penguin will only accelerate in the direction +facing and will retain its velocity even when not accelerating or changing +direction. + +# Readme Question + +`dt` is delta time, which is the time elapsed between each frame, which can be +found by taking the current time and subtracting the time from the previous +frame. Raylib provides a function `GetFrameTime()` that returns the time +elapsed since the last frame, which can be used to calculate `dt`. By using +`dt`, it ensures that physics calculations are independent of frame rate, since +otherwise the velocity would be in terms of units per frame rather than units +per second. By multiplying the velocity by `dt`, it converts the velocity to +units per second, allowing for consistent movement regardless of the frame +rate.