diff --git a/README.md b/README.md index b2bb2d0..9256c6a 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,7 @@ Things and ideas I'd like to implement - Sea - Desert - Mountains +- Daylight cycle - Make a tutorial - Add animals - Make humans and their belongings: diff --git a/materials/lake_tile.tres b/materials/lake_tile.tres index 82b120c..bb0dc20 100644 --- a/materials/lake_tile.tres +++ b/materials/lake_tile.tres @@ -6,3 +6,4 @@ resource_name = "Material" cull_mode = 2 albedo_texture = ExtResource("1_exj7t") +texture_filter = 1 diff --git a/materials/plain_tile.tres b/materials/plain_tile.tres index 4e1e7ce..594b209 100644 --- a/materials/plain_tile.tres +++ b/materials/plain_tile.tres @@ -6,3 +6,7 @@ resource_name = "Material" cull_mode = 2 albedo_texture = ExtResource("1_nijc4") +metallic_specular = 0.05 +roughness = 0.39 +texture_filter = 1 +proximity_fade_distance = 17.0 diff --git a/models/blend/tile-empty.blend b/models/blend/tile-empty.blend index 751a49b..68853c1 100644 Binary files a/models/blend/tile-empty.blend and b/models/blend/tile-empty.blend differ diff --git a/models/blend/tile-empty.blend1 b/models/blend/tile-empty.blend1 index 665ed96..751a49b 100644 Binary files a/models/blend/tile-empty.blend1 and b/models/blend/tile-empty.blend1 differ diff --git a/models/textures/tile-plain.png b/models/textures/tile-plain.png index 4da2e41..7047c53 100644 Binary files a/models/textures/tile-plain.png and b/models/textures/tile-plain.png differ diff --git a/project.godot b/project.godot index 538c3f9..f6d699d 100644 --- a/project.godot +++ b/project.godot @@ -86,3 +86,7 @@ ingame_menu={ "events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194305,"key_label":0,"unicode":0,"echo":false,"script":null) ] } + +[rendering] + +anti_aliasing/quality/msaa_2d=3 diff --git a/scripts/Tile.gd b/scripts/Tile.gd index 0f25bc7..3a04a7a 100644 --- a/scripts/Tile.gd +++ b/scripts/Tile.gd @@ -25,21 +25,28 @@ var tile_materials = [ # must be in the same order as an enum above! var maximum_decoration_objects = 0 -func generate_predictable_random(min, max, salt): +func generate_predictable_random_int(min, max, salt): seed((str(World.world_info.seed) + str(position) + str(salt)).hash()) return randi() % (max + 1) + min +func generate_predictable_random_float(min, max, salt): + seed((str(World.world_info.seed) + str(position) + str(salt)).hash()) + return clamp(randf(), min, max) + func generate_decoration_objects(): match tile_type: TileType.Forest: var key = TileType.keys()[tile_type] - maximum_decoration_objects = generate_predictable_random(decorations[key]["min"], decorations[key]["max"], ""); + maximum_decoration_objects = generate_predictable_random_int(decorations[key]["min"], decorations[key]["max"], ""); for i in range(0, maximum_decoration_objects): var decoration = decorations[TileType.keys()[tile_type]]["object"].instantiate() - var pos = Vector3(generate_predictable_random(0, 10, str(i) + "x") - 5, 0, generate_predictable_random(0, 10, str(i) + "z") - 5) - var y_rot = generate_predictable_random(0, 360, str(i) + "rot_y") + var pos = Vector3(generate_predictable_random_int(0, 10, str(i) + "x") - 5, 0, generate_predictable_random_int(0, 10, str(i) + "z") - 5) + + var scale = generate_predictable_random_float(0.05, 0.15, str(i) + "scale") + var y_rot = generate_predictable_random_int(0, 360, str(i) + "rot_y") decoration.rotation.y = y_rot decoration.position = pos + decoration.scale = Vector3(scale, scale, scale) decoration.add_to_group("Decoration") add_child(decoration) @@ -71,8 +78,8 @@ func get_empty_dirs_around(): if !result_north: empty_tiles_around.push_back("north") if !result_south: empty_tiles_around.push_back("south") if !result_west: empty_tiles_around.push_back("west") - if !result_east: empty_tiles_around.push_back("east") + if !result_east: empty_tiles_around.push_back("east") return empty_tiles_around func save():