Best performance for applying whole map "shadow layer" and..

Get help using Construct 2

Post » Wed Jun 22, 2016 10:11 am

Hi there

I'm making an open world game based in a futuristic city, I have an idea for easily creating shadows, so that say when the player is walking alongside a building, there is a slight darkening effect cast over them, same with vehicles etc...

I would like to create/paint a large PNG file with transparency, and then overlay this over the entire map area.. my map size is currently 20,000x20,000 pixels. Would it be too performance intensive to use a single png file for this? IE: would it be a better idea to cut this shadow layer into say 40 pieces or more etc...?

Also for a "real-time lighting" effect, I would like to apply a large overlaid colour image with the opacity set to change depending on the "time of day", and switching between a black overlay, blue overlay, yellow/orange overlay etc... to add the effect of dawn/noon/dusk/evening/night etc...

I assume the best way to do this would be to apply it at only the size of the largest screen size expected, and have it attach to the player so that it is always covering just the screen?


Many thanks for any tips about these things, cheers!
B
7
S
1
Posts: 37
Reputation: 557

Post » Wed Jun 22, 2016 11:21 am

Covering the whole screen/layout with something Is usually not very good. Have you tried the webGl effects? I also think i would be better if each shadow is seperate to each building etc. A bit tideous to place all the shadows, or maybe if you name all the sprites smart you can have events place all the shadows with code to each object that is supposed to cast shadows?
Follow my progress on Twitter
or in this thread Archer Devlog
B
40
S
17
G
17
Posts: 991
Reputation: 12,654

Post » Wed Jun 22, 2016 12:52 pm

Thanks for the response :)

Yeah maybe I will just go about making each shadow for each building seperately, then just attaching the small images to them (probably about 128x512 or so for each shadow map), or maybe I will just do it for each "block"/area of 1000 pixels or so... do you happen to know what sort of image size in pixels is where construct 2 may start to take a performance hit? 1024x1024 png file? 2048x2048 etc..?
B
7
S
1
Posts: 37
Reputation: 557


Return to How do I....?

Who is online

Users browsing this forum: brunopalermo, ignaciosimo, nickar and 52 guests