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 / updated for DBC ---> LEES CHALLENGE : Fast Quality Shadow Trick

Author
Message
Silverman
13
Years of Service
User Offline
Joined: 18th Jan 2007
Location: France
Posted: 16th Sep 2012 15:30 Edited at: 17th Sep 2012 23:23
hi all,

it is a demonstration of shifting texture (not scrolling).
original post:
http://forum.thegamecreators.com/?m=forum_view&t=63506&b=1

Challenge one:



Now, I will try to convert the challenge number two, it will be more complicated!

EDIT : fixed an error that reversed the texture data + add comment(plain structure)

@+

DirectX 9.0c (February 2010)/ DBClassic v1.20
Fluffy Rabbit
User Banned
Posted: 17th Sep 2012 07:24
@Silverman-

This has stunning potential in DBC. Of course, this first code snippet doesn't really look how it's supposed to with the arbitrarily sized and rotated polygons. I'm looking forward to the outcome!
Silverman
13
Years of Service
User Offline
Joined: 18th Jan 2007
Location: France
Posted: 17th Sep 2012 22:24
Set of functions for people who want to test:


enjoy!

DirectX 9.0c (February 2010)/ DBClassic v1.20
Fluffy Rabbit
User Banned
Posted: 18th Sep 2012 15:34
Wait, what happened to converting the later demos and making real-time shadow support for DBC?
DarkDISCUSSION
9
Years of Service
User Offline
Joined: 6th Jul 2011
Location: Ft Madison, IA
Posted: 19th Sep 2012 05:09
Criticism Ahead...
"Every time I use Goto, I want to puke, and every time i use Gosub, I actually hurl."
It is a good saying to remember. There is no good outcome of using Goto or Gosub in modern BASIC.


Cheers



Fluffy Rabbit
User Banned
Posted: 19th Sep 2012 13:57
@DarkDISCUSSION-

That may be true, but the theory behind the code is what matters in this case. I'm still waiting for Silverman to magically convert the next demo to a DBC-readable format, and so on until we have realtime shadows in DBC.
Libervurto
14
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 19th Sep 2012 22:38
@DD
Quote: "There is no good outcome of using Goto or Gosub in modern BASIC."

I heartily disagree. Gosubs are extremely useful for brevity. There are even situations where goto is ideal: this is usually the result of poor program structure but re-writing large sections of code to achieve the same effect merely to avoid "the dreaded goto" is rather pedantic and inefficient.

In an ideal world one would never use goto, but when we are forced to work with badly designed code a programmer should use every tool at her disposal.

What's your argument against using gosubs? I honestly can't see how they could be detrimental.

Shh... you're pretty.
Fluffy Rabbit
User Banned
Posted: 20th Sep 2012 02:30
Yeah, I use GOSUBs in my functions in DarkBASIC. It's a lot of fun because it saves me time, like how I use GOSUBs in a collision-related function, and GOSUBs in a sound-related function.
Latch
14
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 20th Sep 2012 03:16
Quote: "Every time I use Goto, I want to puke, and every time i use Gosub, I actually hurl. "


Quote: "What's your argument against using gosubs? I honestly can't see how they could be detrimental."


This is a thread about making a shadow effect. Let's not sink into another silly argument about GOTO or GOSUB.

Enjoy your day.
Fluffy Rabbit
User Banned
Posted: 20th Sep 2012 04:04
@Latch-

Agreed 100%. Let's save this thread before it ends up like the rest.

I'm still waiting for Silverman to sprinkle his silvery magic on the DBP code of the next demo to make it work with DBC, because that's one step closer to the greatness that will be realistic lighting and shadows in DBC, at no extra charge from the developers and full compatibility with older versions of Windows.

Login to post a reply

Server time is: 2020-08-05 09:31:36
Your offset time is: 2020-08-05 09:31:36