Search found 1238 matches
- Sat Dec 02, 2023 2:17 pm
- Forum: Coding Questions
- Topic: Faster vector graphics
- Replies: 29
- Views: 1035
Re: Faster vector graphics
I wasn't drawing the image myself, I only used SetGadgetAttribute(canvas, #PB_Canvas_Image, ImageID(img)). Not sure what blitting or copying PB does internally. I looked into my notes of the project and it says that the initial version with those changes wasn't actually faster but a bit slower, so I...
- Sat Dec 02, 2023 10:04 am
- Forum: Coding Questions
- Topic: Faster vector graphics
- Replies: 29
- Views: 1035
Re: Faster vector graphics
You can speed up some things by using threads. What I did in a project is this (was vectordrawing on a canvas for a game): - when you get the data for drawing, don't draw it directly, but instead collect it in a structured list. For example coordinates, thickness ect. of lines/shapes you want to dra...
- Sun Sep 10, 2023 8:01 am
- Forum: Bugs - IDE
- Topic: Debugger bug (breakpoint ignored)
- Replies: 2
- Views: 295
Re: Debugger bug (breakpoint ignored)
'Step Over' is supposed to do exactly that. If you use 'Continue' or just 'Step' it will go into the procedure and/or stop at the breakpoint.
Not sure what F10 is. It opens the window menu here on linux.
Not sure what F10 is. It opens the window menu here on linux.
- Thu Jun 08, 2023 5:55 pm
- Forum: Bugs - IDE
- Topic: module, constant, autocomplete.
- Replies: 2
- Views: 358
Re: module, constant, autocomplete.
It seems to work here [on linux]. I get autocompletion in the last 2 examples when I backspace at the #cons or when I type it new after the brace (
- Sat May 06, 2023 11:30 am
- Forum: Coding Questions
- Topic: How do I get the leftmost/righmost character in a string?
- Replies: 22
- Views: 679
Re: How do I get the leftmost/righmost character in a string?
@mk-soft
Your ProcedureReturn values should be swapped?
Your ProcedureReturn values should be swapped?
- Sat May 06, 2023 8:40 am
- Forum: Coding Questions
- Topic: How do I get the leftmost/righmost character in a string?
- Replies: 22
- Views: 679
Re: How do I get the leftmost/righmost character in a string?
PB supports only UCS2 unicode without surrogates supports, should be mentioned in the generate string section as basically every function which manipulate string is impacted. Maybe those are surrogate characters? They seem to occupy 4 bytes. s1.s = "🅐A🅚K🅝" s2.s = Left(s1, 1) s3.s = Right(...
- Sun Jan 22, 2023 12:17 pm
- Forum: Off Topic
- Topic: ?Conspiracy? Mhhh...
- Replies: 2
- Views: 489
Re: ?Conspiracy? Mhhh...
Using an online tool gives me 912, and 913 if the end date is included: https://www.timeanddate.com/date/durationresult.html?d1=11&m1=9&y1=2001&d2=11&m2=3&y2=2004 When using floating point conversion we get 911.95.., closer to 912. Debug (1.0*Date(2004,03,11,07,36,00)-Date(2001,0...
- Sun Nov 27, 2022 11:32 am
- Forum: Announcement
- Topic: [GAME] Space Cadets
- Replies: 7
- Views: 752
Re: [GAME] Space Cadets
Just saw one more thing:
The title in the manual PDF is still set to another game of yours, Sweet Memories.
The title in the manual PDF is still set to another game of yours, Sweet Memories.
- Sun Nov 27, 2022 9:43 am
- Forum: Announcement
- Topic: [GAME] Space Cadets
- Replies: 7
- Views: 752
Re: [GAME] Space Cadets
Hi. Nice to see a finished game. :D I tried it on linux. On Ubuntu 18.04 the glibc version present is too old, so it doesn't run. But it starts fine on Ubuntu 22.04.1 LTS. I didn't get to play it though. I explored the menu first. The font size seems to large so the text lines overlap or get cropped...
- Sun Nov 13, 2022 8:42 am
- Forum: Off Topic
- Topic: Sci-Fi PB Software to be seen here :)
- Replies: 4
- Views: 583
Re: Sci-Fi PB Software to be seen here :)
I think utopiomania is the author of the html editor shown (possibly written in PB), as the About window in the beginning is suggesting.
But I agree, utopiomania could have been less cryptic about it.
But I agree, utopiomania could have been less cryptic about it.
- Fri Sep 30, 2022 5:57 pm
- Forum: Coding Questions
- Topic: Understanding strings in Unicode
- Replies: 14
- Views: 840
Re: Understanding strings in Unicode
It is true that UTF8 has a variable length. But we talk here about the internal representation of a string in Pure Basic, which is "Unicode" or more correct UTF-16, using exact 2 Bytes per each character for the BMP (Basic multilingual plane of unicode). UTF-16 has surrogate pairs too (bu...
- Tue Sep 27, 2022 4:56 pm
- Forum: Coding Questions
- Topic: Is the variable equal to zero when declared
- Replies: 5
- Views: 447
Re: Is the variable equal to zero when declared
Just one more note: zero-initialization will not happen if the variable has been declared already. So make sure you know your code

Code: Select all
Global a
Debug a ; 0
a = 123
; ...
; ...
; ...
Global a ; (not zero-initialized)
Debug a ; 123
- Mon Sep 26, 2022 5:02 pm
- Forum: Feature Requests and Wishlists
- Topic: Column mode in PB IDE
- Replies: 10
- Views: 726
Re: Column mode in PB IDE
You can also use search/replace to edit multiple identical lines simultaneously.
- select 'el' of multiple lines with shift alt cursor-keys (on linux)
- replace (cntrl F) 'el' with 'els', check 'search inside selection only'
- 'replace all'
now those lines have 'levels' instead of 'level'.
- select 'el' of multiple lines with shift alt cursor-keys (on linux)
- replace (cntrl F) 'el' with 'els', check 'search inside selection only'
- 'replace all'
now those lines have 'levels' instead of 'level'.
- Mon Sep 26, 2022 5:48 am
- Forum: Feature Requests and Wishlists
- Topic: Column mode in PB IDE
- Replies: 10
- Views: 726
Re: Column mode in PB IDE
Well, you get a rectangle selection, but the edit does not work. In column mode i believe you would be able type/edit on all the lines at once.
- Sun Jul 31, 2022 3:09 pm
- Forum: Coding Questions
- Topic: What is best... define.s variable or define variable.s
- Replies: 35
- Views: 2100
Re: What is best... define.s variable or define variable.s
Yes, that's the one.