Search found 1687 matches
- Apr 16, 2025 13:15
- Forum: Game Dev
- Topic: procedural spaceships
- Replies: 7
- Views: 420
Re: procedural spaceships
Very cool. Can Wave Function Collapse be used in these cases, though? It seems to work well with grids, but could it work here as well?
- Apr 15, 2025 22:52
- Forum: Beginners
- Topic: FreeBASIC vs QBasic Compatibility: Can Learning QBasic Help Me Transition? (Non-English Speaker Struggles!)
- Replies: 12
- Views: 755
Re: FreeBASIC vs QBasic Compatibility: Can Learning QBasic Help Me Transition? (Non-English Speaker Struggles!)
My Questions: Compatibility: How similar is FreeBASIC to QBasic? Can I reuse QBasic code/logic directly, or are there major differences? Learning Logic: Will practicing with QBasic help me build foundational skills for FreeBASIC, or am I learning "obsolete habits"? Pitfalls: Are there QBa...
- Mar 26, 2025 0:15
- Forum: Sources, Examples, Tips and Tricks
- Topic: axle model
- Replies: 18
- Views: 2309
Re: axle model
@Roland: mind that timestepping is not so simple as just sleeping in the loop, it requires the simulation to take it into account ie you integrate it based on the timestep.
For example, see:
https://dewitters.com/dewitters-gameloop/
For example, see:
https://dewitters.com/dewitters-gameloop/
- Mar 25, 2025 16:17
- Forum: Sources, Examples, Tips and Tricks
- Topic: axle model
- Replies: 18
- Views: 2309
Re: axle model
There is absolutely no account for timestepping. Thus, the simulation quickly 'explodes to infinity' if your system is too fast.
- Mar 24, 2025 6:08
- Forum: Windows
- Topic: Shorthand way to populate a udt.
- Replies: 13
- Views: 1177
Re: Shorthand way to populate a udt.
Sub SetWindow( WinLeft As Short, WinTop As Short, WinRight As Short, WinBottom As Short ) Dim As HANDLE hOut = GetStdHandle(STD_OUTPUT_HANDLE) SetConsoleScreenBufferSize(hOut, Type <COORD>(100, 60)) ' Default buffer size SetConsoleWindowInfo(hOut, True, @Type<SMALL_RECT>(WinLeft, WinTop, WinRight, ...
- Mar 15, 2025 1:16
- Forum: Community Discussion
- Topic: Supporting more formats other than .bmp for BLOAD/BSAVE ?
- Replies: 11
- Views: 1349
Re: Supporting more formats other than .bmp for BLOAD/BSAVE ?
Yeah, I was discussing this with Jeff a while back, but I decided to stop trying to improve anything from the usability perspective. So, best of luck trying to convince the honchos to include precompiled, standalone code, either as linkable libs (ie 'extensions') or bolt it into fbc directly. I hope...
- Mar 04, 2025 2:37
- Forum: General
- Topic: Idea or challenge ?!
- Replies: 21
- Views: 2571
Re: Idea or challenge ?!
Well, shouldn't be that hard: reimplement Boyer-Moore to accept an array of strings, then as soon as a string is NOT matched, reset Boyer-Moore and just check the next string. Return the first match (or none if there wasn't any). But I'm willing to bet that the speed difference with just iteraring t...
- Mar 04, 2025 1:25
- Forum: General
- Topic: Idea or challenge ?!
- Replies: 21
- Views: 2571
Re: Idea or challenge ?!
InStr uses a fast algo called 'Boyer-Moore'. What you want (seeing if a given string is part of a set) can be easily solved by using a hash table (or a trie if you need partial results). If what you want is the index, then: Sort the array of strings (lexicographical or whatever other order you choos...
Re: Speed
Reference article for this topic:
https://dewitters.com/dewitters-gameloop/
It explains several ways to do what you want (timestepping)
Another article (which is the implementation I prefer):
https://gafferongames.com/post/fix_your_timestep/
https://dewitters.com/dewitters-gameloop/
It explains several ways to do what you want (timestepping)
Another article (which is the implementation I prefer):
https://gafferongames.com/post/fix_your_timestep/
- Feb 20, 2025 3:19
- Forum: Windows
- Topic: OpenAL libraries
- Replies: 4
- Views: 1322
Re: OpenAL libraries
That's probably because you're trying to compile 64-bit code with the libraries being 32-bit, or vice-versa. Try compiling both to see which one works.
- Feb 18, 2025 15:30
- Forum: Projects
- Topic: CShell Graphics shell in Freebasic Ide
- Replies: 18
- Views: 3433
Re: CShell Graphics shell in Freebasic Ide
Screenshot%202025-02-18%20165312.png By the way, you can't simply do this. You need an image host (such as imgBB) to host your images, and then post the link they provide, as the forum doesn't allow for hosting images. Like this: https://i.ibb.co/vC6rhLtb/Imagen4.png The link the hosting provides u...
- Feb 18, 2025 14:45
- Forum: Projects
- Topic: CShell Graphics shell in Freebasic Ide
- Replies: 18
- Views: 3433
Re: CShell Graphics shell in Freebasic Ide
Guys help me please! What's the matter? The previous example I posted didn't help you? First of all: don't use #fblite ; it was meant for compatibility ages ago, and to compile old projects. It makes zero sense for new code. Second: a good way to learn from code samples is to try and modify stuff. ...
- Feb 18, 2025 13:30
- Forum: Projects
- Topic: CShell Graphics shell in Freebasic Ide
- Replies: 18
- Views: 3433
Re: CShell Graphics shell in Freebasic Ide
Hey guys! How to drag'n'drop icon "folder" in Freebasic ide #lang "fblite" please? Such an operation is a combination of several pieces of logic: whether the mouse is inside the icon when you start dragging, and computing the offset coordinates of the drag: #include once "f...
- Feb 18, 2025 3:17
- Forum: Beginners
- Topic: Parser example problem
- Replies: 20
- Views: 4013
Re: Parser example problem
You're welcome.
But I think you're overcomplicating a task that is otherwise very straightforward. Ever heard of the shunting yard algorithm? I think you could find it useful.
But I think you're overcomplicating a task that is otherwise very straightforward. Ever heard of the shunting yard algorithm? I think you could find it useful.
- Feb 16, 2025 12:08
- Forum: Community Discussion
- Topic: Delete() doesn't respect the const-ness of pointers
- Replies: 4
- Views: 993
Re: Delete() doesn't respect the const-ness of pointers
Then it has no point. It is returned by value anyway, so you're not really 'protecting' anything. Yes, it does protect against that: *(f.Bar) = -5 or: var p = f.bar *p = -5 I was obviously referring to the pointer itself, not its value. Alas, no read-only pointer there, at least not from an outside...