Duke4.net Forums: CON-based Polymer lights - Duke4.net Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

CON-based Polymer lights

User is offline   Fox 

  • Fraka kaka kaka kaka-kow!

#1

Hard-coding is evil.

Because I don't like the Polymer lights built-in the executable, and also think they are ugly, I created my own friendly CON-based lights.

Because tsprite is unavaiable for Sector Effectors, certain features could not be implemented:
- Shrinker crystal ammo glowing;
- proper movement interpolation;
- disable lights at distance based on camera position;

Attached File(s)



This post has been edited by Fox: 07 June 2013 - 10:09 PM

6

User is offline   Plagman 

  • Former VP of Media Operations

#2

The so-called hard-coded lights are clearly placeholders and that's why there's a mechanism in place to disable them if you want to put something better in their place. It's not 'evil' to have something that you can use when there wouldn't otherwise be anything; if you don't want it, just disable them.

Now, for the other points: is there really no way to manipulate lights with display granularity due to the lack of SE tpsrs? If so, that sounds like a genuine problem that should be addressed; I'm not sure how to do that on top of the existing SE interface, but maybe someone can come up with a good idea.
1

User is offline   Fox 

  • Fraka kaka kaka kaka-kow!

#3

The problem is that a SE has one of the invisible cstat flags (-32768) so it is not rendered, and I failed to find out a workaround for it. I can't change the cstat of a SE, but even if I could I feel like it would be a dangerous move.

Perhaps the light could be rendered in a different instance, similar to a shadow or mirrored sprite?

This post has been edited by Fox: 12 May 2013 - 06:33 PM

0

User is offline   Micky C 

  • Honored Donor

#4

Wasn't the original plan to add direct access to lights via con? Well I suppose Lua now anyway.
0

User is offline   blizzart 

#5

Does this work together with High Treason“s CONfetti (http://forums.duke4....r-release-v111/)?
0

User is offline   Fox 

  • Fraka kaka kaka kaka-kow!

#6

You may want to test it on your own. I suppose they should work together since my code is only meant to affect the lights emitted by regular sprites.
0

User is offline   kona 

#7

Thanks for your sharing ;)
0

User is offline   Plagman 

  • Former VP of Media Operations

#8

Not sure why this ended up locked, but the above looks like a spambot.
0

User is offline   Diaz 

#9

View PostFox, on 12 May 2013 - 06:33 PM, said:

The problem is that a SE has one of the invisible cstat flags (-32768) so it is not rendered, and I failed to find out a workaround for it. I can't change the cstat of a SE, but even if I could I feel like it would be a dangerous move.

Perhaps the light could be rendered in a different instance, similar to a shadow or mirrored sprite?


You can change it... I do change it to make spotlights not cast shadows when distance > 16k.

I haven't noticed any side effects whatsoever, but yes it would be safer to do it via tspr I guess.
0

User is offline   Night Wolf 

#10

Any chance of getting the fire to flicker? Seems to be glowing.
0

User is offline   Fox 

  • Fraka kaka kaka kaka-kow!

#11

I have updated it. I have added a flickering effect for the fire.

If you think the fire flickering is too smooth compared to Eduke32 hard-coded lights, you can decrease the value of XLIGHTPULSE here:
  case BURNING
  case FIRE
  case BURNING2
  case FIRE2
    setvar XLIGHTRANGE 4096
    setvar XLIGHTSCALE YES
    setvar XLIGHTPULSE 4
    setvar XLIGHTRAND YES
  break
  case FIREBARREL
  case FIREVASE
    setvar XLIGHTRANGE 2048
    setvar XLIGHTSCALE YES
    setvar XLIGHTPULSE 4
    setvar XLIGHTRAND YES
  break

2

User is offline   Night Wolf 

#12

You should use this for the red, it's the exact colour of (2567) Laserline.

define LIGHT_COLOR_RED_R        216
define LIGHT_COLOR_RED_G        52
define LIGHT_COLOR_RED_B        20

0

User is offline   Fox 

  • Fraka kaka kaka kaka-kow!

#13

The values for RGB and range are more placeholders. I didn't cared much about them.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic


All copyrights and trademarks not owned by Voidpoint, LLC are the sole property of their respective owners. Play Ion Fury! ;) © Voidpoint, LLC

Enter your sign in name and password


Sign in options