root_scene.tscn 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. [gd_scene load_steps=8 format=3 uid="uid://bb2d2pg141px2"]
  2. [ext_resource type="Material" uid="uid://wmxpt4du7a7o" path="res://materials/textured_block_material.tres" id="1_aaj47"]
  3. [ext_resource type="Script" path="res://player_controller.gd" id="1_sc6rc"]
  4. [ext_resource type="Material" uid="uid://ccvmfntb7w7un" path="res://materials/selection_material.tres" id="4_y6f8l"]
  5. [ext_resource type="Texture2D" uid="uid://o1xfqjo1nbsw" path="res://textures/crosshair.png" id="5_r8a1l"]
  6. [ext_resource type="Environment" uid="uid://bh13kcd0h21o6" path="res://env/world_env.tres" id="6_2njup"]
  7. [sub_resource type="CapsuleMesh" id="CapsuleMesh_hk3se"]
  8. radius = 0.3
  9. height = 1.7
  10. [sub_resource type="BoxMesh" id="BoxMesh_yunsl"]
  11. material = ExtResource("4_y6f8l")
  12. size = Vector3(1.05, 1.05, 1.05)
  13. [node name="Root" type="Node"]
  14. [node name="CraftdigBridge" type="CraftdigBridge" parent="." node_paths=PackedStringArray("player", "camera", "selection", "lbl_coords", "lbl_blkty")]
  15. chunk_update_rate = 128
  16. init_world_script = "
  17. p 0 0 0
  18. filllayer s
  19. up
  20. filllayer s
  21. up
  22. filllayer d
  23. up
  24. filllayer g
  25. up
  26. # do a weird shape like this:
  27. # @
  28. # @@@@
  29. p 5 4 5
  30. setmx c
  31. setmx c
  32. setmx c
  33. setmx c
  34. p 6 5 5
  35. set g
  36. # and then another block next to it
  37. p 6 4 7
  38. set c
  39. write
  40. "
  41. player = NodePath("../CharacterBody3D")
  42. camera = NodePath("../CharacterBody3D/Camera3D")
  43. selection = NodePath("../Selection")
  44. block_mat = ExtResource("1_aaj47")
  45. lbl_coords = NodePath("../Coords")
  46. lbl_blkty = NodePath("../SelBlock")
  47. [node name="ChunksRoot" type="Node3D" parent="CraftdigBridge"]
  48. [node name="CharacterBody3D" type="CharacterBody3D" parent="."]
  49. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 20, 5, 1)
  50. script = ExtResource("1_sc6rc")
  51. jump_vel = 35.0
  52. [node name="Camera3D" type="Camera3D" parent="CharacterBody3D"]
  53. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.5, 0)
  54. fov = 85.0
  55. [node name="MeshInstance3D" type="MeshInstance3D" parent="CharacterBody3D"]
  56. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0)
  57. mesh = SubResource("CapsuleMesh_hk3se")
  58. skeleton = NodePath("")
  59. [node name="DirectionalLight3D" type="DirectionalLight3D" parent="."]
  60. transform = Transform3D(0.516967, -0.525973, 0.67535, 0, 0.788955, 0.614451, -0.856005, -0.31765, 0.407864, 8.55806, 7.36706, 4.01961)
  61. [node name="Selection" type="Node3D" parent="."]
  62. [node name="SelectionBox" type="MeshInstance3D" parent="Selection"]
  63. transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.5, 0.5, 0.5)
  64. mesh = SubResource("BoxMesh_yunsl")
  65. skeleton = NodePath("")
  66. metadata/_edit_lock_ = true
  67. [node name="SelBlock" type="Label" parent="."]
  68. offset_left = 12.0
  69. offset_top = 56.0
  70. offset_right = 136.0
  71. offset_bottom = 88.0
  72. text = "cobblestone"
  73. [node name="Coords" type="Label" parent="."]
  74. offset_left = 12.0
  75. offset_top = 12.0
  76. offset_right = 184.0
  77. offset_bottom = 44.0
  78. text = "X 123 / Y 3 / Z 789"
  79. [node name="TextureRect" type="TextureRect" parent="."]
  80. texture_filter = 1
  81. anchors_preset = 8
  82. anchor_left = 0.5
  83. anchor_top = 0.5
  84. anchor_right = 0.5
  85. anchor_bottom = 0.5
  86. offset_left = -64.0
  87. offset_top = -64.0
  88. offset_right = 64.0
  89. offset_bottom = 64.0
  90. grow_horizontal = 2
  91. grow_vertical = 2
  92. texture = ExtResource("5_r8a1l")
  93. [node name="WorldEnvironment" type="WorldEnvironment" parent="."]
  94. environment = ExtResource("6_2njup")