Search found 2289 matches

by angros47
Feb 02, 2024 18:40
Forum: Beginners
Topic: Is this legal?
Replies: 5
Views: 544

Re: Is this legal?

You can also replace "and" with "AndAlso" (that is more appropriate, in such a situation, actually) Original BASIC used bitwise AND as logical AND, as well, and it didn't make a real difference because it was supposed to work mostly with variable comparisons. But when used with f...
by angros47
Jan 29, 2024 23:14
Forum: Community Discussion
Topic: My_basic interpreter
Replies: 25
Views: 5341

Re: My_basic interpreter

With the latest version, the API has changed a little. Here is the upgraded FreeBasic header: #define MB_CODES #define MB_FUNC_OK 0 #define MB_FUNC_IGNORE 1 #define MB_FUNC_WARNING 2 #define MB_FUNC_ERR 3 #define MB_FUNC_BYE 4 #define MB_FUNC_SUSPEND 5 #define MB_FUNC_END 6 #define MB_LOOP_BREAK 101...
by angros47
Jan 27, 2024 18:26
Forum: Libraries & Headers
Topic: MiniB3d for FreeBasic
Replies: 1089
Views: 310896

Re: MiniB3d for FreeBasic

The main reason CopyEntity doesn't copy the hidden state is that one of the possible uses is "spawning" new entities (it happens, for example, in the particle emitter): in these situation, it's common wanting to keep the original entity hidden, and creating several visible copies of it. Co...
by angros47
Jan 25, 2024 23:02
Forum: Libraries & Headers
Topic: MiniB3d for FreeBasic
Replies: 1089
Views: 310896

Re: MiniB3d for FreeBasic

No, it's the command: declare function EntityMatrix cdecl alias "EntityMatrix" (byval ent as any ptr) as single ptr Forgot to add it to OpenB3D.bi , so consider it an undocumented feature About the duplicated vertices: in a sphere, they are indeed duplicated, and many of them can be remove...
by angros47
Jan 21, 2024 18:54
Forum: Libraries & Headers
Topic: MiniB3d for FreeBasic
Replies: 1089
Views: 310896

Re: MiniB3d for FreeBasic

About the functions TransformEntity and EntityTransform, they weren't mine, they were added by D.J. Peters in his own version https://www.freebasic.net/forum/viewtopic.php?t=27233 My version has the command EntityMatrix, that just returns a pointer to the matrix that is internally used by the entity...
by angros47
Jan 14, 2024 16:40
Forum: Libraries & Headers
Topic: MiniB3d for FreeBasic
Replies: 1089
Views: 310896

Re: MiniB3d for FreeBasic

This example should work a bit better. By the way, if you need a complete physics engine, you would indeed need an external libraries. The functions provided by OpenB3D are mostly for collision detections #include "openb3d.bi" screen 18, 32, , &h10002 Graphics3d 640,480,32,1,1 var came...
by angros47
Jan 13, 2024 16:01
Forum: Libraries & Headers
Topic: MiniB3d for FreeBasic
Replies: 1089
Views: 310896

Re: MiniB3d for FreeBasic

Sorry it didn't help. Let me know if you have more luck with TrueAxis, or Newton, or ODE.
by angros47
Jan 09, 2024 16:31
Forum: Libraries & Headers
Topic: MiniB3d for FreeBasic
Replies: 1089
Views: 310896

Re: MiniB3d for FreeBasic

Because the constraints affects the pivots, not their parent entities. The pivots should not be children of player, they should be independent entities, and then you should use CreateRigidBody to use them as a reference for the player entity (you need four pivots: one for the position, and three for...
by angros47
Jan 09, 2024 6:02
Forum: Libraries & Headers
Topic: MiniB3d for FreeBasic
Replies: 1089
Views: 310896

Re: MiniB3d for FreeBasic

EntityBox is implemented only for the destination entity, not for the moving one. Supported collisions are sphere to sphere, sphere to box and sphere to geometry. You were trying to do box to sphere, that isn't supported
by angros47
Jan 05, 2024 19:49
Forum: Libraries & Headers
Topic: MiniB3d for FreeBasic
Replies: 1089
Views: 310896

Re: MiniB3d for FreeBasic

In your example, then, you might just want to have the spaceship, and the feet as separate entities, both able to collide, and you can put a constraint between them to ensure they would keep always the same distance. You could ensure they point at the same direction either suing some action, or manu...
by angros47
Jan 04, 2024 23:20
Forum: Libraries & Headers
Topic: MiniB3d for FreeBasic
Replies: 1089
Views: 310896

Re: MiniB3d for FreeBasic

You can use EntityX, EntityY and EntityZ to get an entity position. Save those values in some variables, at the next frame read them again, make the difference with old ones, and the three results would be the vector of your speed. In case you just want the speed, square those three values, add them...
by angros47
Jan 02, 2024 18:35
Forum: Libraries & Headers
Topic: MiniB3d for FreeBasic
Replies: 1089
Views: 310896

Re: MiniB3d for FreeBasic

OpenB3D is not based on Newton, or any external physics engine. An external physics engine can be used, but OpenB3D has its own features: one is the collision detection, that comes from the original library MiniB3D, which OpenB3D is based on. The author, Simon Harrison, stated that he was helped by ...
by angros47
Dec 26, 2023 18:10
Forum: Libraries & Headers
Topic: MiniB3d for FreeBasic
Replies: 1089
Views: 310896

Re: MiniB3d for FreeBasic

You can modify the makefile and recompile it, in case you want to change its name Otherwise, you can put the two versions of the library in two different directories, and when you compile and launch your program you set the PATH variable to one directory or another (the library doesn't have to be in...
by angros47
Dec 26, 2023 0:16
Forum: Libraries & Headers
Topic: MiniB3d for FreeBasic
Replies: 1089
Views: 310896

Re: MiniB3d for FreeBasic

Uploaded an updated version with the fix, let me know if it works