Page 1 of 2
Speed Tetris
Posted: Sat May 25, 2019 3:14 am
by StarBootics
Hello everyone,
A small Tetris game that I have created without using any sprite or game libs.
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
Re: Speed Tetris
Posted: Sat May 25, 2019 3:06 pm
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
Re: Speed Tetris
Posted: Sat May 25, 2019 6:08 pm
by StarBootics
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
Re: Speed Tetris
Posted: Sun May 26, 2019 1:17 am
by StarBootics
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
Re: Speed Tetris
Posted: Sun May 26, 2019 7:29 am
by RSBasic
StarBootics wrote:
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.
Re: Speed Tetris
Posted: Sun May 26, 2019 7:59 am
by BarryG
How do you rotate the shapes? I see the RotateShape() procedure but no keys that call it?
Re: Speed Tetris
Posted: Sun May 26, 2019 8:10 am
by RSBasic
With A key.
Re: Speed Tetris
Posted: Sun May 26, 2019 10:29 am
by BarryG
Thanks!
Re: Speed Tetris
Posted: Sun May 26, 2019 2:21 pm
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
Re: Speed Tetris
Posted: Mon May 27, 2019 12:12 am
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
Re: Speed Tetris
Posted: Mon May 27, 2019 8:06 am
by RSBasic
Thank you very mich.
Can you add a function to enter a user name for the online highscore?
Re: Speed Tetris
Posted: Mon May 27, 2019 5:06 pm
by StarBootics
RSBasic wrote:Thank you very mich.
Can you add a function to enter a user name for the online highscore?
Done !
Best regards
StarBootics
Re: Speed Tetris
Posted: Mon May 27, 2019 6:51 pm
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?
Re: Speed Tetris
Posted: Mon May 27, 2019 8:10 pm
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
Re: Speed Tetris
Posted: Mon May 27, 2019 9:09 pm
by RSBasic
Thank you, now works.
But if I lost the game, how can I sign up for the online highscore?