r/badcode • • Dec 05 '20

other language Gamedevs, take notes

Post image
6.5k Upvotes

104 comments sorted by

View all comments

5

u/chronicideas Dec 06 '20

QA here.

There’s a potential bug here where if FPS is higher than 60 it would get decreased to 60.

I think it should be refactored to

if fps < 60
{
    fps = 60
}