Page 3 of 5

Re: PureTris !

Posted: Tue Jun 27, 2023 10:20 pm
by miskox
Just to add: my high score is 33050. Yes, it is too fast when level 9 is reached.

Saso

Re: PureTris !

Posted: Fri Jun 30, 2023 10:21 am
by Mindphazer
A new version of PureTris has been released
The program includes a number of internal improvements and visual modifications.
Sounds have been added, and can be activated by checking "Sounds". In this case, the sound library must first be loaded.
If the sounds are not loaded, PureTris will still work!
- All texts are now included in DataSection, to facilitate multilingual management.
Simply set the "Lang" variable with the country code ("FRA", "ENG", "ITA", "ESP", Etc...), and create a DataSection "TextsLANG:" replacing "LANG" with the country code.
By default, everything is in French
- The piece can now be rotated clockwise (key A)
- No more .pbf files to include. The form is now included in the main source
- The Q key is used to quit a game in progress.
- The calculation of speed has been modified - the game was unplayable at high levels! Timer decreases by 10% with each level change
- The random distribution of coins has been revised so that statistics are uniform for each coin (it's impossible to have the same coin 3 times in a row).

First post updated

Re: PureTris !

Posted: Fri Jun 30, 2023 2:21 pm
by Janni
Getting better and better I see :D
Looking forward to test it. Thanks

Re: PureTris !

Posted: Fri Jun 30, 2023 6:58 pm
by AZJIO
The source must be saved in UTF-8 for this to work. This time I dialed 48217. Perhaps you need to add the time for which the game was played. It would be more interesting to compare records based on the time spent, the number of pieces, the level, the destroyed lines, and not just the number of points.

Code: Select all

Select Lang
  Case "RUS"
    Restore TextesRUS
  Case "ENG"
    Restore TextesENG
  Default
    Restore TextesRUS
EndSelect

  ; .........
  
  Credits:
  Data.s "Puretris !" 
  Data.s ""
  Data.s "Автор Mindphazer"
  Data.s "(c) 2023"
  Data.s ""
  Data.s "Сделано в Purebasic"
  Data.s " "
  Data.s "Спасибо:"
  Data.s "Fred (за супер PB!)"
  Data.s "Infratec"
  Data.s "fjmangas"
  Data.s "И другим участникам"
  Data.s "форума Purebasic"
  Data.s " "
  Data.s "Нажмите N,"
  Data.s "чтобы начать"
  Data.s " "
  Data.s "_END_"
  
  ; .........
  
  
    TextesRUS:
    Data.s "ButtonQuit=Выход"
    Data.s "ButtonAide=Справка"
    Data.s "ButtonNewGame=Новая игра"
    Data.s "ButtonClearHS=Очистить рекорды"
    Data.s "TexteScore=Счет"
    Data.s "TexteLignes=Линии"
    Data.s "TexteHighScores=Рекорды"
    Data.s "TexteNiveau=Уровень"
    Data.s "TexteNext=Следующая фигура"
    Data.s "CheckboxSound=Звуки"
    Data.s "ToolTipSound=Активирует звуки"
    Data.s "CheckBoxShadow=Тень"
    Data.s "ToolTipShadows=Активирует фигуру, показывающую, куда будет брошен предмет."
    Data.s "NewHiScore=У вас высокий балл !"
    Data.s "ScoreNumber=У вас есть счет n° "
    Data.s "EnterName=Введите ваше имя"
    Data.s "RequesterAreYouSure=Вы уверены, что хотите очистить рекорды?"
    Data.s "RequesterClearHS=Очистить рекорды"
    Data.s "MenuFichier=&Файл"
    Data.s "MenuAction=&Действие"
    Data.s "MenuNewGame=Новая игра" + Chr(9) + "N"
    Data.s "MenuClear=Очистить рекорды"
    Data.s "TitleAide=Справка"
    Data.s "TexteGameOver=Игра окончена!"
    Data.s "TexteGamePaused=Пауза"
    Data.s "TexteTemps=Время игры"
    Data.s "TexteHold=Держать"
    Data.s "Aide=Стрелки влево и вправо = переместить фигуру" + #CRLF$ + "Стрелка вверх = повернуть фигуру (против часовой стрелки)" + #CRLF$ + "Клавиша A = повернуть (по часовой стрелке)" + #CRLF$ + "Стрелка вниз = переместить фигуру вниз" + #CRLF$ + "Пробел = бросить фигуру" + #CRLF$ + "Ударать по C = Hold"  + #CRLF$ + "Клавиша P = пауза в игре" + #CRLF$ + "Клавиша Q = выйти из игры"
    Data.s "_End_"

Re: PureTris !

Posted: Fri Jun 30, 2023 7:11 pm
by dcr3
Nice touch the shadow pieces. 8)

Re: PureTris !

Posted: Fri Jun 30, 2023 10:03 pm
by AZJIO

Code: Select all

  CompilerIf #PB_Compiler_OS = #PB_OS_Windows
    Path$ = "sounds\"
  CompilerElse
    Path$ = "sounds/"
  CompilerEndIf
So

Code: Select all

Path$ = "sounds" + #PS$
When compiled, the executable does not have an icon.

Re: PureTris !

Posted: Sat Jul 01, 2023 8:35 am
by infratec
Now there is a bug inside:
Image

Image

Sometimes the parts dont went down completely.

Shadow and preview should be switchable (on/off)
And then increase the points for the parts.

Re: PureTris !

Posted: Sat Jul 01, 2023 8:51 am
by infratec

Code: Select all

;-TextesGER
  TextesGER:
    Data.s "ButtonQuit",          "Ende"
    Data.s "ButtonAide",          "Hilfe"
    Data.s "ButtonNewGame",       "Neues Spiel"
    Data.s "ButtonClearHS",       "Rangliste löschen"
    Data.s "TexteScore",          "Spielstand"
    Data.s "TexteLignes",         "Zeilen"
    Data.s "TexteHighScores",     "Rangliste"
    Data.s "TexteNiveau",         "Niveau"
    Data.s "TexteStatistiques",   "Statistik"
    Data.s "TexteNext",           "Nächstes Teil"
    Data.s "CheckboxSound",       "Sounds"
    Data.s "NewHiScore",          "Du liegst in Führung !"
    Data.s "ScoreNumber",         "Du liegst auf Rang Nr. "
    Data.s "EnterName",           "Gib Deinen Namen ein"
    Data.s "RequesterAreYouSure", "Willst Du wirklich die Rangliste löschen ?"
    Data.s "RequesterClearHS",    "Lösche Rangliste"
    Data.s "MenuFichier",         "&Datei"
    Data.s "MenuAction",          "&Aktionen"
    Data.s "MenuNewGame",         "Neues Spiel" + #TAB$ + "N"
    Data.s "MenuClear",           "Lösche Rangliste"
    Data.s "TitleAide",           "Hilfe"
    Data.s "TexteGameOver",       "Spiel beendet !"
    Data.s "TexteGamePaused",     "Spiel pausiert"
    Data.s "Aide",                "Linker und rechter Pfeil = bewegt das Teil" + #CRLF$ + "Pfeil hoch = dreht das Teil (gegen den Uhrzeigersinn)" + #CRLF$ + "A Taste = dreht das Teil (im Uhrzeigersinn)" + #CRLF$ + "Pfeil runter = bewegt das Teil abwärts" + #CRLF$ + "Leertaste = lässt das Teil fallen" + #CRLF$ + "P Taste = pausiert das Spiel" + #CRLF$ + "Q Taste = beendet das Spiel"
    Data.s "_End_"

Re: PureTris !

Posted: Sat Jul 01, 2023 10:28 am
by Mindphazer
AZJIO wrote: Fri Jun 30, 2023 6:58 pm The source must be saved in UTF-8 for this to work. This time I dialed 48217. Perhaps you need to add the time for which the game was played. It would be more interesting to compare records based on the time spent, the number of pieces, the level, the destroyed lines, and not just the number of points.
Level and number of lines are already stored, but this is not displayed. Good idea for the time spent
And thanks for the russian translation !

Re: PureTris !

Posted: Sat Jul 01, 2023 10:29 am
by Mindphazer
AZJIO wrote: Fri Jun 30, 2023 10:03 pm

Code: Select all

  CompilerIf #PB_Compiler_OS = #PB_OS_Windows
    Path$ = "sounds\"
  CompilerElse
    Path$ = "sounds/"
  CompilerEndIf
So

Code: Select all

Path$ = "sounds" + #PS$
When compiled,the executable does not have an icon.
Thanks for the tip, I wasn't aware of that constant

Re: PureTris !

Posted: Sat Jul 01, 2023 10:31 am
by Mindphazer
infratec wrote: Sat Jul 01, 2023 8:35 am Now there is a bug inside:
Sometimes the parts dont went down completely.

Shadow and preview should be switchable (on/off)
And then increase the points for the parts.
Weird... I can't reproduce the bug, and i never had this behaviour... I'll try to investigate.
You're right, shadow and preview should be switchable, it's now on my todo list !

Re: PureTris !

Posted: Sat Jul 01, 2023 10:32 am
by Mindphazer
infratec wrote: Sat Jul 01, 2023 8:51 am

Code: Select all

;-TextesGER
  TextesGER:
Thanks for the German translation !

Re: PureTris !

Posted: Sat Jul 01, 2023 11:52 am
by infratec
Maybe a hint: I always use space to drop the piece.

It is not a corner problem:
Image

Re: PureTris !

Posted: Sat Jul 01, 2023 12:07 pm
by infratec
Now I got also a 'No response' from the OS (Windows 10) an do more pieces appears.

Re: PureTris !

Posted: Sat Jul 01, 2023 12:28 pm
by Mindphazer
Damn :|
I've tested long hours on Mac and on Windows (10), and i never faced that problem....
I also use and abuse space bar..
Did you have debugger on when you had the "no response" problem ? Have you noticed something ?