3D and GLB

Previous topic - Next topic

SnooPI

#15
Yes, and it could be interesting for the 3D game (or several because I like your idea of ​​making a Pong and a Frogger in 3D  :)).

-EDIT-
In addition, it will help to better understand how to use this very good library.

Qedo

to be "cross compatible" you must don't use X_SETSHADER (https://www.glbasic.com/forum/index.php?topic=8211.msg69409#msg69409) for OpenglES (Android). for the rest it seems all right. Then you will need to test on Android and Html5 and there I see it hard

SnooPI

You are right.
This is an important detail.

For Android, I would not do the tests myself because I am no longer developing for this platform at the moment.

dreamerman

I'm not expert in 3d are of GLB, I mostly use it with 2d, but basic 3d in few situations are useful, if I would need to use advanced 3d and need to use Inline or something to achieve that it would be just more straight to use other tool that has needed features.

For tutorials You should use only pure GLB code (at least at start), to show all features and just to explain all concepts, for beginners using inline may be confusing in my opinion. But as addition in more advanced tutorials will give wiser possibilities.

eh.. I forgot that X_SetShader doesn't work on Android :>
Check my source code editor for GLBasic - link Update: 20.04.2020

Hemlos

#19
3d sound can easily be emulated.
As any 3d sound system uses vector comparisons, GLB can too.
Using vector comparisons, you can change the volume for forward-rear, and use the balance left-right.
PS. don't forget the distance dimension heh.

PPS.
I'm a hardcore Planetside 2 player, i appreciate great 3d sound performance and depend on it to get my points. And as a programmer, i can hear and see the flaws in the "true 3d sound" environment.

What most people consider amazing 3d sound, can be improved upon GREATLY in GLB using TYPE classes.
One major improvement would be to have sound calculated and changed according to objects and structures in the 3d environment. .......Like when you go into a place that might be sealed or block, so that sound isnt calculated as it it were produced 2 meters away, when it should be muffled or NULL.

IMO "true 3d sound" is a myth, and an over glorified lib. And with the features already implemented into GLB, you can easily create a small lib, for a sound entity that will sound far better than any so called "true 3d sound" environment.


Bing ChatGpt is pretty smart :O

SnooPI

Not really Hemlos.
You can make a system close to a real 3d sound system but it will not be complete.
To simulate a real 3D sound environment, a function like MUSICVOLUME is missing.
A function that allows you to change the sound in real time is essential (SOUNDVOLUME?)

For example you have a radio in a room, the sound of this radio must increase or decrease in real time depending on whether the player is approaching or not.

Without a SOUNDVOLUME function, you will be able to give the illusion of a real 3D sound environment with short sounds, but if a sound is long, there will be a problem.

Widget101

I'd definitely be interested in some 3d tutorials. It's the old retro style 3d that interests me most so basic graphics and shading is no problem providing the speed is there.

One of the projects on my list is to remake the old Zarch / Virus game that David Braben wrote for the Archimedes. I'd made a start on this in DarkBasic before I moved across to GLBasic. Plan has always been able to see if I could get it up and running in GLB.


bigsofty

Quote from: Widget101 on 2020-Oct-17
I'd definitely be interested in some 3d tutorials. It's the old retro style 3d that interests me most so basic graphics and shading is no problem providing the speed is there.

One of the projects on my list is to remake the old Zarch / Virus game that David Braben wrote for the Archimedes. I'd made a start on this in DarkBasic before I moved across to GLBasic. Plan has always been able to see if I could get it up and running in GLB.



Great choice for a remake, I have many fond memories playing Virus on my ST.  :happy:
Cheers,

Ian.

"It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration."
(E. W. Dijkstra)

Hemlos

Quote from: SnooPI on 2020-Aug-24
Not really Hemlos.
You can make a system close to a real 3d sound system but it will not be complete.
To simulate a real 3D sound environment, a function like MUSICVOLUME is missing.
A function that allows you to change the sound in real time is essential (SOUNDVOLUME?)

For example you have a radio in a room, the sound of this radio must increase or decrease in real time depending on whether the player is approaching or not.

Without a SOUNDVOLUME function, you will be able to give the illusion of a real 3D sound environment with short sounds, but if a sound is long, there will be a problem.

Yes, realtime panning and volume is important for precise audio positioning for situations like you described.
Using 2.0 audio channels, Dolby software reduces volume for sound in rear, we can emulate this easily.
It would sound even better if we can access a "fade" for sounds, for using 4.0 channel speakers.
Bing ChatGpt is pretty smart :O

Hemlos

Quote from: Widget101 on 2020-Oct-17
I'd definitely be interested in some 3d tutorials. It's the old retro style 3d that interests me most so basic graphics and shading is no problem providing the speed is there.

GLBasic 3d is based on opengl.

There are many snippets to learn from on this board in the 3d section
Feel free to drop questions there, many of us are watching the boards and are able to help.
Bing ChatGpt is pretty smart :O