Day and Night

Day and Night

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

Post Reply
User avatar
Tim Blokdijk
Posts: 1242
Joined: 29 May 2005, 11:18

Day and Night

Post by Tim Blokdijk »

You can determine the angle and elevation of the sun.
But why can't it go under?
Giving you day and night.

I'm thinking of hot glowing plasma raining down on your base in the middle of the night.
Unit's that use the cover of darkness to build a forward base.
Nuke's that will not only blow up the enemy's base but also nicely light up the horizon.
Burning tree's light up the valley giving you a better view.
Me pissing my pants as I see the little light of a krogoth moving in the distance.
Pyro's really can "make you day".
A mild green glow radiating from a fusion plant.

Things that can be changed to give new game play:
- Line of sight is based on the amount of light available.
- Unit's can have search lights and flares.
- Buildings, ships and all can have lights giving away it's status and of course it's position.
- Solar collectors can give more and less output based on the amount of light available.
- Tidal strength changes with the sun's position.


Maybe you can have a moon to?
Or 2 sun's with different rotation speeds and brightness?

Anybody got more idea's about this?
Or code? :-)
Kixxe
Posts: 1547
Joined: 14 May 2005, 10:02

Post by Kixxe »

The problem is that spring followes texture maps like dogs. Meaning that is you want a dark map, make the textures dark, the sky black/purple and the sun under the surace.

Dint anyone make a night map?

For those whit shadows avibole, it might work. But for us old computer pepole it will make the map or spring in total (depending on how you implent it) unplayibole.
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7052
Joined: 16 Nov 2004, 13:08

Post by zwzsg »

Seeing how the shading is already calculated and can be changed ingame, it should be theorically possible to program the sun position to change during a game. It all depends whether there's a coder willing to spend time on that while there's more important issues. I'd like it to be controllable with a few .smd values, but I'm not sure how. Define a few sun positions and color and a time period and let the engine cycle gradually from one to the other?

On the other hand, night time game with shots and explosion illuminating the sky would probably be more difficult. Do explosion already light up the ground? And all units would have to be modified to gain headlights. That won't be doable before long.
User avatar
aTTacK
Posts: 90
Joined: 23 May 2005, 13:00

Post by aTTacK »

i think the most important thing atmoment is to improve the playability and the gameplay of the game, which results in a growing community

those things would be nice... but arent so important
User avatar
jcnossen
Former Engine Dev
Posts: 2440
Joined: 05 Jun 2005, 19:13

Post by jcnossen »

Lighting would be cool I guess. I think this could be implemented by multitexturing the terrain with a lightmap: Set the lightmap as a GL rendertarget and draw some nice circles on it for every lights. Then use the lightmap either as extra texture or as another pass on the terrain.
Lights on units are another thing though, maybe by reading from the lightmap. Im sure someone will start to fiddle around with some new fragment shaders and graphics code once the really needed stuff is finished.
Me pissing my pants as I see the little light of a krogoth moving in the distance.
We would first have to increase LOS for that though (Which is not a bad thing imo, but that's another discussion)
Post Reply

Return to “Engine”