I haven't posted in a while, mostly because I've been very busy with a work project and personal stuff which has taken most of my time. But I wanted to post an update.
As some of you may know, Martiño has been working on integrating Lua into Glest! He has a working set of tutorials and some scenarios using the scripting and it's very nice. I've been working a bit on the Linux build for Glest w/Lua and the starting steps of migrating that into GAE.
Next, I have been working a good deal on the particle system (the code that makes effects like rain, snow, lightning, fire balls, etc.) and designing and constructing a weather system. For me, this is something that I've really been wanting to see: a realistic weather system in a game. I'm only going far enough with it to get the concepts and basic data structures flushed out, because I will be getting back to finishing 0.2.8 stuff (mostly multiplayer testing at this point), but this is a basic run-down on it's current design.
Firstly, if anybody knows of an open source software library that simulates weather patterns (not written in Fortran and intended for massive computer clusters
), then please let me know.
Before starting the game, the weather system is told information about the climate, geography and season. Since we're not designing something to run on a super computer and predict hurricanes, this is what I'm simplifying it down to at this point. Each of these values will be represented by a simple floating point number.
- how flat or hilly the area is in general (I don't care about details), zero is an unrealistically flat plain (should never exist unless you want to simulate a synthetic environment where the ground is truly 100% flat and smooth) and one is a mountainous region.
- how tropical is the region: zero is middle of an infinitely large continent and 1.0 is floating in the middle of an infinitely large ocean.
- how much vegetation is there in the region: zero is a dessert and one is a rain forest.
- which direction is the greatest body of water in in degrees. This is essentially an average direction. If a map has a lot of water on one end of it and you want to pretend that it's the beginning of an ocean, you point in that direction. If there are multiple bodies of water, either in the map or in the "pretend area" outside of the map, then you point in the direction that contains the most water.
- what is the season, zero is winter solstice and 0.5 is summer solstice.
- latitude in degrees
- longitude in degrees
- altitude in map units
- planet's orbital tilt in degrees (Earth = 23.5 degrees)
This is a preliminary model. With this data, some randomization and ripped off formulas from the meteorological sciences, I think that an interesting weather simulation can be realistically achieved. The maps in Glest should be considered large enough so that differing weather events can be taking place on different places in a map; it may begin to rain on the northern end of the map while the sun is still shining in the south. Also, the amount of rain & wind will be dictated by the weather simulation system, so that it's intensity will most closely resemble real storms, often sprinkling before the downpour. Winds will have a direction, speed and gusting speed and gusts will travel across the landscape in realistic fashion. This will look cool with the new wind-blown trees & shrubs we have planned for 0.3. Also, since our physics controlled toss-able objects are having their mass & density defined, we can have them effected by wind as well.
Finally, we'll add wind (actually just atmospheric pressure) to some attacks like mage attack, catapult attack, and (mostly) the archmage's attacks so that nearby objects are effected by the blasts. Also, when we get to this point, we'll need to modify the flags in a few models to blow with the simulated wind.