diff --git a/HEADS b/HEADS index 0a5cabe..718969e 100644 --- a/HEADS +++ b/HEADS @@ -1 +1 @@ -{"engine": {"3.2": "64a9e86c5c20bd4bd5833f0563457d0126617489", "3.x": "9f743429d4196bc501c982d6ea7e49eb7ce37f22"}, "world_generator": {"master": "260c430f11b0b591eaf4714516419aa327d2842c"}, "entity_spell_system": {"master": "3536f01bacf5f54cefb32b768cd020a1f94d0ade"}, "ui_extensions": {"master": "80a3b96fc56991a0f88a1d441ed1e3cebaf3307a"}, "texture_packer": {"master": "ae4d222fbaade063ed6f0bc9f3aaa53df68a7fed"}, "fastnoise": {"master": "46bb1f610bfb7171613b5c708d312bcf94e89356"}, "thread_pool": {"master": "0917511d04bb1aa308385b63ec88d3c182990628"}, "mesh_data_resource": {"master": "a062d871d49d954c5466b9de54b4075cb61cbef4"}, "mesh_utils": {"master": "b52a261c31f04fad624e5cfbcdcc4a45d61136da"}, "props": {"master": "2afd6eff45f9a921bdf4090ff3029def86df5cb5"}, "terraman_2d": {"master": "0298d0216fcdb4ab51a7b7838d5504b3b1a5d205"}, "broken_seals_module": {"master": "52c5a81350db1c29d375c63d95010260911ec034"}, "rtile_map": {"master": "389070cfef387b69902e23e6c4ac53997b69e42e"}, "props_2d": {"master": "a45822b63519d7f9fb391ab6b1dced468c6f399d"}} \ No newline at end of file +{"engine": {"3.2": "64a9e86c5c20bd4bd5833f0563457d0126617489", "3.x": "9f743429d4196bc501c982d6ea7e49eb7ce37f22"}, "world_generator": {"master": "260c430f11b0b591eaf4714516419aa327d2842c"}, "entity_spell_system": {"master": "3536f01bacf5f54cefb32b768cd020a1f94d0ade"}, "ui_extensions": {"master": "80a3b96fc56991a0f88a1d441ed1e3cebaf3307a"}, "texture_packer": {"master": "ae4d222fbaade063ed6f0bc9f3aaa53df68a7fed"}, "fastnoise": {"master": "46bb1f610bfb7171613b5c708d312bcf94e89356"}, "thread_pool": {"master": "0917511d04bb1aa308385b63ec88d3c182990628"}, "mesh_data_resource": {"master": "a062d871d49d954c5466b9de54b4075cb61cbef4"}, "mesh_utils": {"master": "b52a261c31f04fad624e5cfbcdcc4a45d61136da"}, "props": {"master": "2afd6eff45f9a921bdf4090ff3029def86df5cb5"}, "terraman_2d": {"master": "196d19f074f33521cb587378ec45016b0585dc15"}, "broken_seals_module": {"master": "52c5a81350db1c29d375c63d95010260911ec034"}, "rtile_map": {"master": "389070cfef387b69902e23e6c4ac53997b69e42e"}, "props_2d": {"master": "a45822b63519d7f9fb391ab6b1dced468c6f399d"}} \ No newline at end of file diff --git a/game/scenes/terra_2d_world/Terrain2DWorldBlocky.tscn b/game/scenes/terra_2d_world/Terrain2DWorldBlocky.tscn index b538e1e..43bfe7b 100644 --- a/game/scenes/terra_2d_world/Terrain2DWorldBlocky.tscn +++ b/game/scenes/terra_2d_world/Terrain2DWorldBlocky.tscn @@ -7,6 +7,10 @@ [node name="Terrain2DWorldBlocky" type="Terrain2DWorldBlocky" groups=["save"]] library = ExtResource( 2 ) level_generator = ExtResource( 3 ) -get_custom_transform = Transform2D( 1, 0.5, -1, 0.5, 0, 0 ) +mesh_transform_terrain = Transform2D( 1, 0.5, -1, 0.5, 0, 0 ) +mesh_transform_wall_north = Transform2D( 1, 0.5, 0, 1.2, 0, 16 ) +mesh_transform_wall_south = Transform2D( 1, 0.5, 0, 1.2, 0, 0 ) +mesh_transform_wall_east = Transform2D( 1, -0.5, 0, 1.2, 0, 0 ) +mesh_transform_wall_west = Transform2D( 1, -0.5, 0, 1.2, 0, 16 ) build_flags = 127 script = ExtResource( 1 ) diff --git a/game/scenes/terra_2d_world/Terrain2DWorldBlockyGD.gd b/game/scenes/terra_2d_world/Terrain2DWorldBlockyGD.gd index cdac7ca..db6eeb8 100644 --- a/game/scenes/terra_2d_world/Terrain2DWorldBlockyGD.gd +++ b/game/scenes/terra_2d_world/Terrain2DWorldBlockyGD.gd @@ -75,12 +75,17 @@ func _create_chunk(x, y, chunk): var pj : Terrain2DProp2DJob = Terrain2DProp2DJob.new() var mesher : Terrain2DMesherBlocky = Terrain2DMesherBlocky.new() + mesher.base_light_value = 0.5 + mesher.ao_strength = 0.25 mesher.texture_scale = 4 tj.set_mesher(mesher) var liquid_mesher : Terrain2DMesherBlocky = Terrain2DMesherBlocky.new() + liquid_mesher.base_light_value = 0.5 + liquid_mesher.ao_strength = 0.25 liquid_mesher.set_channel_index_type(Terrain2DChunkDefault.DEFAULT_CHANNEL_LIQUID_TYPE) + liquid_mesher.texture_scale = 4 tj.set_liquid_mesher(liquid_mesher) pj.set_prop_mesher(Terrain2DMesherBlocky.new()) diff --git a/game/scenes/terra_2d_world/levelgen.gd b/game/scenes/terra_2d_world/levelgen.gd index dc11bd2..17a137b 100644 --- a/game/scenes/terra_2d_world/levelgen.gd +++ b/game/scenes/terra_2d_world/levelgen.gd @@ -4,7 +4,32 @@ extends Terrain2DLevelGenerator func _generate_chunk(chunk : Terrain2DChunk): chunk.channel_ensure_allocated(Terrain2DChunkDefault.DEFAULT_CHANNEL_TYPE, 1) + chunk.channel_ensure_allocated(Terrain2DChunkDefault.DEFAULT_CHANNEL_FLAGS, 0) chunk.set_voxel(2, 0, 0, Terrain2DChunkDefault.DEFAULT_CHANNEL_TYPE) chunk.set_voxel(3, 1, 0, Terrain2DChunkDefault.DEFAULT_CHANNEL_TYPE) chunk.set_voxel(4, 1, 1, Terrain2DChunkDefault.DEFAULT_CHANNEL_TYPE) + chunk.set_voxel(1, 0, 1, Terrain2DChunkDefault.DEFAULT_CHANNEL_TYPE) + + var def_flag : int = Terrain2DChunkDefault.FLAG_CHANNEL_WALL_NORTH | Terrain2DChunkDefault.FLAG_CHANNEL_WALL_SOUTH | Terrain2DChunkDefault.FLAG_CHANNEL_WALL_EAST | Terrain2DChunkDefault.FLAG_CHANNEL_WALL_WEST #| Terrain2DChunkDefault.FLAG_CHANNEL_WALL_HOLE + var def_flag_back : int = Terrain2DChunkDefault.FLAG_CHANNEL_WALL_NORTH | Terrain2DChunkDefault.FLAG_CHANNEL_WALL_WEST #| Terrain2DChunkDefault.FLAG_CHANNEL_WALL_HOLE + + chunk.set_voxel(3, 3, 3, Terrain2DChunkDefault.DEFAULT_CHANNEL_TYPE) + chunk.set_voxel(def_flag_back, 3, 3, Terrain2DChunkDefault.DEFAULT_CHANNEL_FLAGS) + + chunk.set_voxel(3, 4, 6, Terrain2DChunkDefault.DEFAULT_CHANNEL_TYPE) + chunk.set_voxel(def_flag, 4, 6, Terrain2DChunkDefault.DEFAULT_CHANNEL_FLAGS) + + #chunk.set_voxel(1, 3, 4, Terrain2DChunkDefault.DEFAULT_CHANNEL_TYPE) + #chunk.set_voxel(def_flag, 3, 4, Terrain2DChunkDefault.DEFAULT_CHANNEL_FLAGS) + + +# chunk.set_voxel(1, 3, 3, Terrain2DChunkDefault.DEFAULT_CHANNEL_TYPE) +# chunk.set_voxel(Terrain2DChunkDefault.FLAG_CHANNEL_WALL_EAST, 3, 5, Terrain2DChunkDefault.DEFAULT_CHANNEL_FLAGS) +# chunk.set_voxel(1, 3, 3, Terrain2DChunkDefault.DEFAULT_CHANNEL_TYPE) +# chunk.set_voxel(Terrain2DChunkDefault.FLAG_CHANNEL_WALL_EAST, 3, 5, Terrain2DChunkDefault.DEFAULT_CHANNEL_FLAGS) +# +# chunk.set_voxel(Terrain2DChunkDefault.FLAG_CHANNEL_WALL_SOUTH, 6, 4, Terrain2DChunkDefault.DEFAULT_CHANNEL_FLAGS) +# chunk.set_voxel(Terrain2DChunkDefault.FLAG_CHANNEL_WALL_SOUTH, 7, 4, Terrain2DChunkDefault.DEFAULT_CHANNEL_FLAGS) +# chunk.set_voxel(Terrain2DChunkDefault.FLAG_CHANNEL_WALL_WEST, 8, 4, Terrain2DChunkDefault.DEFAULT_CHANNEL_FLAGS) +# chunk.set_voxel(Terrain2DChunkDefault.FLAG_CHANNEL_WALL_WEST, 9, 4, Terrain2DChunkDefault.DEFAULT_CHANNEL_FLAGS)