Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / [SOLVED] DBC 1.20 matrix ambient light?

Author
Message
Yarbles2018
6
Years of Service
User Offline
Joined: 16th Jan 2018
Location:
Posted: 20th Dec 2018 07:15
Hey guys,
I've dusted off a very old project and am trying to get it running in DBC v1.20.

Everything seems to be working the same as with v1.13 except for some lighting and texture glitches.

I've been able to set ambient light on a per object basis, but I'm unable to see any of the shading on my matrix that should be determined by the SET MATRIX NORMAL command.
I'm unable to set ambient light on the matrix to anything other than full RBG(255,255,255) it seems, so no shading visible.

Any ideas?

Thanks in advance.

The author of this post has marked a post as an answer.

Go to answer

Latch
17
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 20th Dec 2018 22:24
Howdy,

Not at a computer with DBC right now but dug up a couple of things that may be helpful.

The first is a demo I did for a DBC challenge that demonstrates a flexible snake moving over an undulating matrix. The Matrix normals are constantly recalculated so it should give you an idea how to manage your "shadows" on a matrix. I modified an example for matrix normals from Lee Bamber that calculates them more emphasized based on the matrix size. I included the demo for your review because of the changing matrix:





The second example is a thread that includes Matrix commands that create an object from memblocks. I created a DLL to speed up the creation of object type matrices based on DBC code from a user named Kelebrindae. With these matrices, you can actually use the object material commands on the matrix.

https://forum.thegamecreators.com/thread/197592
Enjoy your day.
Yarbles2018
6
Years of Service
User Offline
Joined: 16th Jan 2018
Location:
Posted: 27th Dec 2018 21:05
This post has been marked by the post author as the answer.
Thank you Latch!

I figured out that I can use COLOR AMBIENT LIGHT to achieve the effect I had previously.

I'm messing around with the new lighting commands now, it's gonna take a bit of time and tweaking and afterwards I'm going to release it on this forum. I promise you'll like it!
I'm impressed with the way I'm able to make water look now with the SET OBJECT SPECULAR command, I had similar commands in DPB, but for some reason I didn't play with them as much as with the shaders that were available at the time.

Something about DBC that feels well so "classic" to me, even though it's a lot more clunky I'm enjoying revisiting it more than DBP at this time.
Kevin Picone
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Australia
Posted: 2nd Jan 2019 14:58
Now there's an old handle ... Howdy Yarbles

PlayBASIC To HTML5/WEB - Convert PlayBASIC To Machine Code

Login to post a reply

Server time is: 2024-03-28 20:03:06
Your offset time is: 2024-03-28 20:03:06