[QUESTION] How to make an animated rain background?

Report any bugs here or ask questions here!

[QUESTION] How to make an animated rain background?

Postby xElijah » 23 November 2020, 17:42

How to make an animated rain background? One that acts like a sky and doesn't overlap walls and other backgrounds.
User avatar
xElijah
Usurpation Soldier [50]
 
Posts: 96
Joined: 3 October 2020, 15:43

Re: [QUESTION] How to make an animated rain background?

Postby Nyove » 23 November 2020, 23:20

Hey xElijah,

Silk1 has made a tutorial on how to make animated rain background.
viewtopic.php?f=122&t=25012#p214953

For background overlap, you need to first place the rain background first. Background attached to movable automatically have a higher priority than other backgrounds, even if the other backgrounds are placed after. To solve this, attach all the other background to a movable you are not going to move.

Other solution is to shape your rain background to match your terrain. You may take a look at https://www.plazmaburst2.com/level_edit ... nyove-zone for reference.
Note: I am not sure if the rain mechanics I used is the same is silk1, so just take note of the shape of the bg instead of the contraption.

Best regards,
Nyove
Proud to be part of something meaningful.
Need any assistance? Join the PB2 discord server at https://discord.com/invite/Bhe9rNz or raise a support ticket at https://www.plazmaburst2.com/support

Contact me on discord for quickest reply possible.

User avatar
Nyove
Falkok [250]
 
Posts: 255
Joined: 7 July 2016, 10:26
Location: Cicada 3301

Re: [QUESTION] How to make an animated rain background?

Postby xElijah » 23 November 2020, 23:29

Nyove wrote:
Spoiler: Show More
Hey xElijah,

Silk1 has made a tutorial on how to make animated rain background.
...

For background overlap, you need to first place the rain background first. Background attached to movable automatically have a higher priority than other backgrounds, even if the other backgrounds are placed after. To solve this, attach all the other background to a movable you are not going to move.

Other solution is to shape your rain background to match your terrain. You may take a look at ... for reference.
Note: I am not sure if the rain mechanics I used is the same is silk1, so just take note of the shape of the bg instead of the contraption.

Best regards,
Nyove

Does attaching hundreds of backgrounds to a door add extra lag? Second option seems to be laggy too. Is there a third option? If I remember right there was some trick to make background act like custom sky image. I just don't remember where I read that.
User avatar
xElijah
Usurpation Soldier [50]
 
Posts: 96
Joined: 3 October 2020, 15:43

Re: [QUESTION] How to make an animated rain background?

Postby Nyove » 23 November 2020, 23:38

Hey xElijah,

Silk1's method only require 2 (or 3) backgrounds for animated rain.

Shaping of backgrounds certainly is more object, so you may want to utilise the layering mechanic mentioned above if you are concern with object count.

To make a custom sky, simply offset a background with an extremely large value - like 1000000 on X offset. (One of them will do)

The map I open sourced contains a custom sky too! :)

Best regards,
Nyove
Proud to be part of something meaningful.
Need any assistance? Join the PB2 discord server at https://discord.com/invite/Bhe9rNz or raise a support ticket at https://www.plazmaburst2.com/support

Contact me on discord for quickest reply possible.

User avatar
Nyove
Falkok [250]
 
Posts: 255
Joined: 7 July 2016, 10:26
Location: Cicada 3301

Re: [QUESTION] How to make an animated rain background?

Postby xElijah » 24 November 2020, 12:53

Nyove wrote:Silk1's method only require 2 (or 3) backgrounds for animated rain.

Silk1's method overlaps all other backgrounds and walls. I'm making a base map right now and I don't want to see rain particles inside buildings. To fix it you said I need to attach all map's backgrounds to a door in a certain order. Attaching many backgrounds to a door adds extra lag to the map or not? That's what I was asking.

Nyove wrote:To make a custom sky, simply offset a background with an extremely large value - like 1000000 on X offset. (One of them will do)

Alright, thanks. I'll try this out. Do you think it will work for animated rain?
User avatar
xElijah
Usurpation Soldier [50]
 
Posts: 96
Joined: 3 October 2020, 15:43

Re: [QUESTION] How to make an animated rain background?

Postby Nyove » 24 November 2020, 13:14

Hey xElijah,

xElijah wrote:Silk1's method overlaps all other backgrounds and walls. I'm making a base map right now and I don't want to see rain particles inside buildings. To fix it you said I need to attach all map's backgrounds to a door in a certain order. Attaching many backgrounds to a door adds extra lag to the map or not? That's what I was asking.

Sorry for misunderstanding your question.

I believe that...
Attachment is an intrinsic property every background has. (Visible in the xml file of your map.) Which means, this data is loaded once (during map loading) and will not contribute to any lag in-game. It's like saying does having many doors with speed of 100000 cause more lag than having many doors with speed of 0?

Furthermore, since you will not be moving that movable (and all that attached decorations), in terms of the game's runtime there should be not much (if any) difference.

xElijah wrote:Alright, thanks. I'll try this out. Do you think it will work for animated rain?

If you were to use the same contraption - I doubt it will work. The rain will sort of "follow" the player around.

Best regards,
Nyove
Proud to be part of something meaningful.
Need any assistance? Join the PB2 discord server at https://discord.com/invite/Bhe9rNz or raise a support ticket at https://www.plazmaburst2.com/support

Contact me on discord for quickest reply possible.

User avatar
Nyove
Falkok [250]
 
Posts: 255
Joined: 7 July 2016, 10:26
Location: Cicada 3301

Re: [QUESTION] How to make an animated rain background?

Postby xElijah » 24 November 2020, 13:22

Nyove wrote:
Spoiler: Show More
Hey xElijah,

Sorry for misunderstanding your question.

I believe that...
Attachment is an intrinsic property every background has. (Visible in the xml file of your map.) Which means, this data is loaded once (during map loading) and will not contribute to any lag in-game. It's like saying does having many doors with speed of 100000 cause more lag than having many doors with speed of 0?

Furthermore, since you will not be moving that movable (and all that attached decorations), in terms of the game's runtime there should be not much (if any) difference.

If you were to use the same contraption - I doubt it will work. The rain will sort of "follow" the player around.

Best regards,
Nyove

Alright, I'll check it out. Thank you. Will require some testing though. By the way, do you know if snow is being automatically enabled on all maps after 1 december? If so, is there any way to remove it aside from covering the entire map with a "roof wall"?
User avatar
xElijah
Usurpation Soldier [50]
 
Posts: 96
Joined: 3 October 2020, 15:43


Return to Bug Reporting, Help & Support

Who is online

Users browsing this forum: No registered users