Play Transpetris - updated Aug 30
- netmaestro
- PureBasic Bullfrog
- Posts: 8451
- Joined: Wed Jul 06, 2005 5:42 am
- Location: Fort Nelson, BC, Canada
The other user who saw the pieces move at warp speed is using SiS video as well. There may be some issue with my method of speed control not working on those cards. I'm sure it will be resolved soon, as I'm going to do some research into the best way to achieve consistent speed variations in 2d drawing. I never looked into it very far, I just tried something that looked reasonable and it seemed to work. I'm just using a combination of delays together with increments varying between 1-4 pixels of downward motion per draw. No timer, so it can probably be done much better.
Wait - I know what's happening! Those drawing commands are getting executed in spite of the delays in the code. These extra draws are permanently lost on many systems, tricking me into thinking it works. But some graphics subsystems or hyperthreaeding processors are getting at those drawing commands while my program is doing a delay() and they are coming through, resulting in the warp speed.
So, if this is anywhere near an accurate view of the problem, it should be easily solved by dumping the delays in favour of a timer which fires every so many milliseconds. Then there's no way anything gets buffered on some systems and lost on others. I'll change it tomorrow and we'll see if that makes a difference.
[edit] Ok I've looked into it and preliminary testing shows that the hi-res timer included with PBOSL is going to do the trick quite nicely. In a couple of hours I'll post a new version of the program using proper timing techniques and that should fix the warp speed issue.
Wait - I know what's happening! Those drawing commands are getting executed in spite of the delays in the code. These extra draws are permanently lost on many systems, tricking me into thinking it works. But some graphics subsystems or hyperthreaeding processors are getting at those drawing commands while my program is doing a delay() and they are coming through, resulting in the warp speed.
So, if this is anywhere near an accurate view of the problem, it should be easily solved by dumping the delays in favour of a timer which fires every so many milliseconds. Then there's no way anything gets buffered on some systems and lost on others. I'll change it tomorrow and we'll see if that makes a difference.
[edit] Ok I've looked into it and preliminary testing shows that the hi-res timer included with PBOSL is going to do the trick quite nicely. In a couple of hours I'll post a new version of the program using proper timing techniques and that should fix the warp speed issue.
BERESHEIT
-
- 666
- Posts: 1033
- Joined: Mon Sep 01, 2003 2:33 pm
- netmaestro
- PureBasic Bullfrog
- Posts: 8451
- Joined: Wed Jul 06, 2005 5:42 am
- Location: Fort Nelson, BC, Canada
Speed controls are rewritten to take advantage of the excellent hi-res timer provided in PBOSL. The updated version, available for download now, should work correctly on all computers. Also, the update allows the provision of a greater number of more granular speed increases. If you are playing this game, please download it again to get this (better) version.
BERESHEIT
-
- 666
- Posts: 1033
- Joined: Mon Sep 01, 2003 2:33 pm
Am I doing something wrong? Now when I press the play button, it comes up straightaway with Yikes Game Over. No tiles at all - the top circle stays blank. The question mark doesn't do anything either.
(I always thought I was rather good at Tetris, and so I should be with the amount of time invested in it.)
(I always thought I was rather good at Tetris, and so I should be with the amount of time invested in it.)
-
- 666
- Posts: 1033
- Joined: Mon Sep 01, 2003 2:33 pm
Nice tetris
Nice tetris game!
I've played tetris a lot in the past and my mother is absolute adicted to this type of game..
Small question: where is the highscore stored?
I've played tetris a lot in the past and my mother is absolute adicted to this type of game..

Small question: where is the highscore stored?
- netmaestro
- PureBasic Bullfrog
- Posts: 8451
- Joined: Wed Jul 06, 2005 5:42 am
- Location: Fort Nelson, BC, Canada