Topic: game day/night

Ron_of_Nord
Avatar
Topic Opener
Joined: 2024-04-20, 23:43
Posts: 115
OS: Windows
Version: 1.3
Ranking
Likes to be here
Location: Land_down_under
Posted at: Yesterday 03:48

I've searched the posts as best I can, and part of the codeberg repository but couldn't find a mention of this so I'll put it here. How about a day/night cycle for the game,where as the sun goes down, visibilty of towers.buildings,workers etc gets less,to the point where they can only see one triangle/junction away ( about the size of a large building is what I mean) and as the sun comes up, visibility grows. there have been a lot of RTS games that have used this idea ( ands quiet a few RPGS ) to great effect. All I think that is needed to do this is a gradual muting of colours but I may be wrong,


The aussies are coming, ya ho! ya ho!

Top Quote
kaputtnik
Avatar
Joined: 2013-02-18, 20:48
Posts: 2632
OS: Archlinux
Version: current master
Ranking
One Elder of Players
Location: Germany
Posted at: Yesterday 07:59

There was a similar idea in the german forum with some pictures for illustration.


Top Quote
Ron_of_Nord
Avatar
Topic Opener
Joined: 2024-04-20, 23:43
Posts: 115
OS: Windows
Version: 1.3
Ranking
Likes to be here
Location: Land_down_under
Posted at: Yesterday 23:19

thanks for the info, unfortunately for me, I don't speak or read german so I didnt't look there. Translating German from a dictionary is tricky at best, with a lot of misconceptions that could occur so I rarely try, but I'll have a look at the link


The aussies are coming, ya ho! ya ho!

Top Quote
Ron_of_Nord
Avatar
Topic Opener
Joined: 2024-04-20, 23:43
Posts: 115
OS: Windows
Version: 1.3
Ranking
Likes to be here
Location: Land_down_under
Posted at: Yesterday 23:24

Just had a look at those pictures and that is exactly what I was thinking off. Is this idea possible via the Lua interface? Does anybody know ? Sorry I couldn't read all the text, that's the problem with only speaking and reading only one language.


The aussies are coming, ya ho! ya ho!

Top Quote
kaputtnik
Avatar
Joined: 2013-02-18, 20:48
Posts: 2632
OS: Archlinux
Version: current master
Ranking
One Elder of Players
Location: Germany
Posted at: Today 08:33

Currently widelands has no property for storing a date value, or a value for day-time. Maybe one can use the playtime for this. There is currently also no possibility to add an overlay by the lua interface, e.g. adding a semi transparent dark overlay, like in shown in my screenshot: widelsands by night

I used just a semi transparent black overlay (to make the whole scene a bit dark) and the parts where the background should be lighted by fire have full transparency, see below.

Thinking about the possibility to add such an overlay per lua, some one maybe wants to add rain or snowfall to the game.


Attachment: image/png
widelands_by_night_overlay.png

Top Quote
Nordfriese
Avatar
Joined: 2017-01-17, 18:07
Posts: 2101
OS: Debian Testing
Version: Latest master
Ranking
One Elder of Players
Location: 0x55555d3a34c0
Posted at: Today 09:47

See also: https://github.com/widelands/widelands/issues/2131


Top Quote
Ron_of_Nord
Avatar
Topic Opener
Joined: 2024-04-20, 23:43
Posts: 115
OS: Windows
Version: 1.3
Ranking
Likes to be here
Location: Land_down_under
Posted at: Today 11:58

Kaputnik said

Thinking about the possibility to add such an overlay per lua, some one maybe wants to
add rain or snowfall to the game.

That's a good idea, it would give lands/seas the feel of being more real
Playtime might be the best option, but that value may have to be stored in the save game to keep the current day/night cycle syncd between playing sessions. It's a shame this feature can't as yet be used from Lua scripting as you could then store the current day/night cycle in a seperate file if needed.

I had a quick look at that issue note, but I dont think that the map editor should define the climate settings, but rather have them in the start game settings ( where you choose tribe,win conditions etc )


The aussies are coming, ya ho! ya ho!

Top Quote