Main Menu

News:

Please be aware of the Forum Rules of Conduct.

side-project

Started by Tom, March 28, 2012, 11:51:35 PM

Previous topic - Next topic

Gustav Kuriga

This may be a side-project, but there's no reason it shouldn't also benefit BM without you going out of your way.

Chenier

Quote from: Gustav Kuriga on March 31, 2012, 12:23:55 AM
This may be a side-project, but there's no reason it shouldn't also benefit BM without you going out of your way.

Perhaps for random WI maps?
Dit donc camarade soleil / Ne trouves-tu ça pas plutôt con / De donner une journée pareil / À un patron

Tom

Quote from: egamma on March 30, 2012, 08:59:04 PM
Can you use Hexes instead? There are several gameplay advantages to hexagons.

Hexagons are still regular, and thus don't make up a natural/realistic landscape. Plus the voronoi approach makes it possible to have areas of different sizes. I might be experimenting with that, e.g. reducing the number of regions depending on region type, e.g. desert regions would be larger. But that requires re-calculation of the mesh and I'm not sure I want to go there (because everything else like moisture, etc. is based on that). Would need to experiment and see if it gives me something worth the while.


Chenier

Quote from: Tom on March 31, 2012, 10:58:38 AM
Hexagons are still regular, and thus don't make up a natural/realistic landscape. Plus the voronoi approach makes it possible to have areas of different sizes. I might be experimenting with that, e.g. reducing the number of regions depending on region type, e.g. desert regions would be larger. But that requires re-calculation of the mesh and I'm not sure I want to go there (because everything else like moisture, etc. is based on that). Would need to experiment and see if it gives me something worth the while.

If your hexes are small enough, they can still give smooth natural-like results.

Probably demands a lot more juice, though.
Dit donc camarade soleil / Ne trouves-tu ça pas plutôt con / De donner une journée pareil / À un patron

De-Legro

Quote from: Chénier on April 03, 2012, 01:57:37 AM
If your hexes are small enough, they can still give smooth natural-like results.

Probably demands a lot more juice, though.

If they are small enough to give natural results, they are probably too small to be visibly useful for game play functionality. You could then combine the smaller ones into larger ones, but then you end up with hex's crossing borders etc.
Previously of the De-Legro Family
Now of representation unknown.

Chenier

Quote from: De-Legro on April 03, 2012, 02:11:52 AM
If they are small enough to give natural results, they are probably too small to be visibly useful for game play functionality. You could then combine the smaller ones into larger ones, but then you end up with hex's crossing borders etc.

Depends what you need the hexes for, I guess.
Dit donc camarade soleil / Ne trouves-tu ça pas plutôt con / De donner une journée pareil / À un patron

De-Legro

Quote from: Chénier on April 03, 2012, 02:46:42 AM
Depends what you need the hexes for, I guess.

Well there is very little advantage if you are only using them for map creation. Most advantages stem from unit movement I believe.
Previously of the De-Legro Family
Now of representation unknown.

Foundation

#37
Even then, Euclidean distances and travel paths are easy to calculate on Voronoi diagram. :)

Interesting read: http://en.wikipedia.org/wiki/Voronoi
The above is accurate 25% of the time, truthful 50% of the time, and facetious 100% of the time.

egamma

Quote from: De-Legro on April 03, 2012, 02:53:31 AM
Well there is very little advantage if you are only using them for map creation. Most advantages stem from unit movement I believe.

Correct--check out this neat little game to see why hexes are so cool: http://gamesbyemail.com/Games/Viktory2

Tom

Quote from: Chénier on April 03, 2012, 01:57:37 AM
If your hexes are small enough, they can still give smooth natural-like results.

Only on a large scale, at which every shape gives smooth results, even squares (heck, the pixels on your screen are squares).

But I need a map that looks natural even if zoomed in a lot. Voronoi cells do that. At very large zoom levels I may have to add some noise to the lines seperating the cells, but that's easily done.

Tom

Quote from: Foundation on April 03, 2012, 04:37:08 AM
Even then, Euclidean distances and travel paths are easy to calculate on Voronoi diagram. :)

Exactly. I did my research. Delauney triangulation and you have all your paths, and they have some nice properties, too (guaranteed to only ever cross exactly one border, guaranteed to be the shortest distance, border guaranteed to be exactly halfway between the origin points, etc. etc.).

Right now, though, I'm stopped because the PHP implementation of Fortune's Algorithm that I use is broken. At more then 16k cells, it takes forever and sometimes goes into an endless loop. :(

Charles

How were your rivers generated?  It looks to me like the rivers were generated first and then the precipitation was figured out using them.  It would be nice to see (and I am sure much harder to do) the rivers generated from the precipitation.  Come up with some other algorithm for deciding how much precipitation occurs in any plot.  Then see where the water would run (you may need to add slope to each plot).  Once enough water is accumulated, streams and rivers form.  If water is trapped, that plot (or two depending on the size of the river?) would become a lake. 
This would add the posibility of a river running through a desert, and posibly forming a lake there.

Tom

I'm not happy with my river generation algorithm. In fact, not happy at all. I will probably end up completely rewriting it.


Charles

Well, if you are looking for a different algorithm, it would be neat to see precipitation done first and then form the rivers.  It makes the place more of a living thing, rivers are not just bodies of water that exist but change.  Where potential droughts could make rivers into streams, and torrential rains could flood out towns and crops.  And rivers could be damed and diverted. 
As a side note, I would like to say that I am very excited that I am not the one attempting to code these ideas.  They sound like far more work than they would be worth, but as I am not the one coding, I will continue encouraging and giving unrealistic ideas!  Good luck!  I really like what you are doing Tom, even if you disregard all my suggestions.

Tom

I'm not looking for a simulation, so I won't do precipitation models, because that is much more complex than I care about.