Duke4.net Forums: Flashlight Effect - Duke4.net Forums

Jump to content

  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

Flashlight Effect  "It works"

User is offline   Micky C 

  • Honored Donor

#31

View PostMblackwell, on 12 November 2012 - 06:24 PM, said:

Potentially because the light always exists. It is never removed from the map, it just is given a very small range.


I'm sure there was a command to tell the SE to completely shut off its light, doesn't DukePlus use it as an optimisation to reduce the number of active lights to increase framerate?
0

User is offline   Plagman 

  • Former VP of Media Operations

#32

At the very least set the bit to not project a shadow while the light is small.
0

User is offline   Plagman 

  • Former VP of Media Operations

#33

View PostHelixhorned, on 12 November 2012 - 11:30 AM, said:

This is because Polymer uses actor[].picnum (known as "htpicnum" in CON), which is set to the spawning actor's tile on "espawn", in this case APLAYER. (Plagman: is this intended?)


What is? Yes, the picnum is used for the lightmap.
0

User is offline   Helixhorned 

  • EDuke32 Developer

#34

View PostPlagman, on 12 November 2012 - 07:24 PM, said:

What is? Yes, the picnum is used for the lightmap.

That it's actor[].picnum instead of sprite[].picnum. According to the wiki, the former is

Quote

The picnum of the projectile that is hitting the actor.

In the code path that A_Spawn() takes from CON's *spawn commands, it's set to the picnum of the spawning actor, hence the previous glitches.
0

User is offline   Helixhorned 

  • EDuke32 Developer

#35

View PostHelixhorned, on 13 November 2012 - 01:52 AM, said:

That it's actor[].picnum instead of sprite[].picnum. According to the wiki, the former is

In the code path that A_Spawn() takes from CON's *spawn commands, it's set to the picnum of the spawning actor, hence the previous glitches.


Gee, I'll answer my own question... I guess actor[].picnum was chosen because sprite[].picnum is taken when it's used from SEs? After changing to STAT_LIGHT, sprite[].picnum becomes irrelevant, the original FLASHLIGHT2.CON actually spawned a brown brick (tile 0 instead of 1). Anyway, as long as it's set in stone, it's fine, I guess.
0

User is offline   Micky C 

  • Honored Donor

#36

I added a random light map I found on the internet, gave the z-vel a value of 225 to give it a yellow tinge, made the shade 20 to make it wider, and this is what I came up with. It's a bit darker than I'd like but definitely more realistic than an ordinary light.

Edit: Eddy should add this to Slender's Woods Posted Image

Posted Image

Attached thumbnail(s)

  • Attached Image: 9003.png


This post has been edited by Micky C: 13 November 2012 - 02:36 AM

1

User is offline   zykov eddy 

#37

View PostMicky C, on 13 November 2012 - 02:35 AM, said:

Edit: Eddy should add this to Slender's Woods Posted Image


I was thinking about it, but sadly, the map won't even load in polymer :P
0

User is offline   Diaz 

#38

Fusion Redux already had a flashlight and it's being used on my remake too - but the graphic I was using for the projection pretty much sucked (a lens flare from Unreal). It looks much better with the one Micky C provided. I hope you don't mind me using it :P

These ones from Doom 3 also look quite good:

Attached thumbnail(s)

  • Attached Image: flashlight.png
  • Attached Image: flashlight5.png


This post has been edited by Diaz: 13 November 2012 - 09:32 AM

0

User is offline   Mark 

#39

I have been continuing to try and find out what is causing the slowdowns and freezes with the fashlight in my Graveyard mod. It was weird that I could take a single step from one sector into another and watch the framerate cut in half. In some of the large and medium size sectors I put in more walls to divide them into smaller ones. Smaller than I would believe is usually necessary. But a lot of the framerate drops went away. But in a couple of other areas of slowness the sectors are already small. And in another case, as soon as I start up a set of 7 stairs the framerate drops big time. Again, one step before or after the stairs the framerate jumps right back up. Some of the sectors that were slowing down were just plain flat sidewalk areas of the map. But I divided them anyway which did the trick.

So the end result is no more freezes but still a few slowdowns that I will try to find a workaround for.

This post has been edited by Mark.: 03 December 2012 - 07:01 PM

0

User is offline   Mark 

#40

I found that another big hit on framerate happens when the player is on any kind of sloped sector. I still haven't figured out why most stairs slow things down big time and some not so much.

Is anyone else using this flashlight mod in their maps? Any similar problems or workarounds you have? Do you technical guys have any ideas why these two things would cause the slowdowns?

This post has been edited by Mark.: 03 December 2012 - 07:00 PM

0

User is offline   Mark 

#41

Mucho thanks to Helixhorned for finding the solution to the framerate and stuttering issues.

" Simply replace "onevent EVENT_GAME" by "onevent EVENT_PROCESSINPUT" in the CON file. "
0

User is offline   xlnt 

#42

I really like this initiative. The flashlight flickers a bit when moving forward though, and it seems to inactivate itself in certain areas of the map.
0

User is offline   xlnt 

#43

I seem to have fixed the flickering issue when moving forward.
In the FLASHLIGHT2.CON file:

// Gives the 'right handed' effect
setvarvar temp xpos
addvar temp 96 - change to 200
addvar flangle 384 // right handed
// addvar flangle 1664 // left handed
rotatepoint xpos ypos temp ypos flangle flx fly
subvar flangle 384 // right handed
// subvar flangle 1664 // left handed
0

User is offline   xlnt 

#44

Video link to a project I'm working on, using the flashlight effect. The beginning of the map is my apartment, being attacked by aliens.
1

Share this topic:


  • 2 Pages +
  • 1
  • 2
  • 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