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 / Special effects

Author
Message
nruser
17
Years of Service
User Offline
Joined: 22nd Dec 2007
Location: Serbia
Posted: 20th Jul 2008 17:32
Is it possible to make some special effects like, reflection, water effect, or some thing like shaders in DBC?

P3 CPU 500 Mhz, 128 MB RAM, 16 MB VRAM, WinXP.
Almost the best configuration for game development.
Jmahmood
18
Years of Service
User Offline
Joined: 3rd Apr 2007
Location: not sure
Posted: 20th Jul 2008 18:39
Nope...you have to use dbpro for these.
BN2 Productions
21
Years of Service
User Offline
Joined: 22nd Jan 2004
Location:
Posted: 20th Jul 2008 23:05
I am sure it could be done, but it would be very complicated, resource intensive, and impractical for anything but a still image.

Not sure, but just my assumption.

Ever notice how in Microsoft word, the word "microsoft" is auto corrected to be "Microsoft" but "macintosh" just gets the dumb red underline?
Robert The Robot
18
Years of Service
User Offline
Joined: 8th Jan 2007
Location: Fireball XL5
Posted: 21st Jul 2008 19:47
I think you could create a perfect "Mirror" reflection in DBC - what you'd have to do is finish setting the scene, temporarily reposition your camera to where the mirror is, grab an image of what the camera/mirror was seeing and then use that image as the texture for your "Mirror" object.

I'm sure I've seen this mentioned before (maybe with an example?) but I can't find the link. It was talking about a way of creating security cameras, so you could view other areas of your 3d world on little television screens - the principle here's the same.

If I admit that I'm lying, am I telling the truth?
Latch
18
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 21st Jul 2008 23:24
Higher level direct x functionality is out of reach for DBC for the most part (of course if you're a pro at the direct x sdk and c/c++ you could work something out). Many, if not most, effects can be "faked" in DBC with clever use of lighting, textures, ghosting, and objects.

Check out these examples:

http://www.thegamecreators.com/?m=codebase_view&i=e7173d8c19f8b004caa2f633b4735b19

http://www.thegamecreators.com/?m=codebase_view&i=33a4480ab6d1e86ec15ab767bab43a91

The mirror thing is possible - if you go through the DBC challenges you'll find an example I posted - but for any practical use in a game, switching the camera back and forth while capturing an image ends up jittery and/or kills the frame rate. Part of the problem is the get image command. It's just not fast enough. There's a few tricks to get it to look ok... but it's still not great. It's something to try and play with though.

Enjoy your day.
sinisterstuf
18
Years of Service
User Offline
Joined: 28th Mar 2007
Location: Namibia, Southern Africa
Posted: 10th Aug 2008 13:43
Doesn't dbc have the "set camera to image" command or whatever it's called. If you have a second camera where your mirror mesh is then the command let's you set the output of the camera to the texture of the mirror.

over and out
TheComet
17
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 10th Aug 2008 15:10 Edited at: 10th Aug 2008 15:10
That`s a DBP Command, because DBC only has one camera...

Suicide is away of telling God, You can’t fire me I quit !!!!!
Bluestar4
19
Years of Service
User Offline
Joined: 19th Dec 2005
Location: USA
sinisterstuf
18
Years of Service
User Offline
Joined: 28th Mar 2007
Location: Namibia, Southern Africa
Posted: 16th Aug 2008 00:17
Oh, sory

CYMRU AM BYTH!

Login to post a reply

Server time is: 2025-06-07 06:40:00
Your offset time is: 2025-06-07 06:40:00