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 / Atmosphere and Effects

Author
Message
pictionaryjr
15
Years of Service
User Offline
Joined: 12th Mar 2009
Location:
Posted: 26th May 2010 04:38
I thought about the idea for this thread, because the game I'm working on right now is the first game I've almost completed and I had to venture out on my own to discover how to create some of the most essential basic atmospheric and particle effects.

The general use of this thread is to post examples and source code of effects you have implemented in your game. Any effects like skies, fog, fading objects, lighting effects, explosions, and scenery like grass and trees(how you place them). Basically anything that you would see in a game besides the basic gameplay and models.

Dark Dragon
16
Years of Service
User Offline
Joined: 22nd Jun 2007
Location: In the ring, Kickin\' *donkeybutt*.
Posted: 27th May 2010 03:17
Do the effects we post have to be generated by DB or can they be things like sprites??

pictionaryjr
15
Years of Service
User Offline
Joined: 12th Mar 2009
Location:
Posted: 27th May 2010 05:14
Either. Anything you can use to show a newcomer how a certain effect might work, so if they ever need to know how to do it, they can check here and see if its done. Like one effect I want to do that I'm struggling with is making an object fade to black before i take it out of the game. just deleting objects makes it really jumpy.

Latch
17
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 27th May 2010 07:16
@pictionaryjr
Quote: "Like one effect I want to do that I'm struggling with is making an object fade to black before i take it out of the game. just deleting objects makes it really jumpy."

Do you actually mean fade it to a black color or do you mean make it disappear slowly? I'll assume you mean make it disappear slowly.

There is a command FADE OBJECT that is helpful to this end. What it does is actually emphasize or deemphasize the normals based on a percentage. FADE OBJECT 1,100 means set object 1's normals to 100% of their value. FADE OBJECT 1,50 means set object 1's normals to 50% of their value.

Changing the intensity of the normals changes how brightly light is reflected from the object. This ties directly to the objects AMBIENT color level. The less bright the ambient light, the more dramatic the fade effect. When you combine fade and ambient on a ghosted object, you can make it disappear or reappear:



Enjoy your day.
Libervurto
17
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 11th Jun 2010 02:00
Nice, I gave it an old school arcade look


Latch
17
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 12th Jun 2010 01:25
I like it!

Enjoy your day.

Login to post a reply

Server time is: 2024-04-20 06:16:41
Your offset time is: 2024-04-20 06:16:41