Duke4.net Forums: Experimental rain code - Duke4.net Forums

Jump to content

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

Experimental rain code

User is offline   Fox 

  • Fraka kaka kaka kaka-kow!

#1

This is just another code for rain.

It bothered me that most rain codes would just spawn drips above the player head, and when you run there would be a noticeable difference in the amount of rain in front of you, giving the impression (which is quite not wrong) that you are being chased by a cloud:

Posted Image

So I tried to make a code which the rain particles would jump to the "other side" when they cross the limit, the same goes for vertical movement. There also are some gimmicks to maximize the amount of visible particles by moving all of them to your field of vision, etc.

Change the first value of RAINTYPETEMP to 1 for snow so you can have a better look at the effect. You are going to notice that some particles pop out of nowhere is front of you as you move.

There is some incomplete code in the CON, but whatever. The coordinate of the rain sprites are based on the camera temporary values, which is an ugly hack and probably would go out of sync in multiplayer causing a nuclear meltdown in your hardware.

I have no use for this right now, so I hope this can at least serve as inspiration for somone...

Attached File(s)



This post has been edited by Fox: 29 September 2012 - 10:28 PM

8

User is offline   Mblackwell 

  • Evil Overlord

#2

You should attach your test video(s) to the OP so people remember what this is.
1

User is offline   Fox 

  • Fraka kaka kaka kaka-kow!

#3

Huh, this is more of a technicality than a truly new effect. So I tought it would be better to just leave a description.
0

User is online   zykov eddy 

#4

Thinking about stealing this for my mod. Thanks!
0

User is offline   Mblackwell 

  • Evil Overlord

#5

View PostFox, on 01 October 2012 - 11:55 AM, said:

Huh, this is more of a technicality than a truly new effect. So I tought it would be better to just leave a description.


Videos and screens are always good though, they get people excited. ;)
0

User is offline   Reaper_Man 

  • Once and Future King

#6

Yeah a video would be cool, I'd like to see it in action. Or at least a demo map. The effect sounds really smart.
0

User is offline   Fox 

  • Fraka kaka kaka kaka-kow!

#7

There is no need of a map, since the effect will start in any sector with a paralaxed sky.
0

#8

Looks pretty cool, considering the engine limits of sprite number to display (I wish I could have more raindrops in the distance). I was messing around with snow effects in 2009 as well and I can say that "wrapping" the particles to the opposite side is a really neat trick, your realization is pretty much flawless. =) I think it could be improved if the raindrops had some slanted versions to simulate proper motion blur when you move horizontally. Having strictly vertical drops doesn't look good in such cases.
1

User is offline   Fox 

  • Fraka kaka kaka kaka-kow!

#9

You can mess with the values on the top of the code. Increasing RAINPARTICLESTEMP should increase the density (with harmful risk to performance). Decreasing RAIN_MAXRANGE and RAIN_HEIGHT should also make the rain (exponentially) more dense when closer to you, while increasing it would also increase the effective distance of the raindrops.

For the sake of it, this is a video I posted a while ago:

4

User is offline   blizzart 

#10

Hello Fox,
I recently downloaded your code, but I don´t know how to use this as a mapper. I mean, I put all the files into my EDuke directory and then?

Sorry, if this sounds very noobish, but I really don´t know what to do now.
0

User is offline   Fox 

  • Fraka kaka kaka kaka-kow!

#11

Putting in the directory should be enough. It works in sectors with paralaxed sky.

This post has been edited by Fox: 28 October 2012 - 02:38 PM

0

User is offline   Mark 

#12

I just tried it out in my map and the frame rate took a massive hit. Even in areas totally isolated from the large outdoor area. I don't know if its conflicting with something else because I already have a modified EDUKE.CON and duke3d.def so I cut and pasted the raindrop code into them.
0

User is offline   Fox 

  • Fraka kaka kaka kaka-kow!

#13

I dunno, but I would prefer if you just used the files I provided, since it is just a test code. Keep in mind you can have multiple Duke 3D directories, and it is preferable to have a copy of the game just to test garbage.

Anyway, if the framerate is an issue you can try decreasing the value of RAINPARTICLESTEMP.
0

User is offline   Mark 

#14

I guess what bothers me is that big framerate drop even in indoor areas. I'll try it again later today without anything else running except your rain code.
0

User is offline   Fox 

  • Fraka kaka kaka kaka-kow!

#15

Yeah, this code will affect the framerate even in indoor areas, because it is always running.
0

User is offline   Mark 

#16

That was a big problem with Cody's flashlight mod too. Even if the light itself was off it dragged things down.

BTW, when is someone going to make a good SE50 flashlight mod. Challenge has been issued. ( as I bring out my glove and slap their face ) :D

This post has been edited by Marked: 29 October 2012 - 04:13 PM

0

User is offline   The Commander 

  • I used to be a Brown Fuzzy Fruit, but I've changed bro...

#17

View PostMarked, on 29 October 2012 - 04:11 PM, said:

That was a big problem with Cody's flashlight mod too. Even if the light itself was off it dragged things down.

BTW, when is someone going to make a good SE50 flashlight mod. Challenge has been issued. ( as I bring out my glove and slap their face ) :D

http://forums.duke4....post__p__139974

View PostDarkus, on 30 October 2012 - 03:11 PM, said:

After hours of research, I finally managed to create my own flashlight effect.
It can be activated or desactivated using the "Turn Around" key.
Notice also that I made the flashlight 'right-handed' instead of being centered on the player:
Posted Image

Problem: I can only use the flashlight on maps that been designed for (a map containing a SE with lotag of 50).I tried to program it to make it compatible with other maps, but there are a weird bug that project the APLAYER sprite on wall instead of normal light...

As you can see he has the same problem with spotlights as I did.
So it the mod wont work correctly in vanilla maps.

This post has been edited by Cody: 30 October 2012 - 05:13 PM

0

User is offline   Mark 

#18

I really hope a good solution becomes available. I re-worked my Graveyard mod to the point that a flashlight will be necessary to move around in most of the indoor and underground areas.
0

User is offline   Plagman 

  • Former VP of Media Operations

#19

I thought I fixed that issue; I don't see a download link for that mod. Can someone point me at how to reproduce this?
0

User is offline   Mark 

#20

There is no release for the Darkus version yet. I just re-installed Cody's older flashlight mod and for some reason I can hear the beep of the effect turning on but I don't see any point light. It worked last time I tried it months ago.
0

User is offline   The Commander 

  • I used to be a Brown Fuzzy Fruit, but I've changed bro...

#21

View PostMarked, on 30 October 2012 - 06:49 PM, said:

There is no release for the Darkus version yet. I just re-installed Cody's older flashlight mod and for some reason I can hear the beep of the effect turning on but I don't see any point light. It worked last time I tried it months ago.

I will try look at the code later.
The problem I have now is that my Nvidia card failed and now I am back to using an ATI so spotlights don't even work for me now. (This really needs to be addressed)
0

User is offline   Diaz 

#22

View PostCody, on 30 October 2012 - 05:11 PM, said:

http://forums.duke4....post__p__139974

As you can see he has the same problem with spotlights as I did.
So it the mod wont work correctly in vanilla maps.



View PostMarked, on 30 October 2012 - 06:16 PM, said:

I really hope a good solution becomes available. I re-worked my Graveyard mod to the point that a flashlight will be necessary to move around in most of the indoor and underground areas.



View PostPlagman, on 30 October 2012 - 06:41 PM, said:

I thought I fixed that issue; I don't see a download link for that mod. Can someone point me at how to reproduce this?


Guys, if you're talking about the APLAYER thing, it's not a bug - it's a logical consequence of spotlights using the "owner" value for texture projections. I've explained it in the "What are you working for Duke" thread.

This post has been edited by Diaz: 31 October 2012 - 01:47 PM

0

User is offline   Mark 

#23

Cody's mod was set by default to use an SE49 point light. And even that light was not displaying any more.
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