Speed Tetris

Applications, Games, Tools, User libs and useful stuff coded in PureBasic
User avatar
StarBootics
Addict
Addict
Posts: 1006
Joined: Sun Jul 07, 2013 11:35 am
Location: Canada

Speed Tetris

Post by StarBootics »

Hello everyone,

A small Tetris game that I have created without using any sprite or game libs.

Image

There is two Mode to play, the "Sprint Mode" is the best time to reach 500 points. The "Endurance Mode" the best time to reach 1500 points. The source code can be downloaded here :

https://www.dropbox.com/s/x4mmgabj1ydu9 ... m.zip?dl=0

Edit #1 : Online Score system added
Edit #2 : Function to enter a user name for the online high score added
Edit #3 : Bug correction, Score tables now have all information (Completed lines and points) Special notes : The offline score file need to be deleted because of the corrected bug

Best regards
StarBootics
Last edited by StarBootics on Sat Jun 01, 2019 5:03 pm, edited 4 times in total.
The Stone Age did not end due to a shortage of stones !
User avatar
RSBasic
Moderator
Moderator
Posts: 1228
Joined: Thu Dec 31, 2009 11:05 pm
Location: Gernsbach (Germany)
Contact:

Re: Speed Tetris

Post by RSBasic »

Very nice game, thank you. Can you create an online highscore list? E.g. with: https://www.purebasic.fr/german/viewtop ... =8&t=12857
Image
Image
User avatar
StarBootics
Addict
Addict
Posts: 1006
Joined: Sun Jul 07, 2013 11:35 am
Location: Canada

Re: Speed Tetris

Post by StarBootics »

RSBasic wrote:Very nice game, thank you. Can you create an online highscore list? E.g. with: https://www.purebasic.fr/german/viewtop ... =8&t=12857
It's a good idea but I don't have any knowledge of php programming. So adapting the given example will take a while so maybe for version 2.0.0.

Best regards
StarBootics
The Stone Age did not end due to a shortage of stones !
User avatar
StarBootics
Addict
Addict
Posts: 1006
Joined: Sun Jul 07, 2013 11:35 am
Location: Canada

Re: Speed Tetris

Post by StarBootics »

RSBasic wrote:Very nice game, thank you. Can you create an online highscore list? E.g. with: https://www.purebasic.fr/german/viewtop ... =8&t=12857
I have played around with the given example and I think I will be able to come up with something sooner than I previously thought. That being said, should I simply throw away the offline score tables and have only online score tables ? Your advice will be appreciated.

Best regards
StarBootics
The Stone Age did not end due to a shortage of stones !
User avatar
RSBasic
Moderator
Moderator
Posts: 1228
Joined: Thu Dec 31, 2009 11:05 pm
Location: Gernsbach (Germany)
Contact:

Re: Speed Tetris

Post by RSBasic »

StarBootics wrote:
RSBasic wrote:Very nice game, thank you. Can you create an online highscore list? E.g. with: https://www.purebasic.fr/german/viewtop ... =8&t=12857
I have played around with the given example and I think I will be able to come up with something sooner than I previously thought. That being said, should I simply throw away the offline score tables and have only online score tables ? Your advice will be appreciated.s
The online high score is better for me. Offline highscore is not needed afterwards.
Thank you in advance.
Image
Image
BarryG
Addict
Addict
Posts: 4318
Joined: Thu Apr 18, 2019 8:17 am

Re: Speed Tetris

Post by BarryG »

How do you rotate the shapes? I see the RotateShape() procedure but no keys that call it?
User avatar
RSBasic
Moderator
Moderator
Posts: 1228
Joined: Thu Dec 31, 2009 11:05 pm
Location: Gernsbach (Germany)
Contact:

Re: Speed Tetris

Post by RSBasic »

With A key.
Image
Image
BarryG
Addict
Addict
Posts: 4318
Joined: Thu Apr 18, 2019 8:17 am

Re: Speed Tetris

Post by BarryG »

Thanks!
User avatar
StarBootics
Addict
Addict
Posts: 1006
Joined: Sun Jul 07, 2013 11:35 am
Location: Canada

Re: Speed Tetris

Post by StarBootics »

RSBasic wrote:With A key.
For moving blocks :

"A" key rotate left
"D" key rotate right
"Left" move left
"Right" move right
"Down" move down

The corresponding code :

Code: Select all

      AddKeyboardShortcut(*This\MainWin\GetHandle(), #PB_Shortcut_A, #ShortCut_Rotate_Left)
      AddKeyboardShortcut(*This\MainWin\GetHandle(), #PB_Shortcut_D, #ShortCut_Rotate_Right)
      AddKeyboardShortcut(*This\MainWin\GetHandle(), #PB_Shortcut_Left, #ShortCut_Move_Left)
      AddKeyboardShortcut(*This\MainWin\GetHandle(), #PB_Shortcut_Right, #ShortCut_Move_Right)
      AddKeyboardShortcut(*This\MainWin\GetHandle(), #PB_Shortcut_Down , #ShortCut_Move_Down)
By the way I will add the online scoring system today along with the offline scoring system. The way I see this the user will have to set the high score system he want to use just once.

Best regards
StarBootics
The Stone Age did not end due to a shortage of stones !
User avatar
StarBootics
Addict
Addict
Posts: 1006
Joined: Sun Jul 07, 2013 11:35 am
Location: Canada

Re: Speed Tetris

Post by StarBootics »

Hello everyone,

I have uploaded a new version that include an online score system. See the first post for the source code download link.

Best regards
StarBootics
The Stone Age did not end due to a shortage of stones !
User avatar
RSBasic
Moderator
Moderator
Posts: 1228
Joined: Thu Dec 31, 2009 11:05 pm
Location: Gernsbach (Germany)
Contact:

Re: Speed Tetris

Post by RSBasic »

Thank you very mich. Image

Can you add a function to enter a user name for the online highscore?
Image
Image
User avatar
StarBootics
Addict
Addict
Posts: 1006
Joined: Sun Jul 07, 2013 11:35 am
Location: Canada

Re: Speed Tetris

Post by StarBootics »

RSBasic wrote:Thank you very mich. Image

Can you add a function to enter a user name for the online highscore?
Done !

Best regards
StarBootics
The Stone Age did not end due to a shortage of stones !
User avatar
RSBasic
Moderator
Moderator
Posts: 1228
Joined: Thu Dec 31, 2009 11:05 pm
Location: Gernsbach (Germany)
Contact:

Re: Speed Tetris

Post by RSBasic »

Thank you, but the project doesn't compile.

Code: Select all

ToolBoxFile "BuiltPathDirectory - Module.pb", "ColorEffex - Module.pb", "CounterGadget - Module.pb"
ToolBoxFile "FormatMilliSeconds - Module.pb", "StringBetween - Module.pb", "DownloadToString - Module.pb"
ToolBoxFile "Language System - OOP.pb", "Window - OOP.pb", "Chrono - OOP.pb"
What is ToolBoxFile?
Image
Image
User avatar
StarBootics
Addict
Addict
Posts: 1006
Joined: Sun Jul 07, 2013 11:35 am
Location: Canada

Re: Speed Tetris

Post by StarBootics »

RSBasic wrote:Thank you, but the project doesn't compile.

Code: Select all

ToolBoxFile "BuiltPathDirectory - Module.pb", "ColorEffex - Module.pb", "CounterGadget - Module.pb"
ToolBoxFile "FormatMilliSeconds - Module.pb", "StringBetween - Module.pb", "DownloadToString - Module.pb"
ToolBoxFile "Language System - OOP.pb", "Window - OOP.pb", "Chrono - OOP.pb"
What is ToolBoxFile?
Sorry my bad. I have make change and upload the source code again.

About ToolBoxFile look here : viewtopic.php?f=14&t=49190

Best regards
StarBootics
The Stone Age did not end due to a shortage of stones !
User avatar
RSBasic
Moderator
Moderator
Posts: 1228
Joined: Thu Dec 31, 2009 11:05 pm
Location: Gernsbach (Germany)
Contact:

Re: Speed Tetris

Post by RSBasic »

Thank you, now works.
But if I lost the game, how can I sign up for the online highscore?
Image
Image
Post Reply