Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Kitty Hello

Pages: 1 2 [3] 4 5 ... 706
GLBasic - en / Re: Save a TYPE array object
« on: 2022-May-05 »
The information is there. See the gpc_temp.h file. Each type has a dbg() function. In what format would you want to store the data? Consider you also have arrays.

GLBasic - en / Re: True Type Fonts
« on: 2022-Jan-24 »
I see. The standalone TTF library might be able to render unicode characters.

Off Topic / Re: Merry Christmas!
« on: 2022-Jan-04 »
And happy new year to all of you.

Code Snippets / Re: Load data from memory
« on: 2021-Dec-04 »
Unfortunately, PLAYMUSIC is a bit different. You might have to extract that file to the tmp directory. :(

Announcements / Re: Book
« on: 2021-Nov-25 »
Got me a copy as a friend's christmas present.  :good:

FAQ / Re: Missing Forums Attachments
« on: 2021-Nov-24 »
Done :)

Added to the github repository.

I attached the original project in the first post. Sorry, I didn't see it was deleted.

Off Topic / Re: Steam Deck
« on: 2021-Nov-15 »
Also, there is a CMake project, that theoretically should let you compile GLBasic programs to any platform. We might start with Linux and Mac for a first test.

I'd still go with the HtCreateThreads method. You might be able to implement OpenMP, but seriously, if you're dounf MT, you need to know what you do. It's not that easy if you want to avoid racing conditions etc.


I had to add a 3D eggplant to one of my games and noticed, that my AC3D license was too old and the uppgrade fee was raised a lot and whatnot. So I installed the new Blender 2.9 and after a few videos, I got the hang of it. It improved a LOT! If you want to do 3D, try this out.
So, the Blender export filter was broken due to API changes. I had a few nights to get that running again. The old script was about 10+ years old. :)
(reminder to myself: always comment code. Code you wrote 5 years ago is code someone else might have written...)

So, I fixed the export and found, the dda files were quite big. I inserted a scale factor for normals and vertex coordinates and now... the dda (ASCII!) file format is more compact than the ddd binary file format I used to be so proud of.

The trick is, that the vertex positions*1000 often result in numbers like "5" or "15", which is 2-3 bytes including a separating space caracter. The binary always takes 4 bytes per float. Same for the normal directions*100.
The next update will bring both, the export filter and the dda 2.0 support to you.

Is there any way we can help you out?

FAQ / Re: Missing Forums Attachments
« on: 2021-Nov-02 »
I accidentally found an old backup of 2019-10 and copied the attachments back, so most stuff should be fixed again :)

Announcements / Re: New BETA
« on: 2021-Oct-20 »
How about a SHOWSCREEN? ;)

Code Snippets / Load data from memory
« on: 2021-Oct-14 »
I tell you a secret. GLBasic can load data from a memory buffer, as if it was a file. With the attached code, you can use the contents of a string to "read" it as a file. This should work for about everything. Sprites, sounds, binary files, ...

Code: (glbasic) [Select]

LOCAL mem$ = "Hello World"
LOCAL memlen = LEN(mem$)

LOCAL file$ = MemMakeFile$(mem$)

LOCAL text$
OPENFILE(1, file$, TRUE)
READSTR 1, text$, 64
STDOUT text$ + "\n"


extern "C" {int sprintf(char *str, const char *format, ...); }

FUNCTION MemMakeFile$: BYREF data$, nofBytes = -1
IF nofBytes < 0 THEN nofBytes = LEN(data$)
LOCAL url$
LOCAL hx$ = RIGHT$("0000000000000000" + HEX$(nofBytes), 8)
void* address = &data_Str[0];
char buffer[64];
sprintf(buffer, "%x", address);

url_Str = CGStr("mem://") + hx_Str + CGStr(".") + CGStr(buffer);


Pages: 1 2 [3] 4 5 ... 706