ScanuNicco / Boat-Race

A boat racing game
0 stars 0 forks source link

The game still goes when it is loading, paused, and not in focus #7

Open zorbulator opened 5 years ago

zorbulator commented 5 years ago

This causes the time to be non-zero when the game first starts after loading and makes the boat go off the ocean if the game is paused because it continues to accelerate

ScanuNicco commented 5 years ago

I fixed the timer bug, still working on the physics

zorbulator commented 5 years ago

OK, the game is kind of broken right now though ill fix it when i get home

On Mon, Dec 17, 2018 at 2:29 PM scanunicco notifications@github.com wrote:

I fixed the timer bug, still working on the physics

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ScanuNicco/Boat-Race/issues/7#issuecomment-448023347, or mute the thread https://github.com/notifications/unsubscribe-auth/AYotzweJ3uwcXzPqB9eLn4oDe6aP_mZsks5u6Bq6gaJpZM4ZW-S2 .

zorbulator commented 5 years ago

This is very annoying because whenever I leave the tab with the game and come back the boat is outside of the map

zorbulator commented 5 years ago

I think it is only the acceleration/movement that keeps going, not the friction or collision because the boat ends up going way faster than normal and through walls

ScanuNicco commented 5 years ago

We can put an if statement in the main loop that checks if the controls are locked, if they aren't then we don't run any of the code.

ScanuNicco commented 5 years ago

There was already an if statement that does this in the loop. Moving stats.update() inside of this if statement seems to have fixed the problem.

zorbulator commented 5 years ago

What do you mean that fixed the problem all that did was stop the fps counter when the menu is open