Play Transpetris - updated Aug 30

Everything else that doesn't fall into one of the other PB categories.
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8451
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Post by netmaestro »

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.
BERESHEIT
User avatar
blueb
Addict
Addict
Posts: 1111
Joined: Sat Apr 26, 2003 2:15 pm
Location: Cuernavaca, Mexico

Post by blueb »

netmaestro,

Downloaded latest version and it now works as expected, and I'm not getting any speed problems.

8)


blueb
LuCiFeR[SD]
666
666
Posts: 1033
Joined: Mon Sep 01, 2003 2:33 pm

Post by LuCiFeR[SD] »

netmaestro, I'm using an ATi Radeon 9550 128mb card btw not SiS GFX :).
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8451
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Post by netmaestro »

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
LuCiFeR[SD]
666
666
Posts: 1033
Joined: Mon Sep 01, 2003 2:33 pm

Post by LuCiFeR[SD] »

Right, I'll give this a good test in the morning, as I have to go to bed now or I'll never get up for work ;).

Fingers crossed (as we say here in england) this will fix the issues.
User avatar
blueb
Addict
Addict
Posts: 1111
Joined: Sat Apr 26, 2003 2:15 pm
Location: Cuernavaca, Mexico

Post by blueb »

Re-loaded..

Still works well on My AMD FX-55.


blueb

PS - This could be addictive :wink:
carolight
User
User
Posts: 41
Joined: Mon Feb 09, 2004 11:08 am
Location: Gold Coast, Australia

Post by carolight »

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.)
LuCiFeR[SD]
666
666
Posts: 1033
Joined: Mon Sep 01, 2003 2:33 pm

Post by LuCiFeR[SD] »

Seems to be fine for me now netmaestro, all speed issues resolved :). Scored 16780 this time round. Most excellent work.
Rolands
User
User
Posts: 39
Joined: Thu Jun 12, 2003 6:29 pm

Nice tetris

Post by Rolands »

Nice tetris game!

I've played tetris a lot in the past and my mother is absolute adicted to this type of game.. :lol:

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

Post by netmaestro »

The highscore table is stored in the registry under HKEY_CURRENT_USER/Software/Transpetris. If you want to completely reset the high score, you can delete this key. However, you will not be able to "hack" the highscore table as it is encrypted with a strong algorithm. :twisted:
BERESHEIT
Rolands
User
User
Posts: 39
Joined: Thu Jun 12, 2003 6:29 pm

Post by Rolands »

Damn.. :P

Good luck with the full version! (saw it on your website)
thefool
Always Here
Always Here
Posts: 5875
Joined: Sat Aug 30, 2003 5:58 pm
Location: Denmark

Post by thefool »

netmaestro wrote: However, you will not be able to "hack" the highscore table as it is encrypted with a strong algorithm. :twisted:
Is that a challenge :twisted:
anyway of course its hard \ not possible to edit the registration key, however you can always change the score before saving it.
Post Reply