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

0 favourites
  • 3 posts
From the Asset Store
Best car suspension with spring effect and very cool terrain generation.
  • 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!

  • 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?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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..?

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)