|
|
|
|
|
March 19th, 2007, 12:07 PM
|
|
Sergeant
|
|
Join Date: May 2004
Posts: 338
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: new map generator
so you want something like this?
int changebitmask(int mask, int oldmask, int newmask)
{
if( mask & oldmask == oldmask )
{
mask &= ~oldmask;
mask |= newmask;
}
return mask;
}
|
March 29th, 2007, 03:37 AM
|
|
Sergeant
|
|
Join Date: May 2004
Posts: 338
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: new map generator
just wanted to give you all a quick update
one of the major hurdles for the next release has been leaped: generating a wrapping mesh, which i've attached a sample of. the image is a mesh tiled with itself in four colors so that the mesh boundaries are visible.
my intent with this new algorithm is to generate a large amount of regions (which will be the dual of this kind of triangulation) and then assign to each region terrain types, rather than using a heightmap.
the generation method is being radically changed to allow for much greater control of what is generated (see a couple of post up). it also means a heinous speed increase.
i'll keep you posted as things move along
|
March 29th, 2007, 02:39 PM
|
|
Shrapnel Fanatic
|
|
Join Date: Oct 2003
Location: Vacaville, CA, USA
Posts: 13,736
Thanks: 341
Thanked 479 Times in 326 Posts
|
|
Re: new map generator
So... within a single map you will get 4 areas with equal chance to develop all of the terrains? Increasing the possibility of 4 areas with a continent, ocean, etc.
Or is this to lead up to flip-flop mapping for the "equal starting positions" crowd?
__________________
-- DISCLAIMER:
This game is NOT suitable for students, interns, apprentices, or anyone else who is expected to pass tests on a regular basis. Do not think about strategies while operating heavy machinery. Before beginning this game make arrangements for someone to check on you daily. If you find that your game has continued for more than 36 hours straight then you should consult a physician immediately (Do NOT show him the game!)
|
March 29th, 2007, 03:45 PM
|
|
Sergeant
|
|
Join Date: May 2004
Posts: 338
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: new map generator
perhaps i should not have posted that pic. it was mostly just a demo for setting up wrapping maps in general. the main challenge with the wrapping maps is that you have to make sure that they will tile when you lay them side by side. further, you have to do it in a way that that has no artifacts of wrapping it.
what im trying to do here is create a boatload of small regions and then start assigning terrains to them and thier edges.
|
March 29th, 2007, 06:07 PM
|
|
Sergeant
|
|
Join Date: May 2004
Posts: 338
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: new map generator
aight, i put together a crude demo of what i'm going for, check the attachment
|
March 29th, 2007, 06:53 PM
|
|
General
|
|
Join Date: Feb 2007
Location: R'lyeh
Posts: 3,861
Thanks: 144
Thanked 403 Times in 176 Posts
|
|
Re: new map generator
Somehow, those are not Voronoi cells anymore. But I guess I understood what you meant regarding the wrapping maps already, it's the same thing that is used in digital imaging for tiled wallpapers. Very nice.
|
March 29th, 2007, 07:25 PM
|
|
Shrapnel Fanatic
|
|
Join Date: Oct 2003
Location: Vacaville, CA, USA
Posts: 13,736
Thanks: 341
Thanked 479 Times in 326 Posts
|
|
Re: new map generator
Ahhh...
I had on my projects list (my super overloaded projects list) an idea to do a webpage tiling of the maps I randomly generate just to see if one accidentally comes close to being wrappable. That way I could spot one that was at least possible with slight effort.
__________________
-- DISCLAIMER:
This game is NOT suitable for students, interns, apprentices, or anyone else who is expected to pass tests on a regular basis. Do not think about strategies while operating heavy machinery. Before beginning this game make arrangements for someone to check on you daily. If you find that your game has continued for more than 36 hours straight then you should consult a physician immediately (Do NOT show him the game!)
|
March 29th, 2007, 10:42 PM
|
|
Sergeant
|
|
Join Date: May 2004
Posts: 338
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: new map generator
hmmm... maybe i am doing the voronoi calculation wrong. the tringulation is delaunay, other triangles were removed from around the edges, so the borders do not appear so, but they are. i thought that to get the voronoi tesselation you drew a line from the center of a triangle to its neighbor's center. working from memory here, so would not be suprised if that isnt quite right.
edit: so hard to find good computational geom stuff on the internets, bu i think i figured the difference out, should be from the centers of the triangle's circumcircles. i think the triangle centers will suit my purpose fine though.
|
March 30th, 2007, 12:24 AM
|
Sergeant
|
|
Join Date: Jan 2007
Posts: 386
Thanks: 24
Thanked 5 Times in 5 Posts
|
|
Re: new map generator
Woa...suddenly had a flash back to high school geometry after reading that. And it still makes no sense now like it did then.
|
March 30th, 2007, 05:33 AM
|
National Security Advisor
|
|
Join Date: Nov 2006
Location: Oxford, UK
Posts: 5,921
Thanks: 194
Thanked 855 Times in 291 Posts
|
|
Re: new map generator
Hey paradox, just to let you know I'm lurking here, and I'm really impressed by what you've got done! The latest demo is really good looking I think. Seems like an excellent system you're using. I'm impressed you managed to get the wraparound working too - it's not obvious after a brief think how you'd do that.
I like how the province borders are defined by the midpoints of the triangles. Cunning. One thing - the coastline goes along the edges of the triangles, which means that all the coastal provinces are half in the sea and half on land. Is that deliberate?
|
Thread Tools |
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is On
|
|
|
|
|