Use islands from islands/ folder, fixed starting a new generated world

master
Martin Felis 2021-07-11 22:25:15 +02:00
parent bc662d616d
commit 4d59a9841d
7 changed files with 10 additions and 3 deletions

View File

@ -0,0 +1 @@
{"(-480, 277.128113)":"Sand","(-480, 387.97937)":"Sand","(-384, -443.404968)":"Sand","(-384, -332.553711)":"Sand","(-384, -221.702499)":"Sand","(-384, 221.702499)":"Sand","(-384, 332.553741)":"Grass","(-384, 443.404999)":"Sand","(-288, -498.830627)":"Sand","(-288, -387.97937)":"Grass","(-288, -277.128113)":"Sand","(-288, 166.276871)":"Sand","(-288, 277.128113)":"Grass","(-288, 387.97937)":"Sand","(-192, -554.256226)":"Sand","(-192, -443.404968)":"Sand","(-192, -332.553741)":"Grass","(-192, -221.702484)":"Sand","(-192, -110.85125)":"Sand","(-192, 0)":"Sand","(-192, 110.85125)":"Sand","(-192, 221.702499)":"Grass","(-192, 332.553741)":"Grass","(-192, 443.404999)":"Sand","(-96, -498.830597)":"Sand","(-96, -387.97937)":"Grass","(-96, -277.128113)":"Grass","(-96, -166.276871)":"Grass","(-96, -55.425625)":"Grass","(-96, 55.425625)":"Grass","(-96, 166.276871)":"Grass","(-96, 277.128113)":"Grass","(-96, 387.97937)":"Sand","(0, -554.256226)":"Sand","(0, -443.404999)":"Grass","(0, -332.553741)":"Grass","(0, -221.702499)":"Grass","(0, -110.85125)":"Grass","(0, 0)":"Grass","(0, 110.85125)":"Grass","(0, 221.702499)":"Grass","(0, 332.553741)":"Grass","(0, 443.404999)":"Sand","(96, -498.830627)":"Sand","(96, -387.97937)":"Grass","(96, -277.128113)":"Grass","(96, -166.276871)":"Grass","(96, -55.425625)":"Grass","(96, 55.425625)":"Grass","(96, 166.276871)":"Grass","(96, 277.128113)":"Grass","(96, 387.97937)":"Sand","(192, -554.256226)":"Sand","(192, -443.404999)":"Sand","(192, -332.553741)":"Sand","(192, -221.702499)":"Sand","(192, -110.85125)":"Grass","(192, 0)":"Grass","(192, 110.85125)":"Grass","(192, 221.702484)":"Grass","(192, 332.553741)":"Sand","(288, -166.276871)":"Sand","(288, -55.425621)":"Grass","(288, 55.425629)":"Grass","(288, 166.276871)":"Sand","(288, 277.128113)":"Sand","(384, -110.85125)":"Sand","(384, 0)":"Sand","(384, 110.851242)":"Sand","(480, 55.425629)":"Sand"}

View File

@ -0,0 +1 @@
{"(-480, -55.425629)":"Sand","(-480, 55.425613)":"Sand","(-480, 166.276855)":"Sand","(-384, -110.851242)":"Sand","(-384, 0)":"Grass","(-384, 110.85125)":"Grass","(-384, 221.702499)":"Sand","(-288, -166.276871)":"Sand","(-288, -55.425629)":"Grass","(-288, 55.425621)":"Grass","(-288, 166.276871)":"Sand","(-192, -332.553741)":"Sand","(-192, -221.702484)":"Sand","(-192, -110.85125)":"Grass","(-192, 0)":"Grass","(-192, 110.85125)":"Sand","(-96, -387.97937)":"Sand","(-96, -277.128113)":"Grass","(-96, -166.276871)":"Grass","(-96, -55.425625)":"Grass","(-96, 55.425625)":"Sand","(-96, 166.276871)":"Sand","(-96, 277.128113)":"Sand","(0, -443.404999)":"Sand","(0, -332.553741)":"Grass","(0, -221.702499)":"Grass","(0, -110.85125)":"Grass","(0, 0)":"Grass","(0, 110.85125)":"Sand","(0, 221.702499)":"Sand","(0, 332.553741)":"Sand","(96, -387.97937)":"Sand","(96, -277.128113)":"Grass","(96, -166.276871)":"Grass","(96, -55.425625)":"Grass","(96, 55.425625)":"Grass","(96, 166.276871)":"Grass","(96, 277.128113)":"Grass","(96, 387.97937)":"Sand","(192, -443.404999)":"Sand","(192, -332.553741)":"Grass","(192, -221.702499)":"Grass","(192, -110.85125)":"Grass","(192, 0)":"Grass","(192, 110.85125)":"Grass","(192, 221.702484)":"Grass","(192, 332.553741)":"Sand","(288, -387.97937)":"Sand","(288, -277.128113)":"Sand","(288, -166.276871)":"Sand","(288, -55.425621)":"Grass","(288, 55.425629)":"Grass","(288, 166.276871)":"Grass","(288, 277.128113)":"Sand","(384, -110.85125)":"Sand","(384, 0)":"Sand","(384, 110.851242)":"Sand","(384, 221.702499)":"Sand","(480, 55.425629)":"Sand"}

View File

@ -0,0 +1 @@
{"(-672, 387.97937)":"Sand","(-672, 498.830627)":"Sand","(-576, 221.702484)":"Sand","(-576, 332.553741)":"Sand","(-576, 443.404999)":"Sand","(-480, 166.276855)":"Sand","(-480, 277.128113)":"Sand","(-480, 387.97937)":"Grass","(-480, 498.830627)":"Sand","(-384, 110.85125)":"Sand","(-384, 221.702499)":"Grass","(-384, 332.553741)":"Grass","(-384, 443.404999)":"Grass","(-384, 554.256226)":"Sand","(-288, -277.128113)":"Sand","(-288, -166.276871)":"Sand","(-288, -55.425629)":"Sand","(-288, 55.425621)":"Sand","(-288, 166.276871)":"Grass","(-288, 277.128113)":"Grass","(-288, 387.97937)":"Grass","(-288, 498.830627)":"Sand","(-192, -332.553741)":"Sand","(-192, -221.702484)":"Grass","(-192, -110.85125)":"Grass","(-192, 0)":"Grass","(-192, 110.85125)":"Grass","(-192, 221.702499)":"Grass","(-192, 332.553741)":"Grass","(-192, 443.404999)":"Sand","(-96, -387.97937)":"Sand","(-96, -277.128113)":"Grass","(-96, -166.276871)":"Grass","(-96, -55.425625)":"Grass","(-96, 55.425625)":"Grass","(-96, 166.276871)":"Grass","(-96, 277.128113)":"Sand","(-96, 387.97937)":"Sand","(-96, 498.830627)":"Sand","(-96, 609.681824)":"Sand","(0, -332.553741)":"Sand","(0, -221.702499)":"Grass","(0, -110.85125)":"Grass","(0, 0)":"Grass","(0, 110.85125)":"Grass","(0, 221.702499)":"Sand","(0, 332.553741)":"Sand","(0, 443.404999)":"Sand","(0, 554.256226)":"Grass","(0, 665.107483)":"Sand","(0, 775.95874)":"Sand","(96, -277.128113)":"Sand","(96, -166.276871)":"Grass","(96, -55.425625)":"Grass","(96, 55.425625)":"Grass","(96, 166.276871)":"Sand","(96, 277.128113)":"Sand","(96, 387.97937)":"Sand","(96, 498.830597)":"Grass","(96, 609.681885)":"Grass","(96, 720.533142)":"Grass","(96, 831.384399)":"Sand","(192, -221.702499)":"Sand","(192, -110.85125)":"Grass","(192, 0)":"Sand","(192, 110.85125)":"Sand","(192, 443.404968)":"Sand","(192, 554.256226)":"Grass","(192, 665.107483)":"Grass","(192, 775.95874)":"Grass","(192, 886.809998)":"Sand","(288, -166.276871)":"Sand","(288, -55.425621)":"Sand","(288, 387.97937)":"Sand","(288, 498.830627)":"Grass","(288, 609.681885)":"Grass","(288, 720.533142)":"Grass","(288, 831.384399)":"Sand","(384, 443.404968)":"Sand","(384, 554.256226)":"Grass","(384, 665.107483)":"Grass","(384, 775.95874)":"Sand","(480, 387.97937)":"Sand","(480, 498.830627)":"Grass","(480, 609.681885)":"Grass","(480, 720.533142)":"Sand","(576, 443.404999)":"Sand","(576, 554.256226)":"Sand","(576, 665.107544)":"Sand"}

View File

@ -0,0 +1 @@
{"(-384, 0)":"Sand","(-384, 110.85125)":"Sand","(-384, 221.702499)":"Sand","(-384, 332.553741)":"Sand","(-288, -55.425629)":"Sand","(-288, 55.425621)":"Grass","(-288, 166.276871)":"Grass","(-288, 277.128113)":"Grass","(-288, 387.97937)":"Sand","(-192, 0)":"Sand","(-192, 110.85125)":"Sand","(-192, 221.702499)":"Grass","(-192, 332.553741)":"Sand","(-96, -387.97937)":"Sand","(-96, -277.128113)":"Sand","(-96, -166.276871)":"Sand","(-96, -55.425625)":"Sand","(-96, 55.425625)":"Grass","(-96, 166.276871)":"Sand","(-96, 277.128113)":"Grass","(-96, 387.97937)":"Sand","(0, -443.404999)":"Sand","(0, -332.553741)":"Grass","(0, -221.702499)":"Sand","(0, -110.85125)":"Grass","(0, 0)":"Grass","(0, 110.85125)":"Grass","(0, 221.702499)":"Grass","(0, 332.553741)":"Grass","(0, 443.404999)":"Sand","(96, -498.830627)":"Sand","(96, -387.97937)":"Grass","(96, -277.128113)":"Sand","(96, -166.276871)":"Grass","(96, -55.425625)":"Grass","(96, 55.425625)":"Grass","(96, 166.276871)":"Grass","(96, 277.128113)":"Grass","(96, 387.97937)":"Grass","(96, 498.830597)":"Sand","(192, -443.404999)":"Sand","(192, -332.553741)":"Grass","(192, -221.702499)":"Sand","(192, -110.85125)":"Grass","(192, 0)":"Grass","(192, 110.85125)":"Grass","(192, 221.702484)":"Grass","(192, 332.553741)":"Grass","(192, 443.404968)":"Sand","(288, -498.830627)":"Sand","(288, -387.97937)":"Grass","(288, -277.128113)":"Grass","(288, -166.276871)":"Grass","(288, -55.425621)":"Grass","(288, 55.425629)":"Grass","(288, 166.276871)":"Grass","(288, 277.128113)":"Sand","(288, 387.97937)":"Sand","(384, -554.256226)":"Sand","(384, -443.404999)":"Sand","(384, -332.553741)":"Grass","(384, -221.702499)":"Grass","(384, -110.85125)":"Grass","(384, 0)":"Grass","(384, 110.851242)":"Grass","(384, 221.702499)":"Sand","(384, 332.553711)":"Sand","(480, -498.830627)":"Sand","(480, -387.97937)":"Sand","(480, -277.128113)":"Grass","(480, -166.276855)":"Grass","(480, -55.425613)":"Grass","(480, 55.425629)":"Grass","(480, 166.276886)":"Grass","(480, 277.128113)":"Sand","(576, -443.404999)":"Sand","(576, -332.553741)":"Grass","(576, -221.702484)":"Grass","(576, -110.851242)":"Grass","(576, 0)":"Grass","(576, 110.851257)":"Grass","(576, 221.702484)":"Sand","(672, -387.97937)":"Sand","(672, -277.128113)":"Grass","(672, -166.276871)":"Sand","(672, -55.425629)":"Sand","(672, 55.425629)":"Grass","(672, 166.276855)":"Sand","(768, -332.553741)":"Sand","(768, -221.702499)":"Sand","(768, 0)":"Sand","(768, 110.851227)":"Sand"}

View File

@ -0,0 +1 @@
{"(-480, -387.97937)":"Sand","(-480, -277.128113)":"Sand","(-480, -166.276886)":"Sand","(-384, -443.404968)":"Sand","(-384, -332.553711)":"Grass","(-384, -221.702499)":"Sand","(-384, -110.851242)":"Sand","(-288, -498.830627)":"Sand","(-288, -387.97937)":"Grass","(-288, -277.128113)":"Grass","(-288, -166.276871)":"Grass","(-288, -55.425629)":"Sand","(-288, 720.533081)":"Sand","(-192, -443.404968)":"Sand","(-192, -332.553741)":"Grass","(-192, -221.702484)":"Grass","(-192, -110.85125)":"Grass","(-192, 0)":"Sand","(-192, 443.404999)":"Sand","(-192, 554.256226)":"Sand","(-192, 665.107483)":"Sand","(-192, 775.95874)":"Sand","(-96, -387.97937)":"Sand","(-96, -277.128113)":"Grass","(-96, -166.276871)":"Grass","(-96, -55.425625)":"Grass","(-96, 55.425625)":"Sand","(-96, 166.276871)":"Sand","(-96, 277.128113)":"Sand","(-96, 387.97937)":"Sand","(-96, 498.830627)":"Grass","(-96, 609.681824)":"Grass","(-96, 720.533081)":"Grass","(-96, 831.384338)":"Sand","(0, -443.404999)":"Sand","(0, -332.553741)":"Grass","(0, -221.702499)":"Grass","(0, -110.85125)":"Grass","(0, 0)":"Grass","(0, 110.85125)":"Grass","(0, 221.702499)":"Grass","(0, 332.553741)":"Grass","(0, 443.404999)":"Grass","(0, 554.256226)":"Grass","(0, 665.107483)":"Grass","(0, 775.95874)":"Grass","(0, 886.809998)":"Sand","(96, -498.830627)":"Sand","(96, -387.97937)":"Grass","(96, -277.128113)":"Grass","(96, -166.276871)":"Grass","(96, -55.425625)":"Grass","(96, 55.425625)":"Grass","(96, 166.276871)":"Grass","(96, 277.128113)":"Grass","(96, 387.97937)":"Grass","(96, 498.830597)":"Grass","(96, 609.681885)":"Grass","(96, 720.533142)":"Grass","(96, 831.384399)":"Sand","(96, 942.235657)":"Sand","(192, -554.256226)":"Sand","(192, -443.404999)":"Grass","(192, -332.553741)":"Grass","(192, -221.702499)":"Grass","(192, -110.85125)":"Grass","(192, 0)":"Grass","(192, 110.85125)":"Grass","(192, 221.702484)":"Grass","(192, 332.553741)":"Grass","(192, 443.404968)":"Grass","(192, 554.256226)":"Grass","(192, 665.107483)":"Grass","(192, 775.95874)":"Grass","(192, 886.809998)":"Sand","(288, -498.830627)":"Sand","(288, -387.97937)":"Grass","(288, -277.128113)":"Grass","(288, -166.276871)":"Grass","(288, -55.425621)":"Grass","(288, 55.425629)":"Sand","(288, 166.276871)":"Sand","(288, 277.128113)":"Sand","(288, 387.97937)":"Grass","(288, 498.830627)":"Grass","(288, 609.681885)":"Grass","(288, 720.533142)":"Grass","(288, 831.384399)":"Sand","(384, -443.404999)":"Sand","(384, -332.553741)":"Grass","(384, -221.702499)":"Grass","(384, -110.85125)":"Grass","(384, 0)":"Sand","(384, 332.553711)":"Sand","(384, 443.404968)":"Sand","(384, 554.256226)":"Grass","(384, 665.107483)":"Grass","(384, 775.95874)":"Sand","(480, -498.830627)":"Sand","(480, -387.97937)":"Sand","(480, -277.128113)":"Grass","(480, -166.276855)":"Grass","(480, -55.425613)":"Sand","(480, 498.830627)":"Sand","(480, 609.681885)":"Grass","(480, 720.533142)":"Sand","(576, -443.404999)":"Sand","(576, -332.553741)":"Grass","(576, -221.702484)":"Sand","(576, -110.851242)":"Sand","(576, 554.256226)":"Sand","(576, 665.107544)":"Sand","(672, -387.97937)":"Sand","(672, -277.128113)":"Sand"}

View File

@ -15,7 +15,8 @@ _global_script_class_icons={
[application]
config/name="LilPirateTreasureHunt"
config/name="Pirate Treasure Hunt"
run/main_scene="res://scenes/Game.tscn"
config/icon="res://icon.png"
[autoload]

View File

@ -128,6 +128,7 @@ func check_island_location_valid(new_island):
func generate():
PlayerChar.transform.origin = Vector2.ZERO
PlayerChar.position = Vector2.ZERO
PlayerChar.target = Vector2.ZERO
var rng = RandomNumberGenerator.new()
rng.randomize()
@ -139,8 +140,8 @@ func generate():
for i in range (num_islands):
var island = Island.new()
var island_index = i % 4
var file_name = "user://pirate_game_island_" + str(island_index) + ".island"
var island_index = i % 5
var file_name = "res://islands/pirate_game_island_" + str(island_index) + ".island"
island.load_island(file_name)
var rand_coord = Vector2(rng.randi_range(-radius, radius), rng.randi_range(-radius, radius))