PureTris !

Advanced game related topics
miskox
Enthusiast
Enthusiast
Posts: 107
Joined: Sun Aug 27, 2017 7:37 pm
Location: Slovenia

Re: PureTris !

Post by miskox »

Just to add: my high score is 33050. Yes, it is too fast when level 9 is reached.

Saso
User avatar
Mindphazer
Enthusiast
Enthusiast
Posts: 456
Joined: Mon Sep 10, 2012 10:41 am
Location: Savoie

Re: PureTris !

Post 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
MacBook Pro 16" M4 Pro - 24 Gb - MacOS 15.4.1 - Iphone 15 Pro Max - iPad at home
...and unfortunately... Windows at work...
User avatar
Janni
Enthusiast
Enthusiast
Posts: 127
Joined: Mon Feb 21, 2022 5:58 pm
Location: Norway

Re: PureTris !

Post by Janni »

Getting better and better I see :D
Looking forward to test it. Thanks
Spec: Linux Mint 20.3 Cinnamon, i7-3770K, 16GB RAM, RTX 2070 Super
AZJIO
Addict
Addict
Posts: 2141
Joined: Sun May 14, 2017 1:48 am

Re: PureTris !

Post 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_"
Last edited by AZJIO on Mon Jul 24, 2023 4:25 pm, edited 4 times in total.
dcr3
Enthusiast
Enthusiast
Posts: 181
Joined: Fri Aug 04, 2017 11:03 pm

Re: PureTris !

Post by dcr3 »

Nice touch the shadow pieces. 8)
AZJIO
Addict
Addict
Posts: 2141
Joined: Sun May 14, 2017 1:48 am

Re: PureTris !

Post 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.
infratec
Always Here
Always Here
Posts: 7577
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: PureTris !

Post 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.
infratec
Always Here
Always Here
Posts: 7577
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: PureTris !

Post 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_"
User avatar
Mindphazer
Enthusiast
Enthusiast
Posts: 456
Joined: Mon Sep 10, 2012 10:41 am
Location: Savoie

Re: PureTris !

Post 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 !
MacBook Pro 16" M4 Pro - 24 Gb - MacOS 15.4.1 - Iphone 15 Pro Max - iPad at home
...and unfortunately... Windows at work...
User avatar
Mindphazer
Enthusiast
Enthusiast
Posts: 456
Joined: Mon Sep 10, 2012 10:41 am
Location: Savoie

Re: PureTris !

Post 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
MacBook Pro 16" M4 Pro - 24 Gb - MacOS 15.4.1 - Iphone 15 Pro Max - iPad at home
...and unfortunately... Windows at work...
User avatar
Mindphazer
Enthusiast
Enthusiast
Posts: 456
Joined: Mon Sep 10, 2012 10:41 am
Location: Savoie

Re: PureTris !

Post 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 !
MacBook Pro 16" M4 Pro - 24 Gb - MacOS 15.4.1 - Iphone 15 Pro Max - iPad at home
...and unfortunately... Windows at work...
User avatar
Mindphazer
Enthusiast
Enthusiast
Posts: 456
Joined: Mon Sep 10, 2012 10:41 am
Location: Savoie

Re: PureTris !

Post by Mindphazer »

infratec wrote: Sat Jul 01, 2023 8:51 am

Code: Select all

;-TextesGER
  TextesGER:
Thanks for the German translation !
MacBook Pro 16" M4 Pro - 24 Gb - MacOS 15.4.1 - Iphone 15 Pro Max - iPad at home
...and unfortunately... Windows at work...
infratec
Always Here
Always Here
Posts: 7577
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: PureTris !

Post by infratec »

Maybe a hint: I always use space to drop the piece.

It is not a corner problem:
Image
infratec
Always Here
Always Here
Posts: 7577
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: PureTris !

Post by infratec »

Now I got also a 'No response' from the OS (Windows 10) an do more pieces appears.
User avatar
Mindphazer
Enthusiast
Enthusiast
Posts: 456
Joined: Mon Sep 10, 2012 10:41 am
Location: Savoie

Re: PureTris !

Post 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 ?
MacBook Pro 16" M4 Pro - 24 Gb - MacOS 15.4.1 - Iphone 15 Pro Max - iPad at home
...and unfortunately... Windows at work...
Post Reply