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 / transparency once again...

Author
Message
highwind
10
Years of Service
User Offline
Joined: 4th Jun 2008
Location: france
Posted: 5th Mar 2018 08:08
Hi,
new laptop new problems...

I have encountered transparencies issues again on a new laptop runing windows 10 under microsoft HD drivers and/or nvidia drivers.

I have found a solution (thanks to an old post from latch again : )

using twice the same object with the first one having a "ghost" flag and the second one having a "ghost,1" flag
was OK for the previous problem under HD4000 drivers but broke under later direct x implementation under windows 10

the trick I found now :

for the second object, the one with the "ghost,1" flag I use a white background instead of a black background.

I also had to write this line on the first line of the program as windows 10 refuses 640,480,16

set display mode 800,600,32

I hope this can help someone although DBC's forum is almost dead : (


you can test my DBC game SHOOTER 1.0 which is attached under this post
feel free to visit my web site

Attachments

Login to view attachments
Latch
12
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 7th Mar 2018 15:34 Edited at: 7th Mar 2018 15:57
Nice to see someone still using DarkBasic classic.

64-bit platforms generally won't run 16 bit software without some jumping through hoops so I imagine that applies to 16 bit graphic modes as well.

Also, I went back to the old post (that I think you are referencing) and looked through Silverman's function for adding alpha:



I hadn't gone through it before but looking at it, it's a good general function for adding the transparency.

I might change it to add material settings in the function call itself so I could pass lighting colors and intensity

function add_alpha_to_object(obj,alpha,maindiffuse,mainambient,transdiffuse,transambient)

Also I would avoid gluing the objects together and just position them simulataneously with the same code. I remember a lot of glitches with gluing objects and also not being able to return the true position of a glued object.



Enjoy your day.

Login to post a reply

Server time is: 2018-10-17 10:51:55
Your offset time is: 2018-10-17 10:51:55