diff --git a/HEADS b/HEADS index 40123d64..672827b7 100644 --- a/HEADS +++ b/HEADS @@ -1 +1 @@ -{"engine": "269eb5f06c8874e1257137eabe121d4501758ded", "world_generator": "e5f5d205f8aea478294ad4796b0f3c771dd7e7cf", "entity_spell_system": "6f3744e2cbd4ba8c0ac7c331876c2d7a28beb4b2", "ui_extensions": "8a81cc53100c5a138fbaf927080410025c64c88e", "voxelman": "01bb4927607e4bb937e9f8d066f3c1b5f6ba1e3b", "texture_packer": "8d3b160f02054323a1dc4a9bc8b7e1c44fc57753", "fastnoise": "41b7ea05a1f7aa2b8ecddaa1fd739e64d6970f7e", "entity-spell-system-addons": "d60e746b158d3ebf9d2ea306af1dd24bcae49be5", "mesh_data_resource": "3fedb4c8534af36d89a1a1a34a6b5ed4d333927a", "ess_data": "3bd637fdd3304b64a18287a49a6b7387acf2f5de", "prop_tool": "df438053ebc900966f8f842fc65f0264f1271d49"} \ No newline at end of file +{"engine": "083f68ebf48ef44599bad864f6ce5c9301bd400b", "world_generator": "e5f5d205f8aea478294ad4796b0f3c771dd7e7cf", "entity_spell_system": "6f3744e2cbd4ba8c0ac7c331876c2d7a28beb4b2", "ui_extensions": "8a81cc53100c5a138fbaf927080410025c64c88e", "voxelman": "2b9f28e5739d5163a27fcf97b404d670b41be4eb", "texture_packer": "8d3b160f02054323a1dc4a9bc8b7e1c44fc57753", "fastnoise": "41b7ea05a1f7aa2b8ecddaa1fd739e64d6970f7e", "entity-spell-system-addons": "d60e746b158d3ebf9d2ea306af1dd24bcae49be5", "mesh_data_resource": "7bef6db99e52e2340d5d655c16d27c7bbe999247", "ess_data": "3bd637fdd3304b64a18287a49a6b7387acf2f5de", "prop_tool": "df438053ebc900966f8f842fc65f0264f1271d49"} \ No newline at end of file diff --git a/game/data/voxel_surfaces/2_test.tres b/game/data/voxel_surfaces/2_test.tres index 6d7309f6..cddd68df 100644 --- a/game/data/voxel_surfaces/2_test.tres +++ b/game/data/voxel_surfaces/2_test.tres @@ -1,6 +1,6 @@ [gd_resource type="VoxelSurfaceMerger" load_steps=2 format=2] -[ext_resource path="res://data/voxel_textures/Rock24_col.png" type="Texture" id=1] +[ext_resource path="res://data/voxel_textures/Rock24_col2.png" type="Texture" id=1] [resource] resource_name = "Test" diff --git a/game/data/voxel_surfaces/3_test2.tres b/game/data/voxel_surfaces/3_test2.tres index fd35d529..08954e6d 100644 --- a/game/data/voxel_surfaces/3_test2.tres +++ b/game/data/voxel_surfaces/3_test2.tres @@ -1,6 +1,6 @@ [gd_resource type="VoxelSurfaceMerger" load_steps=2 format=2] -[ext_resource path="res://data/voxel_textures/Ground03_col.png" type="Texture" id=1] +[ext_resource path="res://data/voxel_textures/Ground03_col2.png" type="Texture" id=1] [resource] resource_name = "Test2" diff --git a/game/data/voxel_textures/Ground03_col2.png b/game/data/voxel_textures/Ground03_col2.png new file mode 100644 index 00000000..1779f32f Binary files /dev/null and b/game/data/voxel_textures/Ground03_col2.png differ diff --git a/game/data/voxel_textures/Ground03_col2.png.import b/game/data/voxel_textures/Ground03_col2.png.import new file mode 100644 index 00000000..5ada44c6 --- /dev/null +++ b/game/data/voxel_textures/Ground03_col2.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/Ground03_col2.png-8e6b105ba2bca96f6345fd816abd4b8e.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://data/voxel_textures/Ground03_col2.png" +dest_files=[ "res://.import/Ground03_col2.png-8e6b105ba2bca96f6345fd816abd4b8e.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=false +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=false +svg/scale=1.0 diff --git a/game/data/voxel_textures/Rock24_col2.png b/game/data/voxel_textures/Rock24_col2.png new file mode 100644 index 00000000..65d8db7f Binary files /dev/null and b/game/data/voxel_textures/Rock24_col2.png differ diff --git a/game/data/voxel_textures/Rock24_col2.png.import b/game/data/voxel_textures/Rock24_col2.png.import new file mode 100644 index 00000000..6e64d1ca --- /dev/null +++ b/game/data/voxel_textures/Rock24_col2.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/Rock24_col2.png-550377381889900c805e3a85cc80c40a.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://data/voxel_textures/Rock24_col2.png" +dest_files=[ "res://.import/Rock24_col2.png-550377381889900c805e3a85cc80c40a.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=false +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=false +svg/scale=1.0 diff --git a/game/scenes/Menu.tscn b/game/scenes/Menu.tscn index 99c60359..694d9b38 100644 --- a/game/scenes/Menu.tscn +++ b/game/scenes/Menu.tscn @@ -550,7 +550,7 @@ margin_bottom = 127.5 visible = false [node name="Char" type="Spatial" parent="."] -transform = Transform( 0.359313, 0, 0.933217, 0, 1, 0, -0.933217, 0, 0.359313, -2.44425, 2.36948, 0 ) +transform = Transform( 0.359313, 0, 0.933217, 0, 1, 0, -0.933217, 0, 0.359313, -2.44425, 0.926699, 0 ) [node name="CharacterDisplay" type="Spatial" parent="Char"] transform = Transform( 1, 0, 0, 0, 0.990268, -0.139173, 0, 0.139173, 0.990268, 0, 0, 0 ) @@ -566,7 +566,6 @@ use_threads = false max_concurrent_generations = 1 library = ExtResource( 17 ) level_generator = SubResource( 1 ) -voxel_scale = 3.0 chunk_spawn_range = 1 script = ExtResource( 16 ) show_loading_screen = false diff --git a/game/scenes/World.tscn b/game/scenes/World.tscn index c26d0f3e..3219f6ff 100644 --- a/game/scenes/World.tscn +++ b/game/scenes/World.tscn @@ -60,7 +60,6 @@ use_threads = false max_concurrent_generations = 1 library = ExtResource( 2 ) level_generator = SubResource( 1 ) -voxel_scale = 3.0 chunk_spawn_range = 3 script = ExtResource( 8 ) diff --git a/game/scripts/biomes/simple_biome.gd b/game/scripts/biomes/simple_biome.gd index 491802ee..9e3c1f59 100644 --- a/game/scripts/biomes/simple_biome.gd +++ b/game/scripts/biomes/simple_biome.gd @@ -32,19 +32,19 @@ func generate_terrarin(chunk : VoxelChunk, spawn_mobs: bool) -> void: var noise : OpenSimplexNoise = OpenSimplexNoise.new() noise.seed = 10 * current_seed noise.octaves = 4 - noise.period = 180.0 + noise.period = 280.0 noise.persistence = 0.8 var terr_noise : OpenSimplexNoise = OpenSimplexNoise.new() terr_noise.seed = 10 * 321 + 112 * current_seed terr_noise.octaves = 4 - terr_noise.period = 20.0 + terr_noise.period = 90.0 terr_noise.persistence = 0.9 var det_noise : OpenSimplexNoise = OpenSimplexNoise.new() det_noise.seed = 10 * 3231 + 112 * current_seed det_noise.octaves = 6 - det_noise.period = 10.0 + det_noise.period = 80.0 det_noise.persistence = 0.3 for x in range(0, chunk.size_x + 1): diff --git a/game/voxelman/transvoxel_mesher/TVVoxelChunk.gd b/game/voxelman/transvoxel_mesher/TVVoxelChunk.gd index 1efe82f4..7dd02d6d 100644 --- a/game/voxelman/transvoxel_mesher/TVVoxelChunk.gd +++ b/game/voxelman/transvoxel_mesher/TVVoxelChunk.gd @@ -229,7 +229,7 @@ func generate_random_ao() -> void: var noise : OpenSimplexNoise = OpenSimplexNoise.new() noise.seed = 123 noise.octaves = 4 - noise.period = 6 + noise.period = 30 noise.persistence = 0.3 for x in range(0, size_x + 1): diff --git a/game/voxelman/transvoxel_mesher/TVVoxelMesher.gd b/game/voxelman/transvoxel_mesher/TVVoxelMesher.gd index e21358f8..30f6d3e2 100644 --- a/game/voxelman/transvoxel_mesher/TVVoxelMesher.gd +++ b/game/voxelman/transvoxel_mesher/TVVoxelMesher.gd @@ -51,6 +51,8 @@ var lod_data : Array = [ 1 #CHUNK_INDEX_BACK ] +const TEXTURE_SCALE = 4 + func get_case_code(buffer : VoxelChunk, x : int, y : int, z : int, size : int = 1) -> int: var case_code : int = 0 @@ -263,7 +265,7 @@ func add_buffer_normal(buffer : VoxelChunk) -> void: uv.x += umargin.position.x uv.y += umargin.position.y - add_uv(surface.transform_uv(VoxelSurface.VOXEL_SIDE_SIDE, uv)) + add_uv(surface.transform_uv_scaled(VoxelSurface.VOXEL_SIDE_SIDE, uv, x % TEXTURE_SCALE, z % TEXTURE_SCALE, TEXTURE_SCALE)) elif (bz + 0.0001 > bx and bz + 0.0001 > by): var uv : Vector2 = Vector2(s.z, t.z) var umargin : Rect2 = uv_margin @@ -273,7 +275,7 @@ func add_buffer_normal(buffer : VoxelChunk) -> void: uv.x += umargin.position.x uv.y += umargin.position.y - add_uv(surface.transform_uv(VoxelSurface.VOXEL_SIDE_SIDE, uv)) + add_uv(surface.transform_uv_scaled(VoxelSurface.VOXEL_SIDE_SIDE, uv, x % TEXTURE_SCALE, z % TEXTURE_SCALE, TEXTURE_SCALE)) else: var uv : Vector2 = Vector2(s.y, t.y) var umargin : Rect2 = uv_margin @@ -283,7 +285,7 @@ func add_buffer_normal(buffer : VoxelChunk) -> void: uv.x += umargin.position.x uv.y += umargin.position.y - add_uv(surface.transform_uv(VoxelSurface.VOXEL_SIDE_TOP, uv)) + add_uv(surface.transform_uv_scaled(VoxelSurface.VOXEL_SIDE_TOP, uv, x % TEXTURE_SCALE, z % TEXTURE_SCALE, TEXTURE_SCALE)) for i in range(len(temp_verts)):