Re: Some questions before purchase (graphic wise)
Posted: Fri Sep 22, 2023 8:07 am
http://www.purebasic.com
https://www.purebasic.fr/english/
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.
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.
Both. In your first post, you showed the well-known "15 Puzzle".
I see. I thing draw image in separate small window will be enough. And picture is bonus not requirement.
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)
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$