Completing the Windows version
Creating an installer for my program was elementary. I only needed to install an additional extension for Visual Studio.
The extension is named Visual Studio Installer Projects.
To create the installer, I used the following guide on YouTube:
I do need to say that finding a simple solution was a nice change of pace.
Simulation Fixes
The simulation looked a bit weird on Windows and I decided to remove the deltaTime value from the operation. Now, the ball gets slow down by the value of the gravity and not the value of gravity multiplied by deltaTime.
if (executionResults.upwardsMovement)
{
ball.y -= (double)executionResults.operatedVelocity;
executionResults.operatedVelocity -= (int)executionResults.gravity;
}else
{
ball.y += (double)executionResults.operatedVelocity;
executionResults.operatedVelocity += (int)executionResults.gravity;
printf("%d", ball.y);
if (ball.y > windowHeight - ball.radius)
{
executionResults.operatedVelocity = 0;
}
}
The simulation runs much smoother now! Time to start working on the Linux version.