Sorry no russian.
Some questions before purchase (graphic wise)
Re: Some questions before purchase (graphic wise)
QTranslate
Crow Translate
s3_translator
examples don't need a translator.
you can read here. But it won't be perfectly accurate.
Crow Translate
s3_translator
examples don't need a translator.
you can read here. But it won't be perfectly accurate.
Re: Some questions before purchase (graphic wise)
In PB you have 3 choices:
console programs (only Text)
GUI programs (graphic elements)
Screen programs (sprites)
You have to decide what you want to use.
The later 2 are event driven, you need one event loop for handling the events.
console programs (only Text)
GUI programs (graphic elements)
Screen programs (sprites)
You have to decide what you want to use.
The later 2 are event driven, you need one event loop for handling the events.
Re: Some questions before purchase (graphic wise)
It's hard to decide because I don't know what all I can do in every options.infratec wrote: Fri Sep 22, 2023 10:56 am In PB you have 3 choices:
console programs (only Text)
GUI programs (graphic elements)
Screen programs (sprites)
You have to decide what you want to use.
The later 2 are event driven, you need one event loop for handling the events.
ATM I need to handle long file (contain a lot of text separated by [CRLF] with fixed structure (line1, line2, line3, line4, line5 all this 100+ times) . Display this separated text lines in some kind of 'form". And most important I have to handle local language support. Latter there are some pictures (no animation, just bitmaps).
I think console can handle this but I don't know it's possible enlarge text size + select correct font with language support (fonts like Consolas or Constantia). I prefer not work with graphicalconsole because long lines not prperly formated in window.
I saw some DLL or Library manipulation I can't use because I have only demo PB.
So question is, CAN console handle this or I have to use GUI method? I don't think sprites is correct way.
Re: Some questions before purchase (graphic wise)
It will very much depend on the available console / terminal emulation.Attronach wrote: Fri Sep 22, 2023 11:20 am Latter there are some pictures (no animation, just bitmaps).
So question is, CAN console handle this or I have to use GUI method? I don't think sprites is correct way.
I know 2 ways to display "pictures" on a console without using the graphical console. One method is easy - you convert your pictures to ascii using an online service, embed them into your source (see datasection / includebinary) and then output them to the console.
The advanced method involves redefining the console character charset to a custom font. That method is definately not for beginners and not possible on all consoles.
To answer your question - if using the graphical console or a converted ascii art is good enough for you, then yes it works. Otherwise no

Re: Some questions before purchase (graphic wise)
Both. In your first post, you showed the well-known "15 Puzzle".
Here's a PureBasic console version of it -> https://www.rosettacode.org/wiki/15_puz ... #PureBasic
Here's a PureBasic windowed version with non-graphical buttons* -> viewtopic.php?f=27&t=76759
And here's how PureBasic can do other sliding puzzle games -> viewtopic.php?t=73417
I hope these three links show you what the paid version of PureBasic can do.
*The buttons can have graphical images on them if you prefer, like in your first post.
Re: Some questions before purchase (graphic wise)
I see. I thing draw image in separate small window will be enough. And picture is bonus not requirement.
Main problems are font size and correct displaying national characters.
Re: Some questions before purchase (graphic wise)
Advanced purebasic users could use the windows ncurses port.

But the graphical console can do the same and is a native part of purebasic.

But the graphical console can do the same and is a native part of purebasic.
Re: Some questions before purchase (graphic wise)
In Console use Print() and PrintN()
In drawing mode use DrawText()
Variable names ending with $ are automatically defined as strings. Without $ you have to put ".s" suffix for the data type. Sometimes it may be necessary to define the string with a struct "wrapping".
Technically pointers should take the same place in memory BUT with .STRING you can get to the pointer of the string-pointer (where the string pointer is stored).
Define MyString2.STRING
@Mystring2 eq. **tchar
@MyString2\s eq. *tchar
Define MyString1.s
@MyString1 == @Mystring1 ; only *tchar
You may need sometimes the .STRING structure. Notice you can't return structures in PB. You have to return a Pointer, which is equal to the .i or .INTEGER type (size depends or architecture/OS 32 or 64 bit).
There are also embedded fixed string types, they are normally also 16 bit Unicode sized "TCHAR" type.
You may want to access fixed strings or write them in ASCII/UTF8, you will have to use PokeS() and PeekS()
In drawing mode use DrawText()
Code: Select all
OpenConsole()
define String_Num$ = "12345"
PrintN(String_Num$)
define A$
PrintN("Hit RETURN to exit")
A$ = Input()
;
CloseConsole()
Code: Select all
define MyString1.s = "Hello World 1"
Print(MyString1)
define MyString2.STRING\s="Hello World 2"
Print(MyString2\s)
Define MyString2.STRING
@Mystring2 eq. **tchar
@MyString2\s eq. *tchar
Define MyString1.s
@MyString1 == @Mystring1 ; only *tchar
You may need sometimes the .STRING structure. Notice you can't return structures in PB. You have to return a Pointer, which is equal to the .i or .INTEGER type (size depends or architecture/OS 32 or 64 bit).
Code: Select all
Global MyString1.s, MyString2.STRING, MyString3$
Procedure.i ReturnStructurePointer()
ProcedureReturn @MyString2
EndProcedure
Procedure$ ReturnString1()
ProcedureReturn MyString1 ; MyString3$
EndProcedure
Procedure.s ReturnString2()
ProcedureReturn MyString2\s
EndProcedure
Code: Select all
Structure IhaveFixedString
Username.s{16} ; 16 characters * 2 = 32 bytes
EndStructure
Define User.IHaveFixedString\Username = "Snake P."
Debug User\Username
Code: Select all
Structure MyUser
Username.a[32] ; Username is 32 characters long, be careful to zero unused chars or limit max name length to 31 for string terminator (null char)
EndStructure
define User.myUser
Pokes(@User\Username,"Anonymous",32,#PB_Ascii | #PB_String_NoZero) ; max 32 bytes length will be PokeS-ed
define UserName$
UserName$ = PeekS(@User\Username, 32, #PB_Ascii) ; PeekS the ascii string, max 32 bytes/characters
Debug UserName$