Skip to content

Commit

Permalink
randomize generation more
Browse files Browse the repository at this point in the history
  • Loading branch information
FiiL123 committed Dec 29, 2023
1 parent 3f73324 commit 3fb04ff
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions map_generator/gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
import sys


map_x, map_y = int(sys.argv[1]), int(sys.argv[1])
map_x, map_y = int(sys.argv[1]), int(sys.argv[2])
player_count = int(sys.argv[3])
harbor_count = player_count * 3
harbor_count = int(sys.argv[4])
total_count = player_count + harbor_count
base_range = 4
chosen_pixels = set()
Expand Down Expand Up @@ -125,8 +125,10 @@ def is_land(colored_map, x, y):
chosen_pixels = set()

c+=1
seed = np.random.randint(0, 250)

seed = np.random.randint(0, 2048)
scale = np.random.randint(25, 40)
persistence = np.random.uniform(0.3,0.5)
lacunarity = np.random.uniform(2,3)
world_map, island_centers = generate_perlin_noise(
width, height, scale, octaves, persistence, lacunarity, seed
)
Expand Down Expand Up @@ -159,4 +161,4 @@ def is_land(colored_map, x, y):

# Display the image
# image.show()
image.save(sys.argv[4])
image.save(sys.argv[5])

0 comments on commit 3fb04ff

Please sign in to comment.