emmahogan / 225FinalProject

0 stars 0 forks source link

Runner issue #2

Open AndrewTowse opened 4 years ago

AndrewTowse commented 4 years ago

There is an issue in runner(rise game) where when it runs each time a new gate is created the speed of the gates slows down. We believe this is because each gate has a wait time of 16 ms before is updates but we cant figure out how to fix this. Do you have any idea why this would be?

jteresco commented 4 years ago

Question for teammates or for me?

AndrewTowse commented 4 years ago

Sorry to not clarify it is for you Dr. Teresco :)

jteresco commented 4 years ago

I see some commits with happy looking messages since this Issue. Is it fixed?

AndrewTowse commented 4 years ago

Not exactly the frame rate still seems to drop as soon as the second gate is added, but everything else should work otherwise

jteresco commented 4 years ago

I'll check it out. Can you point me to a few places in the code where I should be looking?

AndrewTowse commented 4 years ago

Alright I added long lines of "/////////..." to help you find the methods. In createScreen is where the gates are added in class RunnerScreen.java. And in Gate.java They surround the update method and the renderGate method. The sleep method that is commented out in renderGates is what is making it slow down but when it isn't there it runs smoothly but too fast.

AndrewTowse commented 4 years ago

Just fixed it I added a gateWaiter varaible so it only updates them every 200ms instead of having each one sleep.

jteresco commented 4 years ago

OK, that's good. While I'm looking, curious how I run your programs. There is no main, and they don't look like applets or JavaFX programs.

emmahogan commented 4 years ago

Through the main arcade class - there are buttons that open up each game

AndrewTowse commented 4 years ago

just pushed it if you want the updated version

jteresco commented 4 years ago

OK, good. I see. I like it.