Author Topic: side-project  (Read 12770 times)

Gustav Kuriga

  • Guest
Re: side-project
« Reply #30: 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.

Chenier

  • Exalted Emperor
  • ******
  • Posts: 8120
    • View Profile
Re: side-project
« Reply #31: March 31, 2012, 01:01:02 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

  • BM Dev Team
  • Exalted Emperor
  • *
  • Posts: 8228
    • View Profile
    • BattleMaster
Re: side-project
« Reply #32: March 31, 2012, 10:58:38 AM »
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

  • Exalted Emperor
  • ******
  • Posts: 8120
    • View Profile
Re: side-project
« Reply #33: April 03, 2012, 01:57:37 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

  • Honourable King
  • *****
  • Posts: 3838
    • View Profile
Re: side-project
« Reply #34: April 03, 2012, 02:11:52 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

  • Exalted Emperor
  • ******
  • Posts: 8120
    • View Profile
Re: side-project
« Reply #35: April 03, 2012, 02:46:42 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

  • Honourable King
  • *****
  • Posts: 3838
    • View Profile
Re: side-project
« Reply #36: April 03, 2012, 02:53:31 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

  • Honourable King
  • *****
  • Posts: 2526
  • Okay... you got me
    • View Profile
    • White Halmos
Re: side-project
« Reply #37: April 03, 2012, 04:37:08 AM »
Even then, Euclidean distances and travel paths are easy to calculate on Voronoi diagram. :)

Interesting read: http://en.wikipedia.org/wiki/Voronoi
« Last Edit: April 03, 2012, 04:39:51 AM by Foundation »
The above is accurate 25% of the time, truthful 50% of the time, and facetious 100% of the time.

egamma

  • Guest
Re: side-project
« Reply #38: April 03, 2012, 05:32:14 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

  • BM Dev Team
  • Exalted Emperor
  • *
  • Posts: 8228
    • View Profile
    • BattleMaster
Re: side-project
« Reply #39: April 03, 2012, 09:43:08 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

  • BM Dev Team
  • Exalted Emperor
  • *
  • Posts: 8228
    • View Profile
    • BattleMaster
Re: side-project
« Reply #40: April 03, 2012, 09:49:14 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

  • Noble Lord
  • ***
  • Posts: 324
    • View Profile
Re: side-project
« Reply #41: April 03, 2012, 03:38:30 PM »
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

  • BM Dev Team
  • Exalted Emperor
  • *
  • Posts: 8228
    • View Profile
    • BattleMaster
Re: side-project
« Reply #42: April 03, 2012, 03:58:09 PM »
I'm not happy with my river generation algorithm. In fact, not happy at all. I will probably end up completely rewriting it.


Charles

  • Noble Lord
  • ***
  • Posts: 324
    • View Profile
Re: side-project
« Reply #43: April 05, 2012, 04:33:33 PM »
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

  • BM Dev Team
  • Exalted Emperor
  • *
  • Posts: 8228
    • View Profile
    • BattleMaster
Re: side-project
« Reply #44: April 05, 2012, 05:03:57 PM »
I'm not looking for a simulation, so I won't do precipitation models, because that is much more complex than I care about.