#Generate province looking shape on 2d array (grid)
1 messages · Page 1 of 1 (latest)
cool
uh whats a province 💀
wtf i do gfx
americans
I wanna do the same on my auto generating map but don’t know how so I’ll watch this thread
American momento
a principal administrative division of certain countries or empires:
that’s the simple way of saying it
they look something like that
Canada has provinces
now i need to generate a shape similiar to this randomly
a puzzle piece
hmmm
you could have like a million custom pieces
and randomize
it
through an array
okay so here is the issue with that
I wanna do that to
how would these provinces connect
that won’t work
it’ll be completely random
meaning it won’t be in blobs
they have to connect?
bruh
yes
i use to think ron used real world data till i realized he just uses blender
but that wont work in this case
since only ai fighting
and its tile base simulation
an alternative is to make a big flat square and draw lines though it
:/
squiggly lines
that’s
impossible
do you know how scripting works 💀💀
the red is sorta what i wnt to generate
to make a region
what about the blue
it’s the country
the blue is the country
ur not english natively?
Canada isn’t the only one with this
i am
its the only one ik
think of it like states
u should look at maps more
but less straight lines
what if
i pretty much just need to round random height around the already owned lands
lets say you made a gui first
I think I do
mhm
what is it
@ruby moss with your logic i might as well make an entire political system ai that determines the borders of a province based of resources, history, and geography
so if you went to pick a random offset pixel and then using a script picked another one thats within one pixel of it then you will make either an undefined, pos, or negative slope right
and you can repeat that proccess
but
set a maximum to where it can go vertically
so its not a line
and then somehow capture that?
the only issue i see with that is math.random being so shit and making a straight line somehow
lol idk
Have it select a random point on the map, and have it change into whatever color, use the function that detects everything around it and use math.random to create a semi squiggly circle. Repeat the process till all squares are covered. When a square is covered, create a value for that part where if the value is true, that part cannot change colour another time.
yeah i could do tat
oh wait i got an idea
thats why i said that lol
and a minimum too
so its not just one pixel
send me the script if you do, since I also need it for my project.
if u get unlucky
heresmy idea
yeh add me so i remember
it worked?
heres my idea tho
i select a region
this is sorta lot potat idea but a different
so i have a width and height
ill go to each edge
and inset it a bit
oo i see
the blue is a number between 1 and something
but heres the issue i see with this
it might make a weird shape
and less province like
u can fill it in
yeah i could
yeah check if its an island
well yeah but their called islands wen working with arrays
** You are now Level 3! **
but the issue here now
or another ting to solve
is connecting provinces when there next reated
created
o
say we re making another province
were gonna generate and add offset
but we need to know where to place it so it connets
so idk
?
how
think of the whole plate as already a big province
what we are trying to do is separating
ok
what