Search found 1092 matches

by paul doe
Apr 04, 2020 10:58
Forum: Beginners
Topic: I started a blog to learn FreeBASIC through videogames
Replies: 9
Views: 491

Re: I started a blog to learn FreeBASIC through videogames

Looks like a perfectly fine dot product to me... =/ EDIT: No, I just saw the '+' in there. For what is worth, that's why I would write it like this: function dotprod( v1 as point3d, v2 as point3d ) as single return( v1.x * v2.x + v1.y + v2.y + v1.z * v2.z ) end function It helps with readability (no...
by paul doe
Apr 04, 2020 0:44
Forum: Projects
Topic: FreeBasic Framework
Replies: 29
Views: 1939

Re: FreeBasic Framework

Update: fixed bugs and corrected some broken examples. Most notably, I added a method to insert elements into a List by pointer, and also allowed to provide an initial value for it. This broke the ability to template nested collections (ie a Dictionary of Lists), so it was removed. Inserting simple ...
by paul doe
Apr 03, 2020 21:20
Forum: General
Topic: Strange behaviour with #define
Replies: 8
Views: 173

Re: Strange behaviour with #define

I 'm facing a problem and I can't figure out if it's normal or a bug. Compile the code below with option -pp to see the problem. ... Yes, I had the same issues when coding the templating framework. Here's how I solved it: #define __conc__( a, b... ) a##b #define __nfcall__( a, b ) __conc__( a., b )...
by paul doe
Apr 02, 2020 3:10
Forum: Projects
Topic: Charger - A General FreeBASIC Framework
Replies: 11
Views: 457

Re: Charger - A General FreeBASIC Framework

... Also, I have thought about how to future-proof new Unicode codepoints, and I believe the best solution may be to develop a program which pulls files from the Public Unicode Database and generates the source code necessary. ... Indeed, that's a sane approach. Naturally, you're the implementor so...
by paul doe
Apr 01, 2020 12:00
Forum: General
Topic: and they all got sick :( - a small epidemiology program
Replies: 1
Views: 82

Re: and they all got sick :( - a small epidemiology program

... p.s. - one thing i found i tried to use unsigned integer 64 or ulongint but it wouldn't recognized so i used the suffix "ull" and that did the trick but i wonder why is it a bug in the compiler? (freebasic 32-bit 1.07 i think) i tried to finf the 64-bit compiler for freebasic but coul...
by paul doe
Mar 31, 2020 22:14
Forum: Tips and Tricks
Topic: fbgfx versus opengl graphics
Replies: 11
Views: 460

Re: fbgfx versus opengl graphics

Tourist Trap wrote:...
It confirms that there is not any difference.
...

You'll only notice if you slow down the rotation speed. The left cube has no subpixel accuracy. With plain colors the difference is subtle, but with textures applied you'll pick it immediately.
by paul doe
Mar 30, 2020 23:59
Forum: Projects
Topic: Charger - A General FreeBASIC Framework
Replies: 11
Views: 457

Re: Charger - A General FreeBASIC Framework

... And yes, you're welcome. I do plan to write an encode method so it can finally be written to a file. Super useful. Terrific work so far. ... EDIT- The lookup table approach I think would be memory hungry, wouldn't it? Also, not every codepoint maps to a single codepoint, so that's a lot of memo...
by paul doe
Mar 30, 2020 14:04
Forum: General
Topic: Best approach to fit n rectangles into a screen
Replies: 15
Views: 437

Re: Best approach to fit n rectangles into a screen

... @paul doe: I'm not sure if it the same thing what I'm looking for but spatial hashing sounds promising... Both quadtrees and spatial hashes are fine, but SH tends to overperform quadtrees for a large margin, until they eventually catch up (we're talking tens of millions of entities here). And, ...
by paul doe
Mar 29, 2020 23:25
Forum: Projects
Topic: Charger - A General FreeBASIC Framework
Replies: 11
Views: 457

Re: Charger - A General FreeBASIC Framework

Oh? A Unicode string class? My, that could prove very useful, indeed... And the 1.5 Mb of source for the class proves why nobody wanted to do this XD

Many thanks!
by paul doe
Mar 29, 2020 23:23
Forum: General
Topic: Best approach to fit n rectangles into a screen
Replies: 15
Views: 437

Re: Best approach to fit n rectangles into a screen

... The background is that I want to partition the image into zones to bundle a group of pixel for collision check within each grid zone to avoid unnecessary checks for pixel which are "far away" from each other. Isn't this just a specialized quadtree? Or you can also use spatial hashing...
by paul doe
Mar 29, 2020 12:52
Forum: General
Topic: OOP test
Replies: 13
Views: 315

Re: OOP test

... how do i make intefaces and abstract classes in FB ? ... By reading the manual , under the section 'User Defined Types'. There is no such thing as a proper interfaces yet (neither do classes, for that matter). However, by using the types you can fudge them to some extent. FreeBasic only support...
by paul doe
Mar 28, 2020 15:59
Forum: Community Discussion
Topic: Multiplatform coroutines in C and also in FreeBasic
Replies: 6
Views: 314

Re: Multiplatform coroutines in C and also in FreeBasic

Mmm, this could prove tremendously useful, thanks. I guess that it can also be built-in in the dialect itself (fork/yield/join?)
by paul doe
Mar 28, 2020 13:40
Forum: Windows
Topic: win7 vs 8
Replies: 10
Views: 648

Re: win7 vs 8

@TouristTrap: how so? It does work as expected for me. When you press Win+E, an explorer window is opened at the position of the last one you closed, and starts to stack from there. I recall Win7 having the same behavior, whereas I don't recall it opening a specific folder in a specific desktop posi...
by paul doe
Mar 28, 2020 0:37
Forum: Libraries
Topic: raylib headers
Replies: 34
Views: 1122

Re: raylib headers

@BasicCoder2: see here for a description of the problem you're having: https://www.freebasic.net/forum/viewtopic.php?f=14&t=28380&start=15#p269653 Or you can use the 64-bit version which does not have the issue you're reporting (the dll itself needs another one, the gcc runtime). @Joshy: any...
by paul doe
Mar 28, 2020 0:15
Forum: Libraries
Topic: raylib headers
Replies: 34
Views: 1122

Re: raylib headers

@fxm: I see that sancho3 reviewed the topic 'Using libraries in FreeBasic' by SJ Zero on February 06, 2018, under 'Community Tutorials'. Mind if I rewrite it completely? (it's quite outdated by now). Also, I think a link to it directly in the Table of Contents might prove useful, since this has to b...

Go to advanced search