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 / Making the black color invisible?

Author
Message
Lucifer
19
Years of Service
User Offline
Joined: 26th Dec 2005
Location:
Posted: 16th Jul 2006 19:37
How can i make the color 0,0,0 (black) invisible?

like if i do this:
and it is a tree.. and i am going to print it on a floor, and the background of the picture is black, but i dont want to see the black color only the tree.. i am doing a game like daggerfall (google it ) and i need to know how this is posible..

Just google pallmanni and get the history of me!

http://whatishl.ytmnd.com/ so friggin funny!
Zotoaster
20
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 16th Jul 2006 20:54
Is it in 2D or 3D?

Lucifer
19
Years of Service
User Offline
Joined: 26th Dec 2005
Location:
Posted: 16th Jul 2006 21:13
well, it's a 3d world. but all the static entity's like books, trees, and stuff is 2d images..

Just google pallmanni and get the history of me!

http://whatishl.ytmnd.com/ so friggin funny!
Lucifer
19
Years of Service
User Offline
Joined: 26th Dec 2005
Location:
Posted: 16th Jul 2006 21:43
I'm trying to make a game like daggerfall

Just google pallmanni and get the history of me!

http://whatishl.ytmnd.com/ so friggin funny!
Sven B
20
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 16th Jul 2006 21:54 Edited at: 16th Jul 2006 21:55
sprites
Sprites hide the black color automatically. You can change it by using the command set sprite spritenr, backsave, transparency

images
To enable transparency, simply add a "1" at the end of paste image (eg. paste image 1, 0, 0, 1)

objects
To hide an object's black color (when textured), we use the command set object objnr, wire, transparent, cull. Change the parameter transparent to 0 to hide all black colors.

It's the programmer's life:
Have a problem, solve the problem, and have a new problem to solve.
Lucifer
19
Years of Service
User Offline
Joined: 26th Dec 2005
Location:
Posted: 16th Jul 2006 22:07
hey Sven B, sprites are just the things i need can you show me a sample code maybe?

Just google pallmanni and get the history of me!

http://whatishl.ytmnd.com/ so friggin funny!
Sven B
20
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 17th Jul 2006 13:14 Edited at: 17th Jul 2006 13:16
Sure


use up/down arrow keys to toggle between transparency.

It's the programmer's life:
Have a problem, solve the problem, and have a new problem to solve.
Lucifer
19
Years of Service
User Offline
Joined: 26th Dec 2005
Location:
Posted: 17th Jul 2006 17:51
Thanks i also found out that using plains is also good thanks for the help

Just google pallmanni and get the history of me!

http://whatishl.ytmnd.com/ so friggin funny!
Lucifer
19
Years of Service
User Offline
Joined: 26th Dec 2005
Location:
Posted: 17th Jul 2006 22:16
How can i lock an object on to the screen like a sword. here is the sword code i use
but i cant use lock object on because then the object disappears and i dont know what to do.. can anyone help me?

Just google pallmanni and get the history of me!

http://whatishl.ytmnd.com/ so friggin funny!
Sven B
20
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 18th Jul 2006 00:06
Remember that locking the object will make "position object" relative to the camera.

This means that the X will position the object left/right, the Y position will move the object up/down on the screen and the Z position will move towards/further off the camera.
a X position of 0 and an Y position of 0 will be the center of the screen.

Make sure the X and Y values are not too big, and the Z value is bigger than the minimum camera range.

It's the programmer's life:
Have a problem, solve the problem, and have a new problem to solve.

Login to post a reply

Server time is: 2025-05-25 08:43:24
Your offset time is: 2025-05-25 08:43:24