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 / My fading an object is not fading.....help please

Author
Message
Brazos
21
Years of Service
User Offline
Joined: 7th Apr 2003
Location:
Posted: 24th Jul 2009 04:50 Edited at: 24th Jul 2009 04:53
I thought I knew how to fade an object, that is make it slowly disapear from the screen. This code should work but does not. Does anyone know why? What am I missing??

That1Smart Guy
15
Years of Service
User Offline
Joined: 26th Feb 2009
Location: Somewhere...... yep
Posted: 24th Jul 2009 05:04
if i read the definition for set ambient light correctly then it should

pictionaryjr
15
Years of Service
User Offline
Joined: 12th Mar 2009
Location:
Posted: 24th Jul 2009 05:04 Edited at: 24th Jul 2009 05:14
Are you talking about something like this:



EDIT:

or this:

Brazos
21
Years of Service
User Offline
Joined: 7th Apr 2003
Location:
Posted: 24th Jul 2009 05:05
@ That1Smart Guy
That's what I thought. Have you run the code?
Brazos
21
Years of Service
User Offline
Joined: 7th Apr 2003
Location:
Posted: 24th Jul 2009 05:12
@ pictionaryjr
That is the effect I want, but I want to use fade object command and variations of the ambient light.
pictionaryjr
15
Years of Service
User Offline
Joined: 12th Mar 2009
Location:
Posted: 24th Jul 2009 05:13 Edited at: 24th Jul 2009 05:14
Look at my updated post.

EDIT:
Ambient lights been weird for me ever since I downloaded the update.
Brazos
21
Years of Service
User Offline
Joined: 7th Apr 2003
Location:
Posted: 24th Jul 2009 05:22
@ pictionaryjr

The command 'set object ambient 1,l' is a new one to me. I know I have done this with code in the past without that set object ambient command. This really bugs me.
pictionaryjr
15
Years of Service
User Offline
Joined: 12th Mar 2009
Location:
Posted: 24th Jul 2009 05:29
Like I said, if you updated DB then your probably having the same problems I do since I updated mine. Do some tests with ambient lighting and see if it's the command.
Brazos
21
Years of Service
User Offline
Joined: 7th Apr 2003
Location:
Posted: 24th Jul 2009 05:45 Edited at: 24th Jul 2009 05:56
@ pictionaryjr
I have just been testing ambient lighting and found that to be true. I recently updated Darkbasic. I was using an earlier version of Darkbasic. That code is an old code I found and was probably written on that old version. It worked on that older version. Now that really bugs me. Grrrrrr...

Oh well...Your second code does what I used to do with the old code so I can live with that. Thanks pictionaryjr.
pictionaryjr
15
Years of Service
User Offline
Joined: 12th Mar 2009
Location:
Posted: 24th Jul 2009 06:13
No prob . BTW the update really bothered me too. I had a game that relied on the ambient lighting for it to look good and it stopped working. Luckily I had made an executable and put it on my desktop right before I updated so it still has the lighting like the old DB .
Latch
17
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 24th Jul 2009 12:27
It took me a little while to get used to it as well. Even though old code has to be rewritten incorporating the new commands, the addition of the material commands to lighting is an excellent addition to DBC in my opinion.

If you haven't already, check out this reference that makes an attempt at explaining the new commands:

New commands

And also try and track down my light mapping example that's floating around on this board. I don't know if I would have been able to fade in and out the light mapping intensity without the new object specific material commands ( the set object ambient, set object specular, set obejct emissive, and set object diffuse are called material commands because they effect how light reflects off of an obejct as if it is actually made out of something)

Enjoy your day.
Brazos
21
Years of Service
User Offline
Joined: 7th Apr 2003
Location:
Posted: 24th Jul 2009 22:51
@ Latch

I read your demo on new commands. Thanks for that. I also looked at Kelebrindae's code on matrix like object. When I ran the matrix like object program I ran into an runtime error: "Program ran into a function declaration at line 30". The same thing happened when I ran your program "inc-mbmatrix". What could have caused this?
Latch
17
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 24th Jul 2009 23:04
inc-mbmatrix

is a library of functions. It's meant to be #INCLUDED in another program. It can't be run by itself. Look up the #INCLUDE command in the DBC help.

Enjoy your day.
Brazos
21
Years of Service
User Offline
Joined: 7th Apr 2003
Location:
Posted: 24th Jul 2009 23:08
Oh ok. Latch, have you ever done a tutorial on memblocks? If not could you? Would you? You should you know.
pictionaryjr
15
Years of Service
User Offline
Joined: 12th Mar 2009
Location:
Posted: 25th Jul 2009 00:43
I agree. I'm extremely interested in mesh memblocks, but can't seem to get a grasp on them.
That1Smart Guy
15
Years of Service
User Offline
Joined: 26th Feb 2009
Location: Somewhere...... yep
Posted: 25th Jul 2009 01:16
memblocks (particularly mesh memblocks) are fascinating and complex devices that if properly used, can accomplish things no other code can

i may write a tutorial on them sometime, we'll see

Login to post a reply

Server time is: 2024-05-20 08:52:09
Your offset time is: 2024-05-20 08:52:09