jtatman commited on
Commit
333317a
·
verified ·
1 Parent(s): 015faa0

Upload folder using huggingface_hub

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .gitattributes +2 -0
  2. AIController.gd +93 -0
  3. ExtendedRaycastSensor.gd +34 -0
  4. FlyCam.gd +37 -0
  5. Objects.gd +10 -0
  6. OrbitCam.gd +17 -0
  7. PlayerHitBox.gd +4 -0
  8. README.md +25 -0
  9. Run.gd +22 -0
  10. SpawnPoint.gd +3 -0
  11. addons/godot_rl_agents/controller/ai_controller_2d.gd +82 -0
  12. addons/godot_rl_agents/controller/ai_controller_3d.gd +80 -0
  13. addons/godot_rl_agents/godot_rl_agents.gd +16 -0
  14. addons/godot_rl_agents/icon.png +3 -0
  15. addons/godot_rl_agents/onnx/csharp/ONNXInference.cs +103 -0
  16. addons/godot_rl_agents/onnx/csharp/SessionConfigurator.cs +131 -0
  17. addons/godot_rl_agents/onnx/csharp/docs/ONNXInference.xml +31 -0
  18. addons/godot_rl_agents/onnx/csharp/docs/SessionConfigurator.xml +29 -0
  19. addons/godot_rl_agents/onnx/wrapper/ONNX_wrapper.gd +24 -0
  20. addons/godot_rl_agents/plugin.cfg +7 -0
  21. addons/godot_rl_agents/sensors/sensors_2d/ExampleRaycastSensor2D.tscn +48 -0
  22. addons/godot_rl_agents/sensors/sensors_2d/ISensor2D.gd +20 -0
  23. addons/godot_rl_agents/sensors/sensors_2d/RaycastSensor2D.gd +118 -0
  24. addons/godot_rl_agents/sensors/sensors_2d/RaycastSensor2D.tscn +7 -0
  25. addons/godot_rl_agents/sensors/sensors_3d/ExampleRaycastSensor3D.tscn +6 -0
  26. addons/godot_rl_agents/sensors/sensors_3d/ISensor3D.gd +20 -0
  27. addons/godot_rl_agents/sensors/sensors_3d/RGBCameraSensor3D.gd +11 -0
  28. addons/godot_rl_agents/sensors/sensors_3d/RGBCameraSensor3D.tscn +42 -0
  29. addons/godot_rl_agents/sensors/sensors_3d/RaycastSensor3D.gd +166 -0
  30. addons/godot_rl_agents/sensors/sensors_3d/RaycastSensor3D.tscn +33 -0
  31. addons/godot_rl_agents/sync.gd +338 -0
  32. animation_library/shooter_pro.res +0 -0
  33. assets/crosshair.xcf +0 -0
  34. assets/prototype_textures/PNG/Dark/texture_01.png +3 -0
  35. assets/prototype_textures/PNG/Dark/texture_02.png +3 -0
  36. assets/prototype_textures/PNG/Dark/texture_03.png +3 -0
  37. assets/prototype_textures/PNG/Dark/texture_04.png +3 -0
  38. assets/prototype_textures/PNG/Dark/texture_05.png +3 -0
  39. assets/prototype_textures/PNG/Dark/texture_06.png +3 -0
  40. assets/prototype_textures/PNG/Dark/texture_07.png +3 -0
  41. assets/prototype_textures/PNG/Dark/texture_08.png +3 -0
  42. assets/prototype_textures/PNG/Dark/texture_09.png +3 -0
  43. assets/prototype_textures/PNG/Dark/texture_10.png +3 -0
  44. assets/prototype_textures/PNG/Dark/texture_11.png +3 -0
  45. assets/prototype_textures/PNG/Dark/texture_12.png +3 -0
  46. assets/prototype_textures/PNG/Dark/texture_13.png +3 -0
  47. assets/prototype_textures/PNG/Green/texture_01.png +3 -0
  48. assets/prototype_textures/PNG/Green/texture_02.png +3 -0
  49. assets/prototype_textures/PNG/Green/texture_03.png +3 -0
  50. assets/prototype_textures/PNG/Green/texture_04.png +3 -0
.gitattributes CHANGED
@@ -56,3 +56,5 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
56
  # Video files - compressed
57
  *.mp4 filter=lfs diff=lfs merge=lfs -text
58
  *.webm filter=lfs diff=lfs merge=lfs -text
 
 
 
56
  # Video files - compressed
57
  *.mp4 filter=lfs diff=lfs merge=lfs -text
58
  *.webm filter=lfs diff=lfs merge=lfs -text
59
+ character.tscn filter=lfs diff=lfs merge=lfs -text
60
+ tbot_model.tres filter=lfs diff=lfs merge=lfs -text
AIController.gd ADDED
@@ -0,0 +1,93 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ extends AIController3D
2
+
3
+
4
+ # ------------------ Godot RL Agents Logic ------------------------------------#
5
+ # example actions
6
+
7
+ var movement_action := Vector2(0.0, 0.0)
8
+ var look_action := Vector2(0.0, 0.0)
9
+ var jump_action := false
10
+ var shoot_action := false
11
+
12
+ var n_steps_without_positive_reward = 0
13
+
14
+ @onready var wide_raycast_sensor = $WideRaycastSensor
15
+ @onready var narrow_raycast_sensor = $NarrowRaycastSensor
16
+
17
+ func init(player):
18
+ _player=player
19
+
20
+ func set_team(value):
21
+ wide_raycast_sensor.team = value
22
+ narrow_raycast_sensor.team = value
23
+ if value == 0:
24
+ wide_raycast_sensor.team_collision_mask = 8
25
+ wide_raycast_sensor.enemy_collision_mask = 16
26
+ narrow_raycast_sensor.team_collision_mask = 8
27
+ narrow_raycast_sensor.enemy_collision_mask = 16
28
+ elif value == 1:
29
+ wide_raycast_sensor.team_collision_mask = 16
30
+ wide_raycast_sensor.enemy_collision_mask = 8
31
+ narrow_raycast_sensor.team_collision_mask = 16
32
+ narrow_raycast_sensor.enemy_collision_mask = 8
33
+
34
+
35
+ func reset():
36
+ n_steps_without_positive_reward = 0
37
+ n_steps = 0
38
+
39
+ func get_obs():
40
+ var obs = []
41
+ obs.append_array(wide_raycast_sensor.get_observation())
42
+ obs.append_array(narrow_raycast_sensor.get_observation())
43
+ return {
44
+ "obs":obs
45
+ }
46
+
47
+ func get_reward():
48
+ var total_reward = reward + shaping_reward()
49
+ if total_reward <= 0.0:
50
+ n_steps_without_positive_reward += 1
51
+ else:
52
+ n_steps_without_positive_reward -= 1
53
+ n_steps_without_positive_reward = max(0, n_steps_without_positive_reward)
54
+ return total_reward
55
+
56
+
57
+ func shaping_reward():
58
+ var s_reward = 0.0
59
+ return s_reward
60
+
61
+
62
+ func get_action_space():
63
+ return {
64
+ "movement_action" : {
65
+ "size": 2,
66
+ "action_type": "continuous"
67
+ },
68
+ "look_action" : {
69
+ "size": 2,
70
+ "action_type": "continuous"
71
+ },
72
+ "jump_action" : {
73
+ "size": 2,
74
+ "action_type": "discrete"
75
+ },
76
+ "shoot_action" : {
77
+ "size": 2,
78
+ "action_type": "discrete"
79
+ },
80
+ }
81
+
82
+
83
+ func set_action(action):
84
+ movement_action = Vector2(clamp(action["movement_action"][0],-1.0,1.0), clamp(action["movement_action"][1],-1.0,1.0))
85
+ look_action = Vector2(clamp(action["look_action"][0],-1.0,1.0), clamp(action["look_action"][1],-1.0,1.0))
86
+ jump_action = action["jump_action"] == 1
87
+ shoot_action = action["shoot_action"] == 1
88
+
89
+
90
+ func _physics_process(_delta):
91
+ n_steps += 1
92
+ if n_steps > 4000:
93
+ _player.needs_respawn = true
ExtendedRaycastSensor.gd ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ extends RayCastSensor3D
2
+
3
+ var team = -1
4
+ var team_collision_mask = 0
5
+ var enemy_collision_mask = 0
6
+
7
+ func calculate_raycasts() -> Array:
8
+ var result = []
9
+ for ray in rays:
10
+ ray.set_enabled(true)
11
+ ray.force_raycast_update()
12
+ var distance = _get_raycast_distance(ray)
13
+
14
+ result.append(distance)
15
+ if class_sensor:
16
+
17
+ if team == -1:
18
+ var hit_class = 0
19
+ if ray.get_collider():
20
+ var hit_collision_layer = ray.get_collider().collision_layer
21
+ hit_collision_layer = hit_collision_layer & collision_mask
22
+ hit_class = (hit_collision_layer & boolean_class_mask) > 0
23
+ result.append(hit_class)
24
+ else:
25
+ var hit_categories = [0,0]
26
+ var collider = ray.get_collider()
27
+ if collider:
28
+ var hit_collision_layer = collider.collision_layer
29
+ hit_categories[0] = (hit_collision_layer & team_collision_mask) > 0
30
+ hit_categories[1] = (hit_collision_layer & enemy_collision_mask) > 0
31
+
32
+ result.append_array(hit_categories)
33
+ ray.set_enabled(false)
34
+ return result
FlyCam.gd ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ extends CharacterBody3D
2
+
3
+ @export var look_sensitivity: float = 0.005
4
+ @export var max_speed : float = 5.0
5
+ var is_controlled = false
6
+
7
+ func _ready():
8
+ CameraManager.register_flycam(self)
9
+
10
+ func set_control(value):
11
+ is_controlled = value
12
+ $Camera3D.current = value
13
+
14
+
15
+ func _process(_delta):
16
+ var input_dir = Input.get_vector("move_left", "move_right", "move_forward", "move_backward")
17
+ var direction = (transform.basis * Vector3(input_dir.x, 0, input_dir.y)).normalized()
18
+ direction.y = Input.get_axis("cam_down", "cam_up")
19
+ if direction:
20
+ velocity.x = direction.x * max_speed
21
+ velocity.y = direction.y * max_speed
22
+ velocity.z = direction.z * max_speed
23
+ else:
24
+ velocity.x = move_toward(velocity.x, 0, max_speed)
25
+ velocity.y = move_toward(velocity.y, 0, max_speed)
26
+ velocity.z = move_toward(velocity.z, 0, max_speed)
27
+
28
+
29
+ move_and_slide()
30
+
31
+
32
+ func _unhandled_input(event):
33
+ if is_controlled and event is InputEventMouseMotion:
34
+ rotate_y(-event.relative.x * look_sensitivity)
35
+ $Camera3D.rotate_x(-event.relative.y * look_sensitivity)
36
+ $Camera3D.rotation.x = clamp($Camera3D.rotation.x, -PI/2, PI/2)
37
+
Objects.gd ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ extends Node3D
2
+
3
+
4
+ # Called when the node enters the scene tree for the first time.
5
+ func _ready():
6
+ for child in get_children():
7
+ child = child as MeshInstance3D
8
+ if child:
9
+ child.create_trimesh_collision()
10
+
OrbitCam.gd ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ extends Node3D
2
+
3
+ @export var max_speed : float = 1.0
4
+ var is_controlled = false
5
+
6
+ func _ready():
7
+ CameraManager.register_orbitcam(self)
8
+
9
+ func set_control(value):
10
+ is_controlled = value
11
+ $Camera3D.current = value
12
+
13
+
14
+ func _process(delta):
15
+ rotate_y(delta*max_speed)
16
+
17
+
PlayerHitBox.gd ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ extends Area3D
2
+ class_name PlayerHitBox
3
+
4
+ var _player = null
README.md ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: godot-rl
3
+ tags:
4
+ - deep-reinforcement-learning
5
+ - reinforcement-learning
6
+ - godot-rl
7
+ - environments
8
+ - video-games
9
+ ---
10
+
11
+ A RL environment called FPS for the Godot Game Engine.
12
+
13
+ This environment was created with: https://github.com/edbeeching/godot_rl_agents
14
+
15
+
16
+ ## Downloading the environment
17
+
18
+ After installing Godot RL Agents, download the environment with:
19
+
20
+ ```
21
+ gdrl.env_from_hub -r jtatman/godot_rl_FPS
22
+ ```
23
+
24
+
25
+
Run.gd ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ extends PlayerState
2
+
3
+
4
+ func unhandled_input(event):
5
+ _parent.unhandled_input(event)
6
+
7
+ func process(delta):
8
+ _parent.process(delta)
9
+
10
+ func physics_process(delta):
11
+ _parent.physics_process(delta)
12
+ if player.velocity.length() < 0.01 and player.is_on_floor():
13
+ _state_machine.transition_to("Move/Idle")
14
+ player.character.set_velocity(player.transform.basis.inverse() * player.velocity)
15
+
16
+
17
+ func enter(msg: ={}):
18
+ player.character.transition_to(player.character.States.RUN)
19
+ _parent.enter(msg)
20
+
21
+ func exit():
22
+ _parent.exit()
SpawnPoint.gd ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ extends Marker3D
2
+
3
+ @export var team = -1
addons/godot_rl_agents/controller/ai_controller_2d.gd ADDED
@@ -0,0 +1,82 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ extends Node2D
2
+ class_name AIController2D
3
+
4
+ @export var reset_after := 1000
5
+
6
+ var heuristic := "human"
7
+ var done := false
8
+ var reward := 0.0
9
+ var n_steps := 0
10
+ var needs_reset := false
11
+
12
+ var _player: Node2D
13
+
14
+ func _ready():
15
+ add_to_group("AGENT")
16
+
17
+ func init(player: Node2D):
18
+ _player = player
19
+
20
+ #-- Methods that need implementing using the "extend script" option in Godot --#
21
+ func get_obs() -> Dictionary:
22
+ assert(false, "the get_obs method is not implemented when extending from ai_controller")
23
+ return {"obs":[]}
24
+
25
+ func get_reward() -> float:
26
+ assert(false, "the get_reward method is not implemented when extending from ai_controller")
27
+ return 0.0
28
+
29
+ func get_action_space() -> Dictionary:
30
+ assert(false, "the get get_action_space method is not implemented when extending from ai_controller")
31
+ return {
32
+ "example_actions_continous" : {
33
+ "size": 2,
34
+ "action_type": "continuous"
35
+ },
36
+ "example_actions_discrete" : {
37
+ "size": 2,
38
+ "action_type": "discrete"
39
+ },
40
+ }
41
+
42
+ func set_action(action) -> void:
43
+ assert(false, "the get set_action method is not implemented when extending from ai_controller")
44
+ # -----------------------------------------------------------------------------#
45
+
46
+ func _physics_process(delta):
47
+ n_steps += 1
48
+ if n_steps > reset_after:
49
+ needs_reset = true
50
+
51
+ func get_obs_space():
52
+ # may need overriding if the obs space is complex
53
+ var obs = get_obs()
54
+ return {
55
+ "obs": {
56
+ "size": [len(obs["obs"])],
57
+ "space": "box"
58
+ },
59
+ }
60
+
61
+ func reset():
62
+ n_steps = 0
63
+ needs_reset = false
64
+
65
+ func reset_if_done():
66
+ if done:
67
+ reset()
68
+
69
+ func set_heuristic(h):
70
+ # sets the heuristic from "human" or "model" nothing to change here
71
+ heuristic = h
72
+
73
+ func get_done():
74
+ return done
75
+
76
+ func set_done_false():
77
+ done = false
78
+
79
+ func zero_reward():
80
+ reward = 0.0
81
+
82
+
addons/godot_rl_agents/controller/ai_controller_3d.gd ADDED
@@ -0,0 +1,80 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ extends Node3D
2
+ class_name AIController3D
3
+
4
+ @export var reset_after := 1000
5
+
6
+ var heuristic := "human"
7
+ var done := false
8
+ var reward := 0.0
9
+ var n_steps := 0
10
+ var needs_reset := false
11
+
12
+ var _player: Node3D
13
+
14
+ func _ready():
15
+ add_to_group("AGENT")
16
+
17
+ func init(player: Node3D):
18
+ _player = player
19
+
20
+ #-- Methods that need implementing using the "extend script" option in Godot --#
21
+ func get_obs() -> Dictionary:
22
+ assert(false, "the get_obs method is not implemented when extending from ai_controller")
23
+ return {"obs":[]}
24
+
25
+ func get_reward() -> float:
26
+ assert(false, "the get_reward method is not implemented when extending from ai_controller")
27
+ return 0.0
28
+
29
+ func get_action_space() -> Dictionary:
30
+ assert(false, "the get get_action_space method is not implemented when extending from ai_controller")
31
+ return {
32
+ "example_actions_continous" : {
33
+ "size": 2,
34
+ "action_type": "continuous"
35
+ },
36
+ "example_actions_discrete" : {
37
+ "size": 2,
38
+ "action_type": "discrete"
39
+ },
40
+ }
41
+
42
+ func set_action(action) -> void:
43
+ assert(false, "the get set_action method is not implemented when extending from ai_controller")
44
+ # -----------------------------------------------------------------------------#
45
+
46
+ func _physics_process(delta):
47
+ n_steps += 1
48
+ if n_steps > reset_after:
49
+ needs_reset = true
50
+
51
+ func get_obs_space():
52
+ # may need overriding if the obs space is complex
53
+ var obs = get_obs()
54
+ return {
55
+ "obs": {
56
+ "size": [len(obs["obs"])],
57
+ "space": "box"
58
+ },
59
+ }
60
+
61
+ func reset():
62
+ n_steps = 0
63
+ needs_reset = false
64
+
65
+ func reset_if_done():
66
+ if done:
67
+ reset()
68
+
69
+ func set_heuristic(h):
70
+ # sets the heuristic from "human" or "model" nothing to change here
71
+ heuristic = h
72
+
73
+ func get_done():
74
+ return done
75
+
76
+ func set_done_false():
77
+ done = false
78
+
79
+ func zero_reward():
80
+ reward = 0.0
addons/godot_rl_agents/godot_rl_agents.gd ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @tool
2
+ extends EditorPlugin
3
+
4
+
5
+ func _enter_tree():
6
+ # Initialization of the plugin goes here.
7
+ # Add the new type with a name, a parent type, a script and an icon.
8
+ add_custom_type("Sync", "Node", preload("sync.gd"), preload("icon.png"))
9
+ #add_custom_type("RaycastSensor2D2", "Node", preload("raycast_sensor_2d.gd"), preload("icon.png"))
10
+
11
+
12
+ func _exit_tree():
13
+ # Clean-up of the plugin goes here.
14
+ # Always remember to remove it from the engine when deactivated.
15
+ remove_custom_type("Sync")
16
+ #remove_custom_type("RaycastSensor2D2")
addons/godot_rl_agents/icon.png ADDED

Git LFS Details

  • SHA256: e3a8bc372d3313ce1ede4e7554472e37b322178b9488bfb709e296585abd3c44
  • Pointer size: 128 Bytes
  • Size of remote file: 198 Bytes
addons/godot_rl_agents/onnx/csharp/ONNXInference.cs ADDED
@@ -0,0 +1,103 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ using Godot;
2
+ using Microsoft.ML.OnnxRuntime;
3
+ using Microsoft.ML.OnnxRuntime.Tensors;
4
+ using System.Collections.Generic;
5
+ using System.Linq;
6
+
7
+ namespace GodotONNX
8
+ {
9
+ /// <include file='docs/ONNXInference.xml' path='docs/members[@name="ONNXInference"]/ONNXInference/*'/>
10
+ public partial class ONNXInference : GodotObject
11
+ {
12
+
13
+ private InferenceSession session;
14
+ /// <summary>
15
+ /// Path to the ONNX model. Use Initialize to change it.
16
+ /// </summary>
17
+ private string modelPath;
18
+ private int batchSize;
19
+
20
+ private SessionOptions SessionOpt;
21
+
22
+ //init function
23
+ /// <include file='docs/ONNXInference.xml' path='docs/members[@name="ONNXInference"]/Initialize/*'/>
24
+ public void Initialize(string Path, int BatchSize)
25
+ {
26
+ modelPath = Path;
27
+ batchSize = BatchSize;
28
+ SessionOpt = SessionConfigurator.MakeConfiguredSessionOptions();
29
+ session = LoadModel(modelPath);
30
+
31
+ }
32
+ /// <include file='docs/ONNXInference.xml' path='docs/members[@name="ONNXInference"]/Run/*'/>
33
+ public Godot.Collections.Dictionary<string, Godot.Collections.Array<float>> RunInference(Godot.Collections.Array<float> obs, int state_ins)
34
+ {
35
+ //Current model: Any (Godot Rl Agents)
36
+ //Expects a tensor of shape [batch_size, input_size] type float named obs and a tensor of shape [batch_size] type float named state_ins
37
+
38
+ //Fill the input tensors
39
+ // create span from inputSize
40
+ var span = new float[obs.Count]; //There's probably a better way to do this
41
+ for (int i = 0; i < obs.Count; i++)
42
+ {
43
+ span[i] = obs[i];
44
+ }
45
+
46
+ IReadOnlyCollection<NamedOnnxValue> inputs = new List<NamedOnnxValue>
47
+ {
48
+ NamedOnnxValue.CreateFromTensor("obs", new DenseTensor<float>(span, new int[] { batchSize, obs.Count })),
49
+ NamedOnnxValue.CreateFromTensor("state_ins", new DenseTensor<float>(new float[] { state_ins }, new int[] { batchSize }))
50
+ };
51
+ IReadOnlyCollection<string> outputNames = new List<string> { "output", "state_outs" }; //ONNX is sensible to these names, as well as the input names
52
+
53
+ IDisposableReadOnlyCollection<DisposableNamedOnnxValue> results;
54
+ //We do not use "using" here so we get a better exception explaination later
55
+ try
56
+ {
57
+ results = session.Run(inputs, outputNames);
58
+ }
59
+ catch (OnnxRuntimeException e)
60
+ {
61
+ //This error usually means that the model is not compatible with the input, beacause of the input shape (size)
62
+ GD.Print("Error at inference: ", e);
63
+ return null;
64
+ }
65
+ //Can't convert IEnumerable<float> to Variant, so we have to convert it to an array or something
66
+ Godot.Collections.Dictionary<string, Godot.Collections.Array<float>> output = new Godot.Collections.Dictionary<string, Godot.Collections.Array<float>>();
67
+ DisposableNamedOnnxValue output1 = results.First();
68
+ DisposableNamedOnnxValue output2 = results.Last();
69
+ Godot.Collections.Array<float> output1Array = new Godot.Collections.Array<float>();
70
+ Godot.Collections.Array<float> output2Array = new Godot.Collections.Array<float>();
71
+
72
+ foreach (float f in output1.AsEnumerable<float>())
73
+ {
74
+ output1Array.Add(f);
75
+ }
76
+
77
+ foreach (float f in output2.AsEnumerable<float>())
78
+ {
79
+ output2Array.Add(f);
80
+ }
81
+
82
+ output.Add(output1.Name, output1Array);
83
+ output.Add(output2.Name, output2Array);
84
+
85
+ //Output is a dictionary of arrays, ex: { "output" : [0.1, 0.2, 0.3, 0.4, ...], "state_outs" : [0.5, ...]}
86
+ results.Dispose();
87
+ return output;
88
+ }
89
+ /// <include file='docs/ONNXInference.xml' path='docs/members[@name="ONNXInference"]/Load/*'/>
90
+ public InferenceSession LoadModel(string Path)
91
+ {
92
+ using Godot.FileAccess file = FileAccess.Open(Path, Godot.FileAccess.ModeFlags.Read);
93
+ byte[] model = file.GetBuffer((int)file.GetLength());
94
+ //file.Close(); file.Dispose(); //Close the file, then dispose the reference.
95
+ return new InferenceSession(model, SessionOpt); //Load the model
96
+ }
97
+ public void FreeDisposables()
98
+ {
99
+ session.Dispose();
100
+ SessionOpt.Dispose();
101
+ }
102
+ }
103
+ }
addons/godot_rl_agents/onnx/csharp/SessionConfigurator.cs ADDED
@@ -0,0 +1,131 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ using Godot;
2
+ using Microsoft.ML.OnnxRuntime;
3
+
4
+ namespace GodotONNX
5
+ {
6
+ /// <include file='docs/SessionConfigurator.xml' path='docs/members[@name="SessionConfigurator"]/SessionConfigurator/*'/>
7
+
8
+ public static class SessionConfigurator
9
+ {
10
+ public enum ComputeName
11
+ {
12
+ CUDA,
13
+ ROCm,
14
+ DirectML,
15
+ CoreML,
16
+ CPU
17
+ }
18
+
19
+ /// <include file='docs/SessionConfigurator.xml' path='docs/members[@name="SessionConfigurator"]/GetSessionOptions/*'/>
20
+ public static SessionOptions MakeConfiguredSessionOptions()
21
+ {
22
+ SessionOptions sessionOptions = new();
23
+ SetOptions(sessionOptions);
24
+ return sessionOptions;
25
+ }
26
+
27
+ private static void SetOptions(SessionOptions sessionOptions)
28
+ {
29
+ sessionOptions.LogSeverityLevel = OrtLoggingLevel.ORT_LOGGING_LEVEL_WARNING;
30
+ ApplySystemSpecificOptions(sessionOptions);
31
+ }
32
+
33
+ /// <include file='docs/SessionConfigurator.xml' path='docs/members[@name="SessionConfigurator"]/SystemCheck/*'/>
34
+ static public void ApplySystemSpecificOptions(SessionOptions sessionOptions)
35
+ {
36
+ //Most code for this function is verbose only, the only reason it exists is to track
37
+ //implementation progress of the different compute APIs.
38
+
39
+ //December 2022: CUDA is not working.
40
+
41
+ string OSName = OS.GetName(); //Get OS Name
42
+
43
+ //ComputeName ComputeAPI = ComputeCheck(); //Get Compute API
44
+ // //TODO: Get CPU architecture
45
+
46
+ //Linux can use OpenVINO (C#) on x64 and ROCm on x86 (GDNative/C++)
47
+ //Windows can use OpenVINO (C#) on x64
48
+ //TODO: try TensorRT instead of CUDA
49
+ //TODO: Use OpenVINO for Intel Graphics
50
+
51
+ // Temporarily using CPU on all platforms to avoid errors detected with DML
52
+ ComputeName ComputeAPI = ComputeName.CPU;
53
+
54
+ //match OS and Compute API
55
+ GD.Print($"OS: {OSName} Compute API: {ComputeAPI}");
56
+
57
+ // CPU is set by default without appending necessary
58
+ // sessionOptions.AppendExecutionProvider_CPU(0);
59
+
60
+ /*
61
+ switch (OSName)
62
+ {
63
+ case "Windows": //Can use CUDA, DirectML
64
+ if (ComputeAPI is ComputeName.CUDA)
65
+ {
66
+ //CUDA
67
+ //sessionOptions.AppendExecutionProvider_CUDA(0);
68
+ //sessionOptions.AppendExecutionProvider_DML(0);
69
+ }
70
+ else if (ComputeAPI is ComputeName.DirectML)
71
+ {
72
+ //DirectML
73
+ //sessionOptions.AppendExecutionProvider_DML(0);
74
+ }
75
+ break;
76
+ case "X11": //Can use CUDA, ROCm
77
+ if (ComputeAPI is ComputeName.CUDA)
78
+ {
79
+ //CUDA
80
+ //sessionOptions.AppendExecutionProvider_CUDA(0);
81
+ }
82
+ if (ComputeAPI is ComputeName.ROCm)
83
+ {
84
+ //ROCm, only works on x86
85
+ //Research indicates that this has to be compiled as a GDNative plugin
86
+ //GD.Print("ROCm not supported yet, using CPU.");
87
+ //sessionOptions.AppendExecutionProvider_CPU(0);
88
+ }
89
+ break;
90
+ case "macOS": //Can use CoreML
91
+ if (ComputeAPI is ComputeName.CoreML)
92
+ { //CoreML
93
+ //TODO: Needs testing
94
+ //sessionOptions.AppendExecutionProvider_CoreML(0);
95
+ //CoreML on ARM64, out of the box, on x64 needs .tar file from GitHub
96
+ }
97
+ break;
98
+ default:
99
+ GD.Print("OS not Supported.");
100
+ break;
101
+ }
102
+ */
103
+ }
104
+
105
+
106
+ /// <include file='docs/SessionConfigurator.xml' path='docs/members[@name="SessionConfigurator"]/ComputeCheck/*'/>
107
+ public static ComputeName ComputeCheck()
108
+ {
109
+ string adapterName = Godot.RenderingServer.GetVideoAdapterName();
110
+ //string adapterVendor = Godot.RenderingServer.GetVideoAdapterVendor();
111
+ adapterName = adapterName.ToUpper(new System.Globalization.CultureInfo(""));
112
+ //TODO: GPU vendors for MacOS, what do they even use these days?
113
+
114
+ if (adapterName.Contains("INTEL"))
115
+ {
116
+ return ComputeName.DirectML;
117
+ }
118
+ if (adapterName.Contains("AMD") || adapterName.Contains("RADEON"))
119
+ {
120
+ return ComputeName.DirectML;
121
+ }
122
+ if (adapterName.Contains("NVIDIA"))
123
+ {
124
+ return ComputeName.CUDA;
125
+ }
126
+
127
+ GD.Print("Graphics Card not recognized."); //Should use CPU
128
+ return ComputeName.CPU;
129
+ }
130
+ }
131
+ }
addons/godot_rl_agents/onnx/csharp/docs/ONNXInference.xml ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <docs>
2
+ <members name="ONNXInference">
3
+ <ONNXInference>
4
+ <summary>
5
+ The main <c>ONNXInference</c> Class that handles the inference process.
6
+ </summary>
7
+ </ONNXInference>
8
+ <Initialize>
9
+ <summary>
10
+ Starts the inference process.
11
+ </summary>
12
+ <param name="Path">Path to the ONNX model, expects a path inside resources.</param>
13
+ <param name="BatchSize">How many observations will the model recieve.</param>
14
+ </Initialize>
15
+ <Run>
16
+ <summary>
17
+ Runs the given input through the model and returns the output.
18
+ </summary>
19
+ <param name="obs">Dictionary containing all observations.</param>
20
+ <param name="state_ins">How many different agents are creating these observations.</param>
21
+ <returns>A Dictionary of arrays, containing instructions based on the observations.</returns>
22
+ </Run>
23
+ <Load>
24
+ <summary>
25
+ Loads the given model into the inference process, using the best Execution provider available.
26
+ </summary>
27
+ <param name="Path">Path to the ONNX model, expects a path inside resources.</param>
28
+ <returns>InferenceSession ready to run.</returns>
29
+ </Load>
30
+ </members>
31
+ </docs>
addons/godot_rl_agents/onnx/csharp/docs/SessionConfigurator.xml ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <docs>
2
+ <members name="SessionConfigurator">
3
+ <SessionConfigurator>
4
+ <summary>
5
+ The main <c>SessionConfigurator</c> Class that handles the execution options and providers for the inference process.
6
+ </summary>
7
+ </SessionConfigurator>
8
+ <GetSessionOptions>
9
+ <summary>
10
+ Creates a SessionOptions with all available execution providers.
11
+ </summary>
12
+ <returns>SessionOptions with all available execution providers.</returns>
13
+ </GetSessionOptions>
14
+ <SystemCheck>
15
+ <summary>
16
+ Appends any execution provider available in the current system.
17
+ </summary>
18
+ <remarks>
19
+ This function is mainly verbose for tracking implementation progress of different compute APIs.
20
+ </remarks>
21
+ </SystemCheck>
22
+ <ComputeCheck>
23
+ <summary>
24
+ Checks for available GPUs.
25
+ </summary>
26
+ <returns>An integer identifier for each compute platform.</returns>
27
+ </ComputeCheck>
28
+ </members>
29
+ </docs>
addons/godot_rl_agents/onnx/wrapper/ONNX_wrapper.gd ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ extends Resource
2
+ class_name ONNXModel
3
+ var inferencer_script = load("res://addons/godot_rl_agents/onnx/csharp/ONNXInference.cs")
4
+
5
+ var inferencer = null
6
+
7
+ # Must provide the path to the model and the batch size
8
+ func _init(model_path, batch_size):
9
+ inferencer = inferencer_script.new()
10
+ inferencer.Initialize(model_path, batch_size)
11
+
12
+ # This function is the one that will be called from the game,
13
+ # requires the observation as an array and the state_ins as an int
14
+ # returns an Array containing the action the model takes.
15
+ func run_inference(obs : Array, state_ins : int) -> Dictionary:
16
+ if inferencer == null:
17
+ printerr("Inferencer not initialized")
18
+ return {}
19
+ return inferencer.RunInference(obs, state_ins)
20
+
21
+ func _notification(what):
22
+ if what == NOTIFICATION_PREDELETE:
23
+ inferencer.FreeDisposables()
24
+ inferencer.free()
addons/godot_rl_agents/plugin.cfg ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ [plugin]
2
+
3
+ name="GodotRLAgents"
4
+ description="Custom nodes for the godot rl agents toolkit "
5
+ author="Edward Beeching"
6
+ version="0.1"
7
+ script="godot_rl_agents.gd"
addons/godot_rl_agents/sensors/sensors_2d/ExampleRaycastSensor2D.tscn ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [gd_scene load_steps=5 format=3 uid="uid://ddeq7mn1ealyc"]
2
+
3
+ [ext_resource type="Script" path="res://addons/godot_rl_agents/sensors/sensors_2d/RaycastSensor2D.gd" id="1"]
4
+
5
+ [sub_resource type="GDScript" id="2"]
6
+ script/source = "extends Node2D
7
+
8
+
9
+
10
+ func _physics_process(delta: float) -> void:
11
+ print(\"step start\")
12
+
13
+ "
14
+
15
+ [sub_resource type="GDScript" id="1"]
16
+ script/source = "extends RayCast2D
17
+
18
+ var steps = 1
19
+
20
+ func _physics_process(delta: float) -> void:
21
+ print(\"processing raycast\")
22
+ steps += 1
23
+ if steps % 2:
24
+ force_raycast_update()
25
+
26
+ print(is_colliding())
27
+ "
28
+
29
+ [sub_resource type="CircleShape2D" id="3"]
30
+
31
+ [node name="ExampleRaycastSensor2D" type="Node2D"]
32
+ script = SubResource("2")
33
+
34
+ [node name="ExampleAgent" type="Node2D" parent="."]
35
+ position = Vector2(573, 314)
36
+ rotation = 0.286234
37
+
38
+ [node name="RaycastSensor2D" type="Node2D" parent="ExampleAgent"]
39
+ script = ExtResource("1")
40
+
41
+ [node name="TestRayCast2D" type="RayCast2D" parent="."]
42
+ script = SubResource("1")
43
+
44
+ [node name="StaticBody2D" type="StaticBody2D" parent="."]
45
+ position = Vector2(1, 52)
46
+
47
+ [node name="CollisionShape2D" type="CollisionShape2D" parent="StaticBody2D"]
48
+ shape = SubResource("3")
addons/godot_rl_agents/sensors/sensors_2d/ISensor2D.gd ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ extends Node2D
2
+ class_name ISensor2D
3
+
4
+ var _obs : Array = []
5
+ var _active := false
6
+
7
+ func get_observation():
8
+ pass
9
+
10
+ func activate():
11
+ _active = true
12
+
13
+ func deactivate():
14
+ _active = false
15
+
16
+ func _update_observation():
17
+ pass
18
+
19
+ func reset():
20
+ pass
addons/godot_rl_agents/sensors/sensors_2d/RaycastSensor2D.gd ADDED
@@ -0,0 +1,118 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @tool
2
+ extends ISensor2D
3
+ class_name RaycastSensor2D
4
+
5
+ @export_flags_2d_physics var collision_mask := 1:
6
+ get: return collision_mask
7
+ set(value):
8
+ collision_mask = value
9
+ _update()
10
+
11
+ @export var collide_with_areas := false:
12
+ get: return collide_with_areas
13
+ set(value):
14
+ collide_with_areas = value
15
+ _update()
16
+
17
+ @export var collide_with_bodies := true:
18
+ get: return collide_with_bodies
19
+ set(value):
20
+ collide_with_bodies = value
21
+ _update()
22
+
23
+ @export var n_rays := 16.0:
24
+ get: return n_rays
25
+ set(value):
26
+ n_rays = value
27
+ _update()
28
+
29
+ @export_range(5,200,5.0) var ray_length := 200:
30
+ get: return ray_length
31
+ set(value):
32
+ ray_length = value
33
+ _update()
34
+ @export_range(5,360,5.0) var cone_width := 360.0:
35
+ get: return cone_width
36
+ set(value):
37
+ cone_width = value
38
+ _update()
39
+
40
+ @export var debug_draw := true :
41
+ get: return debug_draw
42
+ set(value):
43
+ debug_draw = value
44
+ _update()
45
+
46
+
47
+ var _angles = []
48
+ var rays := []
49
+
50
+ func _update():
51
+ if Engine.is_editor_hint():
52
+ if debug_draw:
53
+ _spawn_nodes()
54
+ else:
55
+ for ray in get_children():
56
+ if ray is RayCast2D:
57
+ remove_child(ray)
58
+
59
+ func _ready() -> void:
60
+ _spawn_nodes()
61
+
62
+ func _spawn_nodes():
63
+ for ray in rays:
64
+ ray.queue_free()
65
+ rays = []
66
+
67
+ _angles = []
68
+ var step = cone_width / (n_rays)
69
+ var start = step/2 - cone_width/2
70
+
71
+ for i in n_rays:
72
+ var angle = start + i * step
73
+ var ray = RayCast2D.new()
74
+ ray.set_target_position(Vector2(
75
+ ray_length*cos(deg_to_rad(angle)),
76
+ ray_length*sin(deg_to_rad(angle))
77
+ ))
78
+ ray.set_name("node_"+str(i))
79
+ ray.enabled = true
80
+ ray.collide_with_areas = collide_with_areas
81
+ ray.collide_with_bodies = collide_with_bodies
82
+ ray.collision_mask = collision_mask
83
+ add_child(ray)
84
+ rays.append(ray)
85
+
86
+
87
+ _angles.append(start + i * step)
88
+
89
+
90
+ func _physics_process(delta: float) -> void:
91
+ if self._active:
92
+ self._obs = calculate_raycasts()
93
+
94
+ func get_observation() -> Array:
95
+ if len(self._obs) == 0:
96
+ print("obs was null, forcing raycast update")
97
+ return self.calculate_raycasts()
98
+ return self._obs
99
+
100
+
101
+ func calculate_raycasts() -> Array:
102
+ var result = []
103
+ for ray in rays:
104
+ ray.force_raycast_update()
105
+ var distance = _get_raycast_distance(ray)
106
+ result.append(distance)
107
+ return result
108
+
109
+ func _get_raycast_distance(ray : RayCast2D) -> float :
110
+ if !ray.is_colliding():
111
+ return 0.0
112
+
113
+ var distance = (global_position - ray.get_collision_point()).length()
114
+ distance = clamp(distance, 0.0, ray_length)
115
+ return (ray_length - distance) / ray_length
116
+
117
+
118
+
addons/godot_rl_agents/sensors/sensors_2d/RaycastSensor2D.tscn ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ [gd_scene load_steps=2 format=3 uid="uid://drvfihk5esgmv"]
2
+
3
+ [ext_resource type="Script" path="res://addons/godot_rl_agents/sensors/sensors_2d/RaycastSensor2D.gd" id="1"]
4
+
5
+ [node name="RaycastSensor2D" type="Node2D"]
6
+ script = ExtResource("1")
7
+ n_rays = 17.0
addons/godot_rl_agents/sensors/sensors_3d/ExampleRaycastSensor3D.tscn ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ [gd_scene format=3 uid="uid://biu787qh4woik"]
2
+
3
+ [node name="ExampleRaycastSensor3D" type="Node3D"]
4
+
5
+ [node name="Camera3D" type="Camera3D" parent="."]
6
+ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.804183, 0, 2.70146)
addons/godot_rl_agents/sensors/sensors_3d/ISensor3D.gd ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ extends Node3D
2
+ class_name ISensor3D
3
+
4
+ var _obs : Array = []
5
+ var _active := false
6
+
7
+ func get_observation():
8
+ pass
9
+
10
+ func activate():
11
+ _active = true
12
+
13
+ func deactivate():
14
+ _active = false
15
+
16
+ func _update_observation():
17
+ pass
18
+
19
+ func reset():
20
+ pass
addons/godot_rl_agents/sensors/sensors_3d/RGBCameraSensor3D.gd ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ extends Node3D
2
+ class_name RGBCameraSensor3D
3
+ var camera_pixels = null
4
+
5
+ @onready var camera_texture := $Control/TextureRect/CameraTexture as Sprite2D
6
+
7
+ func get_camera_pixel_encoding():
8
+ return camera_texture.get_texture().get_data().data["data"].hex_encode()
9
+
10
+ func get_camera_shape()-> Array:
11
+ return [$SubViewport.size[0], $SubViewport.size[1], 4]
addons/godot_rl_agents/sensors/sensors_3d/RGBCameraSensor3D.tscn ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [gd_scene load_steps=3 format=2]
2
+
3
+ [ext_resource path="res://addons/godot_rl_agents/sensors/sensors_3d/RGBCameraSensor3D.gd" type="Script" id=1]
4
+
5
+ [sub_resource type="ViewportTexture" id=1]
6
+ viewport_path = NodePath("SubViewport")
7
+
8
+ [node name="RGBCameraSensor3D" type="Node3D"]
9
+ script = ExtResource( 1 )
10
+
11
+ [node name="RemoteTransform3D" type="RemoteTransform3D" parent="."]
12
+ remote_path = NodePath("../SubViewport/Camera3D")
13
+
14
+ [node name="SubViewport" type="SubViewport" parent="."]
15
+ size = Vector2( 32, 32 )
16
+ render_target_update_mode = 3
17
+
18
+ [node name="Camera3D" type="Camera3D" parent="SubViewport"]
19
+ near = 0.5
20
+
21
+ [node name="Control" type="Control" parent="."]
22
+ anchor_right = 1.0
23
+ anchor_bottom = 1.0
24
+ __meta__ = {
25
+ "_edit_use_anchors_": false
26
+ }
27
+
28
+ [node name="TextureRect" type="ColorRect" parent="Control"]
29
+ offset_left = 1096.0
30
+ offset_top = 534.0
31
+ offset_right = 1114.0
32
+ offset_bottom = 552.0
33
+ scale = Vector2( 10, 10 )
34
+ color = Color( 0.00784314, 0.00784314, 0.00784314, 1 )
35
+ __meta__ = {
36
+ "_edit_use_anchors_": false
37
+ }
38
+
39
+ [node name="CameraTexture" type="Sprite2D" parent="Control/TextureRect"]
40
+ texture = SubResource( 1 )
41
+ offset = Vector2( 9, 9 )
42
+ flip_v = true
addons/godot_rl_agents/sensors/sensors_3d/RaycastSensor3D.gd ADDED
@@ -0,0 +1,166 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @tool
2
+ extends ISensor3D
3
+ class_name RayCastSensor3D
4
+ @export_flags_3d_physics var collision_mask = 1:
5
+ get: return collision_mask
6
+ set(value):
7
+ collision_mask = value
8
+ _update()
9
+ @export_flags_3d_physics var boolean_class_mask = 1:
10
+ get: return boolean_class_mask
11
+ set(value):
12
+ boolean_class_mask = value
13
+ _update()
14
+
15
+ @export var n_rays_width := 6.0:
16
+ get: return n_rays_width
17
+ set(value):
18
+ n_rays_width = value
19
+ _update()
20
+
21
+ @export var n_rays_height := 6.0:
22
+ get: return n_rays_height
23
+ set(value):
24
+ n_rays_height = value
25
+ _update()
26
+
27
+ @export var ray_length := 10.0:
28
+ get: return ray_length
29
+ set(value):
30
+ ray_length = value
31
+ _update()
32
+
33
+ @export var cone_width := 60.0:
34
+ get: return cone_width
35
+ set(value):
36
+ cone_width = value
37
+ _update()
38
+
39
+ @export var cone_height := 60.0:
40
+ get: return cone_height
41
+ set(value):
42
+ cone_height = value
43
+ _update()
44
+
45
+ @export var collide_with_areas := false:
46
+ get: return collide_with_areas
47
+ set(value):
48
+ collide_with_areas = value
49
+ _update()
50
+
51
+ @export var collide_with_bodies := true:
52
+ get: return collide_with_bodies
53
+ set(value):
54
+ collide_with_bodies = value
55
+ _update()
56
+
57
+ @export var class_sensor := false
58
+
59
+ var rays := []
60
+ var geo = null
61
+
62
+ func _update():
63
+ if Engine.is_editor_hint():
64
+ if is_node_ready():
65
+ _spawn_nodes()
66
+
67
+ func _ready() -> void:
68
+ if Engine.is_editor_hint():
69
+ if get_child_count() == 0:
70
+ _spawn_nodes()
71
+ else:
72
+ _spawn_nodes()
73
+
74
+ func _spawn_nodes():
75
+ print("spawning nodes")
76
+ for ray in get_children():
77
+ ray.queue_free()
78
+ if geo:
79
+ geo.clear()
80
+ #$Lines.remove_points()
81
+ rays = []
82
+
83
+ var horizontal_step = cone_width / (n_rays_width)
84
+ var vertical_step = cone_height / (n_rays_height)
85
+
86
+ var horizontal_start = horizontal_step/2 - cone_width/2
87
+ var vertical_start = vertical_step/2 - cone_height/2
88
+
89
+ var points = []
90
+
91
+ for i in n_rays_width:
92
+ for j in n_rays_height:
93
+ var angle_w = horizontal_start + i * horizontal_step
94
+ var angle_h = vertical_start + j * vertical_step
95
+ #angle_h = 0.0
96
+ var ray = RayCast3D.new()
97
+ var cast_to = to_spherical_coords(ray_length, angle_w, angle_h)
98
+ ray.set_target_position(cast_to)
99
+
100
+ points.append(cast_to)
101
+
102
+ ray.set_name("node_"+str(i)+" "+str(j))
103
+ ray.enabled = true
104
+ ray.collide_with_bodies = collide_with_bodies
105
+ ray.collide_with_areas = collide_with_areas
106
+ ray.collision_mask = collision_mask
107
+ add_child(ray)
108
+ ray.set_owner(get_tree().edited_scene_root)
109
+ rays.append(ray)
110
+ ray.force_raycast_update()
111
+
112
+ # if Engine.editor_hint:
113
+ # _create_debug_lines(points)
114
+
115
+ func _create_debug_lines(points):
116
+ if not geo:
117
+ geo = ImmediateMesh.new()
118
+ add_child(geo)
119
+
120
+ geo.clear()
121
+ geo.begin(Mesh.PRIMITIVE_LINES)
122
+ for point in points:
123
+ geo.set_color(Color.AQUA)
124
+ geo.add_vertex(Vector3.ZERO)
125
+ geo.add_vertex(point)
126
+ geo.end()
127
+
128
+ func display():
129
+ if geo:
130
+ geo.display()
131
+
132
+ func to_spherical_coords(r, inc, azimuth) -> Vector3:
133
+ return Vector3(
134
+ r*sin(deg_to_rad(inc))*cos(deg_to_rad(azimuth)),
135
+ r*sin(deg_to_rad(azimuth)),
136
+ r*cos(deg_to_rad(inc))*cos(deg_to_rad(azimuth))
137
+ )
138
+
139
+ func get_observation() -> Array:
140
+ return self.calculate_raycasts()
141
+
142
+ func calculate_raycasts() -> Array:
143
+ var result = []
144
+ for ray in rays:
145
+ ray.set_enabled(true)
146
+ ray.force_raycast_update()
147
+ var distance = _get_raycast_distance(ray)
148
+
149
+ result.append(distance)
150
+ if class_sensor:
151
+ var hit_class = 0
152
+ if ray.get_collider():
153
+ var hit_collision_layer = ray.get_collider().collision_layer
154
+ hit_collision_layer = hit_collision_layer & collision_mask
155
+ hit_class = (hit_collision_layer & boolean_class_mask) > 0
156
+ result.append(hit_class)
157
+ ray.set_enabled(false)
158
+ return result
159
+
160
+ func _get_raycast_distance(ray : RayCast3D) -> float :
161
+ if !ray.is_colliding():
162
+ return 0.0
163
+
164
+ var distance = (global_transform.origin - ray.get_collision_point()).length()
165
+ distance = clamp(distance, 0.0, ray_length)
166
+ return (ray_length - distance) / ray_length
addons/godot_rl_agents/sensors/sensors_3d/RaycastSensor3D.tscn ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [gd_scene load_steps=2 format=3 uid="uid://b803cbh1fmy66"]
2
+
3
+ [ext_resource type="Script" path="res://addons/godot_rl_agents/sensors/sensors_3d/RaycastSensor3D.gd" id="1"]
4
+
5
+ [node name="RaycastSensor3D" type="Node3D"]
6
+ script = ExtResource("1")
7
+ n_rays_width = 4.0
8
+ n_rays_height = 2.0
9
+ ray_length = 11.0
10
+
11
+ [node name="@node_0 0@18991" type="RayCast3D" parent="."]
12
+ target_position = Vector3(-4.06608, -2.84701, 9.81639)
13
+
14
+ [node name="node_0 1" type="RayCast3D" parent="."]
15
+ target_position = Vector3(-4.06608, 2.84701, 9.81639)
16
+
17
+ [node name="@node_1 0@18992" type="RayCast3D" parent="."]
18
+ target_position = Vector3(-1.38686, -2.84701, 10.5343)
19
+
20
+ [node name="@node_1 1@18993" type="RayCast3D" parent="."]
21
+ target_position = Vector3(-1.38686, 2.84701, 10.5343)
22
+
23
+ [node name="@node_2 0@18994" type="RayCast3D" parent="."]
24
+ target_position = Vector3(1.38686, -2.84701, 10.5343)
25
+
26
+ [node name="@node_2 1@18995" type="RayCast3D" parent="."]
27
+ target_position = Vector3(1.38686, 2.84701, 10.5343)
28
+
29
+ [node name="@node_3 0@18996" type="RayCast3D" parent="."]
30
+ target_position = Vector3(4.06608, -2.84701, 9.81639)
31
+
32
+ [node name="@node_3 1@18997" type="RayCast3D" parent="."]
33
+ target_position = Vector3(4.06608, 2.84701, 9.81639)
addons/godot_rl_agents/sync.gd ADDED
@@ -0,0 +1,338 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ extends Node
2
+ # --fixed-fps 2000 --disable-render-loop
3
+ @export_range(1, 10, 1, "or_greater") var action_repeat := 8
4
+ @export_range(1, 10, 1, "or_greater") var speed_up = 1
5
+ @export var onnx_model_path := ""
6
+
7
+ @onready var start_time = Time.get_ticks_msec()
8
+
9
+ const MAJOR_VERSION := "0"
10
+ const MINOR_VERSION := "3"
11
+ const DEFAULT_PORT := "11008"
12
+ const DEFAULT_SEED := "1"
13
+ var stream : StreamPeerTCP = null
14
+ var connected = false
15
+ var message_center
16
+ var should_connect = true
17
+ var agents
18
+ var need_to_send_obs = false
19
+ var args = null
20
+ var initialized = false
21
+ var just_reset = false
22
+ var onnx_model = null
23
+ var n_action_steps = 0
24
+
25
+ var _action_space : Dictionary
26
+ var _obs_space : Dictionary
27
+
28
+ # Called when the node enters the scene tree for the first time.
29
+
30
+ func _ready():
31
+ await get_tree().root.ready
32
+ get_tree().set_pause(true)
33
+ _initialize()
34
+ await get_tree().create_timer(1.0).timeout
35
+ get_tree().set_pause(false)
36
+
37
+ func _initialize():
38
+ _get_agents()
39
+ _obs_space = agents[0].get_obs_space()
40
+ _action_space = agents[0].get_action_space()
41
+ args = _get_args()
42
+ Engine.physics_ticks_per_second = _get_speedup() * 60 # Replace with function body.
43
+ Engine.time_scale = _get_speedup() * 1.0
44
+ prints("physics ticks", Engine.physics_ticks_per_second, Engine.time_scale, _get_speedup(), speed_up)
45
+
46
+ # Run inference if onnx model path is set, otherwise wait for server connection
47
+ var run_onnx_model_inference : bool = onnx_model_path != ""
48
+ if run_onnx_model_inference:
49
+ assert(FileAccess.file_exists(onnx_model_path), "Onnx Model Path set on Sync node does not exist: " + onnx_model_path)
50
+ onnx_model = ONNXModel.new(onnx_model_path, 1)
51
+ _set_heuristic("model")
52
+ else:
53
+ connected = connect_to_server()
54
+ if connected:
55
+ _set_heuristic("model")
56
+ _handshake()
57
+ _send_env_info()
58
+ else:
59
+ _set_heuristic("human")
60
+
61
+ _set_seed()
62
+ _set_action_repeat()
63
+ initialized = true
64
+
65
+ func _physics_process(delta):
66
+ # two modes, human control, agent control
67
+ # pause tree, send obs, get actions, set actions, unpause tree
68
+ if n_action_steps % action_repeat != 0:
69
+ n_action_steps += 1
70
+ return
71
+
72
+ n_action_steps += 1
73
+
74
+ if connected:
75
+ get_tree().set_pause(true)
76
+
77
+ if just_reset:
78
+ just_reset = false
79
+ var obs = _get_obs_from_agents()
80
+
81
+ var reply = {
82
+ "type": "reset",
83
+ "obs": obs
84
+ }
85
+ _send_dict_as_json_message(reply)
86
+ # this should go straight to getting the action and setting it checked the agent, no need to perform one phyics tick
87
+ get_tree().set_pause(false)
88
+ return
89
+
90
+ if need_to_send_obs:
91
+ need_to_send_obs = false
92
+ var reward = _get_reward_from_agents()
93
+ var done = _get_done_from_agents()
94
+ #_reset_agents_if_done() # this ensures the new observation is from the next env instance : NEEDS REFACTOR
95
+
96
+ var obs = _get_obs_from_agents()
97
+
98
+ var reply = {
99
+ "type": "step",
100
+ "obs": obs,
101
+ "reward": reward,
102
+ "done": done
103
+ }
104
+ _send_dict_as_json_message(reply)
105
+
106
+ var handled = handle_message()
107
+
108
+ elif onnx_model != null:
109
+ var obs : Array = _get_obs_from_agents()
110
+
111
+ var actions = []
112
+ for o in obs:
113
+ var action = onnx_model.run_inference(o["obs"], 1.0)
114
+ action["output"] = clamp_array(action["output"], -1.0, 1.0)
115
+ var action_dict = _extract_action_dict(action["output"])
116
+ actions.append(action_dict)
117
+
118
+ _set_agent_actions(actions)
119
+ need_to_send_obs = true
120
+ get_tree().set_pause(false)
121
+ _reset_agents_if_done()
122
+
123
+ else:
124
+ _reset_agents_if_done()
125
+
126
+ func _extract_action_dict(action_array: Array):
127
+ var index = 0
128
+ var result = {}
129
+ for key in _action_space.keys():
130
+ var size = _action_space[key]["size"]
131
+ if _action_space[key]["action_type"] == "discrete":
132
+ result[key] = round(action_array[index])
133
+ else:
134
+ result[key] = action_array.slice(index,index+size)
135
+ index += size
136
+
137
+ return result
138
+
139
+ func _get_agents():
140
+ agents = get_tree().get_nodes_in_group("AGENT")
141
+
142
+ func _set_heuristic(heuristic):
143
+ for agent in agents:
144
+ agent.set_heuristic(heuristic)
145
+
146
+ func _handshake():
147
+ print("performing handshake")
148
+
149
+ var json_dict = _get_dict_json_message()
150
+ assert(json_dict["type"] == "handshake")
151
+ var major_version = json_dict["major_version"]
152
+ var minor_version = json_dict["minor_version"]
153
+ if major_version != MAJOR_VERSION:
154
+ print("WARNING: major verison mismatch ", major_version, " ", MAJOR_VERSION)
155
+ if minor_version != MINOR_VERSION:
156
+ print("WARNING: minor verison mismatch ", minor_version, " ", MINOR_VERSION)
157
+
158
+ print("handshake complete")
159
+
160
+ func _get_dict_json_message():
161
+ # returns a dictionary from of the most recent message
162
+ # this is not waiting
163
+ while stream.get_available_bytes() == 0:
164
+ stream.poll()
165
+ if stream.get_status() != 2:
166
+ print("server disconnected status, closing")
167
+ get_tree().quit()
168
+ return null
169
+
170
+ OS.delay_usec(10)
171
+
172
+ var message = stream.get_string()
173
+ var json_data = JSON.parse_string(message)
174
+
175
+ return json_data
176
+
177
+ func _send_dict_as_json_message(dict):
178
+ stream.put_string(JSON.stringify(dict))
179
+
180
+ func _send_env_info():
181
+ var json_dict = _get_dict_json_message()
182
+ assert(json_dict["type"] == "env_info")
183
+
184
+
185
+ var message = {
186
+ "type" : "env_info",
187
+ "observation_space": _obs_space,
188
+ "action_space":_action_space,
189
+ "n_agents": len(agents)
190
+ }
191
+ _send_dict_as_json_message(message)
192
+
193
+ func connect_to_server():
194
+ print("Waiting for one second to allow server to start")
195
+ OS.delay_msec(1000)
196
+ print("trying to connect to server")
197
+ stream = StreamPeerTCP.new()
198
+
199
+ # "localhost" was not working on windows VM, had to use the IP
200
+ var ip = "127.0.0.1"
201
+ var port = _get_port()
202
+ var connect = stream.connect_to_host(ip, port)
203
+ stream.set_no_delay(true) # TODO check if this improves performance or not
204
+ stream.poll()
205
+ # Fetch the status until it is either connected (2) or failed to connect (3)
206
+ while stream.get_status() < 2:
207
+ stream.poll()
208
+ return stream.get_status() == 2
209
+
210
+ func _get_args():
211
+ print("getting command line arguments")
212
+ var arguments = {}
213
+ for argument in OS.get_cmdline_args():
214
+ print(argument)
215
+ if argument.find("=") > -1:
216
+ var key_value = argument.split("=")
217
+ arguments[key_value[0].lstrip("--")] = key_value[1]
218
+ else:
219
+ # Options without an argument will be present in the dictionary,
220
+ # with the value set to an empty string.
221
+ arguments[argument.lstrip("--")] = ""
222
+
223
+ return arguments
224
+
225
+ func _get_speedup():
226
+ print(args)
227
+ return args.get("speedup", str(speed_up)).to_int()
228
+
229
+ func _get_port():
230
+ return args.get("port", DEFAULT_PORT).to_int()
231
+
232
+ func _set_seed():
233
+ var _seed = args.get("env_seed", DEFAULT_SEED).to_int()
234
+ seed(_seed)
235
+
236
+ func _set_action_repeat():
237
+ action_repeat = args.get("action_repeat", str(action_repeat)).to_int()
238
+
239
+ func disconnect_from_server():
240
+ stream.disconnect_from_host()
241
+
242
+
243
+
244
+ func handle_message() -> bool:
245
+ # get json message: reset, step, close
246
+ var message = _get_dict_json_message()
247
+ if message["type"] == "close":
248
+ print("received close message, closing game")
249
+ get_tree().quit()
250
+ get_tree().set_pause(false)
251
+ return true
252
+
253
+ if message["type"] == "reset":
254
+ print("resetting all agents")
255
+ _reset_all_agents()
256
+ just_reset = true
257
+ get_tree().set_pause(false)
258
+ #print("resetting forcing draw")
259
+ # RenderingServer.force_draw()
260
+ # var obs = _get_obs_from_agents()
261
+ # print("obs ", obs)
262
+ # var reply = {
263
+ # "type": "reset",
264
+ # "obs": obs
265
+ # }
266
+ # _send_dict_as_json_message(reply)
267
+ return true
268
+
269
+ if message["type"] == "call":
270
+ var method = message["method"]
271
+ var returns = _call_method_on_agents(method)
272
+ var reply = {
273
+ "type": "call",
274
+ "returns": returns
275
+ }
276
+ print("calling method from Python")
277
+ _send_dict_as_json_message(reply)
278
+ return handle_message()
279
+
280
+ if message["type"] == "action":
281
+ var action = message["action"]
282
+ _set_agent_actions(action)
283
+ need_to_send_obs = true
284
+ get_tree().set_pause(false)
285
+ return true
286
+
287
+ print("message was not handled")
288
+ return false
289
+
290
+ func _call_method_on_agents(method):
291
+ var returns = []
292
+ for agent in agents:
293
+ returns.append(agent.call(method))
294
+
295
+ return returns
296
+
297
+
298
+ func _reset_agents_if_done():
299
+ for agent in agents:
300
+ if agent.get_done():
301
+ agent.set_done_false()
302
+
303
+ func _reset_all_agents():
304
+ for agent in agents:
305
+ agent.needs_reset = true
306
+ #agent.reset()
307
+
308
+ func _get_obs_from_agents():
309
+ var obs = []
310
+ for agent in agents:
311
+ obs.append(agent.get_obs())
312
+
313
+ return obs
314
+
315
+ func _get_reward_from_agents():
316
+ var rewards = []
317
+ for agent in agents:
318
+ rewards.append(agent.get_reward())
319
+ agent.zero_reward()
320
+ return rewards
321
+
322
+ func _get_done_from_agents():
323
+ var dones = []
324
+ for agent in agents:
325
+ var done = agent.get_done()
326
+ if done: agent.set_done_false()
327
+ dones.append(done)
328
+ return dones
329
+
330
+ func _set_agent_actions(actions):
331
+ for i in range(len(actions)):
332
+ agents[i].set_action(actions[i])
333
+
334
+ func clamp_array(arr : Array, min:float, max:float):
335
+ var output : Array = []
336
+ for a in arr:
337
+ output.append(clamp(a, min, max))
338
+ return output
animation_library/shooter_pro.res ADDED
Binary file (737 kB). View file
 
assets/crosshair.xcf ADDED
Binary file (5.85 kB). View file
 
assets/prototype_textures/PNG/Dark/texture_01.png ADDED

Git LFS Details

  • SHA256: 07e28d7a86396fa4f1d7c43040f8e57e2374f6fa35b02bc48e70f9ccd4041c1a
  • Pointer size: 129 Bytes
  • Size of remote file: 2.77 kB
assets/prototype_textures/PNG/Dark/texture_02.png ADDED

Git LFS Details

  • SHA256: 1fedc9bd7ca804d1543900dfe2a8ddb3c98a5367baab5230acbadc0f337438d6
  • Pointer size: 129 Bytes
  • Size of remote file: 1.34 kB
assets/prototype_textures/PNG/Dark/texture_03.png ADDED

Git LFS Details

  • SHA256: e188004c88831e2446d77f7aec6b222516a08ac0ef9947ca56cedfd897d2d44a
  • Pointer size: 129 Bytes
  • Size of remote file: 2.73 kB
assets/prototype_textures/PNG/Dark/texture_04.png ADDED

Git LFS Details

  • SHA256: dbe2f5b4b9527cec8d95e1221bd1e29c76690a99e09d01b89fc518d893e412e3
  • Pointer size: 130 Bytes
  • Size of remote file: 13.2 kB
assets/prototype_textures/PNG/Dark/texture_05.png ADDED

Git LFS Details

  • SHA256: 5f54c65814e1f35ab744c0b84b810c22e886019f0fecc308efc1514b7b50caa9
  • Pointer size: 130 Bytes
  • Size of remote file: 19.1 kB
assets/prototype_textures/PNG/Dark/texture_06.png ADDED

Git LFS Details

  • SHA256: a96d3b723fe47f5d1bd0d5f2207c16755d5a4a568a22df86c6d88f243d413a68
  • Pointer size: 129 Bytes
  • Size of remote file: 2.74 kB
assets/prototype_textures/PNG/Dark/texture_07.png ADDED

Git LFS Details

  • SHA256: 5549f24c2758e5c151e386b21ae5bf547d045b796f69551c82e9ccc5974e22cc
  • Pointer size: 129 Bytes
  • Size of remote file: 2.74 kB
assets/prototype_textures/PNG/Dark/texture_08.png ADDED

Git LFS Details

  • SHA256: 31853441a32d26821d55b08d821304f0cce70fdf1b9bd308082132be89df6dc0
  • Pointer size: 128 Bytes
  • Size of remote file: 637 Bytes
assets/prototype_textures/PNG/Dark/texture_09.png ADDED

Git LFS Details

  • SHA256: ba6e578414e5713fb70797204dc445d2fff11b0672bdf6b2001890385526a8c0
  • Pointer size: 129 Bytes
  • Size of remote file: 2.84 kB
assets/prototype_textures/PNG/Dark/texture_10.png ADDED

Git LFS Details

  • SHA256: 314398e77d1dfa1586b8ac08181f8ce00d7bd90e24b8e755ecf7f0e9a869e9bb
  • Pointer size: 129 Bytes
  • Size of remote file: 9.18 kB
assets/prototype_textures/PNG/Dark/texture_11.png ADDED

Git LFS Details

  • SHA256: a1bdb8059b5939367cad693c4aef3043d744600fb3d155e45884d7f7ec634924
  • Pointer size: 129 Bytes
  • Size of remote file: 9.05 kB
assets/prototype_textures/PNG/Dark/texture_12.png ADDED

Git LFS Details

  • SHA256: 1a8f40df05ff6adcd152f0753ac5fd2a0a3cda3176d0732f63683e55e0f3073a
  • Pointer size: 129 Bytes
  • Size of remote file: 9.59 kB
assets/prototype_textures/PNG/Dark/texture_13.png ADDED

Git LFS Details

  • SHA256: 2b85643de9a053f8aea5b8692fd750a5a949e709c168304a965c436bd4a1d9d7
  • Pointer size: 129 Bytes
  • Size of remote file: 9.87 kB
assets/prototype_textures/PNG/Green/texture_01.png ADDED

Git LFS Details

  • SHA256: ecba61e1d5e9acd605cec1724f5c902bf599146e94b09b053b428b63c4ec2951
  • Pointer size: 129 Bytes
  • Size of remote file: 9.87 kB
assets/prototype_textures/PNG/Green/texture_02.png ADDED

Git LFS Details

  • SHA256: 1309da8552e484f14d478ac0346212dad810ac73d23ccde401d8b25c183b311c
  • Pointer size: 129 Bytes
  • Size of remote file: 2.77 kB
assets/prototype_textures/PNG/Green/texture_03.png ADDED

Git LFS Details

  • SHA256: d150be820736ea50358de171ff650ff514770ff0093e3bf67be400f4b97bde22
  • Pointer size: 129 Bytes
  • Size of remote file: 1.34 kB
assets/prototype_textures/PNG/Green/texture_04.png ADDED

Git LFS Details

  • SHA256: e8da3b07480e9289df8badde045dc57271bb4afe36537c34af90c25501b2b3dc
  • Pointer size: 129 Bytes
  • Size of remote file: 2.73 kB