2 registered members (AndrewAMD, Quad),
843
guests, and 1
spider. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: The Disenfranchised...
[Re: Error014]
#13918
05/26/07 15:46
05/26/07 15:46
|
Joined: Aug 2000
Posts: 7,490
Orange Brat
OP
Senior Expert
|
OP
Senior Expert
Joined: Aug 2000
Posts: 7,490
|
It'll probably be a development blog. I have two URLs..one for orangebrat and one for thedisenfranchised. The blog will go to the brat site, the other one will be the actual game(s) site.
I haven't messed around with the shadow code so it only works with one source. For those who are scratching their heads, with the help of Error, my stencil shadows alpha is dependent on the distance from dynamic lights (and is non-shaders based). So, if I'm standing next to a light, the shadow will be dark, if I start walking away from it it will fade and eventually fade out. However, it only works with one light, at the moment, but Error provided some pseudo-code that might make it work with the closest light. The downside of it is is that every shadow will fade in a level, so it has limited use.
My User Contributions master list - my initial post links are down but scroll down page to find list to active links
|
|
|
Re: The Disenfranchised...
[Re: Orange Brat]
#13920
05/27/07 00:46
05/27/07 00:46
|
Joined: Oct 2005
Posts: 196
ambe
Member
|
Member
Joined: Oct 2005
Posts: 196
|
looks nice -- and that works realtime ? no lag?
- code monkey
|
|
|
Re: The Disenfranchised...
[Re: ambe]
#13921
05/27/07 01:16
05/27/07 01:16
|
Joined: Aug 2000
Posts: 7,490
Orange Brat
OP
Senior Expert
|
OP
Senior Expert
Joined: Aug 2000
Posts: 7,490
|
There's no lag on my end but I have an advanced card. The discussion on how to use this is here including the code: http://www.coniserver.net/ubbthreads/sho...true#Post749477The action in that post is just for the fading code. The actual light code is not there, but that's basic enough. Here's my dynamic light script. It perhaps contains a lot of crap not needed by everyone, but I use all of it for one reason or another. Code:
// uses: localKillSwitch, lightBroken, castToggle, beginOn, startDelay, distToggle, alwaysOn, minDist, maxDist // uses: randomColorRange, redColor, blink, randBlink, shortDelay, longDelay, range, rangeModifier, lightningOn action light2 { while(!player) { wait(1); } var tempShortDelay; var tempLongDelay; my.passable = on; if(my.castToggle == on) { my.cast = on; } else { my.cast = off; } if(my.beginOn == on) //light object is turned on { if(my.startDelay > 0) //delay before turning on { wait(-my.startDelay); } my.invisible = off; } else { my.invisible = on; //light object begins turned off } my.skill11 = 100 * pow(my.minDist, 4) / (pow(my.maxDist, 2) - pow(my.minDist, 2)) + 100 * pow(my.minDist, 2); my.skill12 = -100 * pow(my.minDist, 2) /( pow(my.maxDist, 2) - pow(my.minDist, 2)); while(1) { if(globalKillSwitch == 0 && my.localKillSwitch == 0) { if(my.beginOn == on) //light object is turned on { if(-my.startDelay > 0) //delay before turning on { wait(my.startDelay); } my.invisible = off; } else { my.invisible = on; //light object begins turned off } if((vec_dist(player.x, my.x) < my.distToggle && my.alwaysOn == off) || my.alwaysOn == on) //light remains on while player is closer than my.skill3 { if(my.randomColorRange == on) //random color and range { my.lightrange = max(random(my.range), my.range/my.rangeModifier); //make sure rangeModifier > 0 if(my.lightrange == 0) { my.lightrange = 1; } my.red = int(random(my.redColor)); if(my.red == 0) { my.red = 1; } } else //constant color and range { my.lightrange = my.range; my.red = my.redColor; } my.green = my.red; my.blue = my.red; if(my.blink == on) //blink on { if(my.randBlink == on) //random blinking { tempShortDelay = random(my.shortDelay); if(tempShortDelay == 0) { tempShortDelay = 0.1; } wait(-tempShortDelay); //short delay my.lightrange = 0; if(my.beginOn == on) //turn object off { my.invisible = on; } tempLongDelay = random(my.longDelay); if(tempLongDelay == 0) { tempLongDelay = 0.1; } wait(-(tempShortDelay + tempLongDelay)); //long delay my.invisible = off; //turn object back on } else //constant blinking { wait(-my.shortDelay); //short delay my.lightrange = 0; if(my.beginOn == on) { my.invisible = on; //turn object off } wait(-my.longDelay); //long delay //my.startDelay = 0; my.invisible = off; //turn object back on } } if(my.lightningOn == on && dynBool == 1) { my.lightrange = 0; } mat_shadow.alpha = my.skill11 / (clamp(vec_dist(my.x,player.x), my.minDist, my.maxDist) * clamp(vec_dist(my.x, player.x),my.minDist,my.maxDist)) + my.skill12; } else //out of range...light off { my.lightrange = 0; my.invisible = on; } } else { my.lightrange = 0; if(my.lightBroken == on) { //ent_morph(my, "whatever"); //break; } else { my.invisible = on; } } wait(1); } }
My User Contributions master list - my initial post links are down but scroll down page to find list to active links
|
|
|
Re: The Disenfranchised...
[Re: Orange Brat]
#13922
06/02/07 08:44
06/02/07 08:44
|
Joined: Aug 2000
Posts: 7,490
Orange Brat
OP
Senior Expert
|
OP
Senior Expert
Joined: Aug 2000
Posts: 7,490
|
EDIT: Sorry about the code above screwing up the page formatting. I hate that. This isn't related to the game, but it shows that there are other Noir inspired games in the works. This one is called The Late Call and is being made with the Unity Engine. I just signed up for the beta, so I hope I get chosen. http://www.bydesigngames.com/tlc/index.htmlThe screens are from an alpha build, but the new "3d" screenshot is new and interactive. Kind of an interesting way to display a screenshot. My game and their game are apples and oranges (although my game used to be like this one in regards to gameplay), but I present it for comparison's sake. There are lots of other Noir games in development (L.A. Noire which will be published by Rockstar, Sadness on the Wii are a couple of high profile examples, and of course there's Grim Fandango, Discworld Noir, and the Max Payne games if you want to look back at high profile Noir games from history).
My User Contributions master list - my initial post links are down but scroll down page to find list to active links
|
|
|
Re: The Disenfranchised...
[Re: Orange Brat]
#13923
06/02/07 14:54
06/02/07 14:54
|
Joined: Feb 2006
Posts: 2,185
mpdeveloper_B
Expert
|
Expert
Joined: Feb 2006
Posts: 2,185
|
very nice shadow effect, i still want to play this game OB .... hurry up and finish it ok? just kidding
- aka Manslayer101
|
|
|
Re: The Disenfranchised...
[Re: Orange Brat]
#13925
06/03/07 09:56
06/03/07 09:56
|
Joined: Jul 2004
Posts: 4,206 Innsbruck, Austria
sPlKe
Expert
|
Expert
Joined: Jul 2004
Posts: 4,206
Innsbruck, Austria
|
grim fandagiro it is? anyway, as you already know, i like your game. its sad that you dont give more shots and info on it. but the style is great... i wont say anything more because you know how i feel
|
|
|
|