Pong game work until loop, then freezes and doesn't output properly
Author |
Message |
Wakening
|
Posted: Mon Jan 02, 2012 8:19 pm Post subject: Pong game work until loop, then freezes and doesn't output properly |
|
|
What is it you are trying to achieve?
To successfully loop my pong game.
What is the problem you are having?
This is my first ever game, and is a clone of classic Pong. It will run perfectly fine for one game (until someone reaches 2 points). When the loop is activated, somehow it "freezes". The strangest thing is, the program is still running fine, but the output will only update itself when you click outside the run window and click back in. This is nothing like anything I've ever seen before. I feel really bad for uploading my entire .t but I don't see any other way of showing you guys exactly what's happening. Any help will be greatly appreciated. Thank you.
Describe what you have tried to solve this problem
Debugging for over 3 hours. Lowering the pressure on my computer by adding delays. Using different methods of user input (getch, Input.KeyDown etc). Generally rearranging the order.
Please specify what version of Turing you are using
4.1.1
Description: |
|
 Download |
Filename: |
Pong.t |
Filesize: |
6.18 KB |
Downloaded: |
71 Time(s) |
|
|
|
|
|
 |
Sponsor Sponsor

|
|
 |
ttm
|
Posted: Mon Jan 02, 2012 9:16 pm Post subject: Re: Pong game work until loop, then freezes and doesn't output properly |
|
|
You forgot to call View.Update before your delay (5000)s on lines 162 and 166. Also you should do View.Set ("offscreenonly") only once at the top of your program.
|
|
|
|
|
 |
Wakening
|
Posted: Mon Jan 02, 2012 9:49 pm Post subject: Re: Pong game work until loop, then freezes and doesn't output properly |
|
|
Aha, wow I didn't see that.
Thanks a lot!
|
|
|
|
|
 |
ttm
|
Posted: Mon Jan 02, 2012 9:53 pm Post subject: Re: Pong game work until loop, then freezes and doesn't output properly |
|
|
NP=P
|
|
|
|
|
 |
|
|