at the moment I am exploring the im.MatrixColor-manipulators. It seems to be quite easy to construct a kind of lighting system which reflects the hour of the day, the month and also the weather situation graphically. So I need only one .png for each image (plus a handful for the correct weather sky for all the game), and depending on the actual situation the shaders will give the correct impression for the scene (darker at night, during winter, and at bad weather etc.).
I am aware of some of the potential problems. For example the shadow prints drawn in the picture would not be correct without sunlight etc. Nevertheless I guess this could work well.
My questions:
1) Has anybody tried this before? I have´nt found anythin in the forum, only this nice tutorial of TWO AND A HALF STUDIOS:
https://www.twoandahalfstudios.com/2019 ... with-renpy
2) Are there any potential drawbacks or dangers connected with the extensive usage of these manipulators which I am not aware of (memory usage or such?). I have very limited experience up to now and don´t want to create something which will cause problems later on and has to be reworked completely.
Here some snippets of the code for illustration:
Code: Select all
init python:
name_weather = ["storm","rain","overcast","cloudy","clear","sunny","Bright"] ## loads the correct sky pic
bright_weather = [-0.30, -0.20, -0.10, -0.05, -0.00, -0.00, +0.05, +0.15] ## changes in brightness
...
## same for the addable brightness changes for the hours of the day and for the months of the year - and additionally for the tints, contrast, saturation values)
screen Show_All:
fixed:
add im.MatrixColor(
("work/ls_test_sky_" + name_weather[weather] + ".png"),
im.matrix.tint(1 + tintr_hour[hour] + tintr_month[month] + tintr_weather[weather], 1 + tintg_hour[hour] + tintr_month[month] + tintr_weather[weather], 1 + tintb_hour[hour] + tintr_month[month] + tintr_weather[weather])
* im.matrix.brightness(0 + bright_hour[hour] + bright_month[month] + bright_weather[weather])
* im.matrix.saturation(1 + saturat_hour[hour] + saturat_month[month] + saturat_weather[weather])
* im.matrix.contrast(1 + contrast_hour[hour] + contrast_month[month] + contrast_weather[weather]))
...
## same for all displayables of the screen, i.e. background landscape, foreground buildings, character sprites etc.)
label Show_It:
...
show screen Show_All
...