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 Professional Discussion / Ghost Object (mode 3)

Author
Message
Indicium
18
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 10th Apr 2011 14:54
Hello, I'm making a space RTS and i'm trying to make a nebula effect using ghosted plains. I've found mode 3 looks good, with the exception of having black borders around the plain. I've set the plain to transparent, the texture is png and has transparency( no black borders when not ghosted ).

Does anybody have a fix for this? It's worth mentioning that I'm doing this in GDK, but the guys on this forum seem to know more about the actual engine, where the guys on the GDK forum seem more language oriented. Or maybe that's just me...

Image attached. Thanks!

The Slayer
Forum Vice President
16
Years of Service
User Offline
Joined: 9th Nov 2009
Playing: (Hide and) Seek and Destroy on my guitar!
Posted: 10th Apr 2011 15:10
Why not simply make the nebula image semi-transparent in your paint program so that it loox ghosted in your game? This way, you dont need to set transparency or set the object to ghosted by code.
Try with the image attached.

Hope this helped?

Cheers

SLAYER RULES! YEAH, MAN!!
Indicium
18
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 10th Apr 2011 15:13
Thanks for the reply, The Slayer. I have already done that, but by applying ghost mode, it makes the plains blend together, so the parts the overlap look brighter

Thanks for helping.

P.S, did you make that image yourself?

HowDo
23
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 10th Apr 2011 16:30
try mode 5 and see if that works.

Dark Physics makes any hot drink go cold.
Indicium
18
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 10th Apr 2011 16:42
Mode 5 just diffuses the colour of anything behind it :/ I can't see the actual nebula anymore, just nebula coloured stars.

Thanks

The Slayer
Forum Vice President
16
Years of Service
User Offline
Joined: 9th Nov 2009
Playing: (Hide and) Seek and Destroy on my guitar!
Posted: 10th Apr 2011 17:06
Quote: "Thanks for the reply, The Slayer. I have already done that, but by applying ghost mode, it makes the plains blend together, so the parts the overlap look brighter"

No problem. However, what I was suggesting earlier should work for sprites, but using planes is another matter.

Quote: "P.S, did you make that image yourself?"

Yep, I did. You like?

Try this piece of code (and the image attached) instead. It does what you are looking for, I think.



Cheers

SLAYER RULES! YEAH, MAN!!
Indicium
18
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 10th Apr 2011 18:39
Quote: "Yep, I did. You like? "


Yes, it's very good.

Woah, I had the exact same code ( GDK equiv of course ), and your image works perfectly! Could you explain why yours works and mine does not? Thanks

The Slayer
Forum Vice President
16
Years of Service
User Offline
Joined: 9th Nov 2009
Playing: (Hide and) Seek and Destroy on my guitar!
Posted: 10th Apr 2011 19:11
Quote: "Woah, I had the exact same code ( GDK equiv of course ), and your image works perfectly! Could you explain why yours works and mine does not?"

Hum, it's hard to tell without seeing your code and/or image.

I'm glad it helped, though.

SLAYER RULES! YEAH, MAN!!
Indicium
18
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 10th Apr 2011 19:22
Quote: "Hum, it's hard to tell without seeing your code and/or image. "


Doh, haha, nevermind anyways. It seems that my alpha channel was the cause of the issue. Crazy world.

Thanks!

Login to post a reply

Server time is: 2026-07-17 14:00:19
Your offset time is: 2026-07-17 14:00:19