Skip to content

Commit

Permalink
Align project to Godot 4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Scony committed Jul 1, 2023
1 parent 82386eb commit 8b5f3c9
Show file tree
Hide file tree
Showing 17 changed files with 33 additions and 26 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## [main]

### New features
- Added structure rally points

### Changed
- Godot 4.1 support added instead of Godot 4.0 (4.0 support is still present on branch)

## [0.9.0]

### New features
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ This game is not going to be a very advanced RTS that would compete with other g

## Godot compatibility

This project is compatible with Godot `4.0`, `4.0.1`, `4.0.2`, and `4.0.3`.
This project is compatible with Godot `4.1`.

Support for Godot `4.0`, `4.0.1`, `4.0.2`, and `4.0.3` is available on `godot-4.0-support` branch.

## Screenshots

Expand Down
4 changes: 2 additions & 2 deletions project.godot
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ config_version=5

config/name="Open RTS"
run/main_scene="res://source/Main.tscn"
config/features=PackedStringArray("4.0", "Forward Plus")
config/features=PackedStringArray("4.1", "Forward Plus")
boot_splash/bg_color=Color(0, 0, 0, 1)
boot_splash/image="res://assets/logos/godot_logo_vertical_monochrome_dark_312x357.png"
boot_splash/fullsize=false
Expand All @@ -31,8 +31,8 @@ Utils="*res://source/Utils.gd"

gdscript/warnings/standalone_expression=0
gdscript/warnings/incompatible_ternary=0
gdscript/warnings/assert_always_false=0
gdscript/warnings/static_called_on_instance=0
gdscript/warnings/assert_always_false=0

[display]

Expand Down
4 changes: 4 additions & 0 deletions source/match/TerrainNavigation.gd
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,9 @@ extends Node3D
@onready var _navigation_region = find_child("NavigationRegion3D")


func _ready():
NavigationServer3D.map_force_update(navigation_map_rid)


func rebake():
_navigation_region.bake_navigation_mesh(false)
3 changes: 1 addition & 2 deletions source/match/units/AircraftFactory.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,8 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.05, 0)
radius = 1.5

[node name="MovementObstacle" parent="." instance=ExtResource("3_j1buj")]
estimate_radius = false
radius = 1.5
agent_height_offset = 0.5
path_height_offset = 0.5

[node name="HealthBar" parent="." instance=ExtResource("4_igtfr")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2, 0)
Expand Down
3 changes: 1 addition & 2 deletions source/match/units/AntiAirTurret.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,8 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.05, 0)
radius = 0.6

[node name="MovementObstacle" parent="." instance=ExtResource("3_hgb44")]
estimate_radius = false
radius = 0.6
agent_height_offset = 0.5
path_height_offset = 0.5

[node name="HealthBar" parent="." instance=ExtResource("4_qhoj1")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.1, 0)
Expand Down
3 changes: 1 addition & 2 deletions source/match/units/AntiGroundTurret.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,8 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.05, 0)
radius = 0.6

[node name="MovementObstacle" parent="." instance=ExtResource("3_ds80w")]
estimate_radius = false
radius = 0.6
agent_height_offset = 0.5
path_height_offset = 0.5

[node name="HealthBar" parent="." instance=ExtResource("4_r6emo")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.1, 0)
Expand Down
3 changes: 1 addition & 2 deletions source/match/units/CommandCenter.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,8 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.05, 0)
radius = 2.0

[node name="MovementObstacle" parent="." instance=ExtResource("4_f5u8t")]
estimate_radius = false
radius = 2.0
agent_height_offset = 0.5
path_height_offset = 0.5

[node name="HealthBar" parent="." instance=ExtResource("5_xuulo")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2, 0)
Expand Down
2 changes: 1 addition & 1 deletion source/match/units/Drone.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ radius = 0.6
[node name="Movement" parent="." instance=ExtResource("4_wemaw")]
path_desired_distance = 0.1
target_desired_distance = 0.1
agent_height_offset = 0.5
path_height_offset = 0.5
radius = 0.6
neighbor_distance = 8.0
max_neighbors = 40
Expand Down
2 changes: 1 addition & 1 deletion source/match/units/Helicopter.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ radius = 0.8
[node name="Movement" parent="." instance=ExtResource("3_4ms8e")]
path_desired_distance = 0.1
target_desired_distance = 0.1
agent_height_offset = 0.5
path_height_offset = 0.5
radius = 0.8
neighbor_distance = 8.0
max_neighbors = 40
Expand Down
4 changes: 2 additions & 2 deletions source/match/units/Tank.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.05, 0)
[node name="Movement" parent="." instance=ExtResource("3_4m8ma")]
path_desired_distance = 0.5
target_desired_distance = 0.5
agent_height_offset = 0.5
path_height_offset = 0.5
path_max_distance = 0.51
radius = 1.0
neighbor_distance = 8.0
max_neighbors = 40
time_horizon = 3.0
time_horizon_agents = 3.0
speed = 2.75

[node name="HealthBar" parent="." instance=ExtResource("4_7l0rt")]
Expand Down
3 changes: 1 addition & 2 deletions source/match/units/VehicleFactory.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,8 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.05, 0)
radius = 1.5

[node name="MovementObstacle" parent="." instance=ExtResource("3_cp6bx")]
estimate_radius = false
radius = 1.5
agent_height_offset = 0.5
path_height_offset = 0.5

[node name="HealthBar" parent="." instance=ExtResource("4_xd2eg")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.75, 0)
Expand Down
4 changes: 2 additions & 2 deletions source/match/units/Worker.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ radius = 0.6
[node name="Movement" parent="." instance=ExtResource("4_lmprj")]
path_desired_distance = 0.31
target_desired_distance = 0.31
agent_height_offset = 0.5
path_height_offset = 0.5
path_max_distance = 0.31
radius = 0.6
neighbor_distance = 8.0
max_neighbors = 40
time_horizon = 3.0
time_horizon_agents = 3.0
speed = 2.5

[node name="HealthBar" parent="." instance=ExtResource("5_50cqd")]
Expand Down
3 changes: 1 addition & 2 deletions source/match/units/non-player/ResourceA.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,8 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.05, 0)
radius = 0.6

[node name="MovementObstacle" parent="." instance=ExtResource("3_xabt4")]
estimate_radius = false
radius = 0.6
agent_height_offset = 0.5
path_height_offset = 0.5

[node name="Targetability" parent="." instance=ExtResource("5_vqxvf")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.05, 0)
Expand Down
3 changes: 1 addition & 2 deletions source/match/units/non-player/ResourceB.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,8 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.05, 0)
radius = 0.6

[node name="MovementObstacle" parent="." instance=ExtResource("4_sxjck")]
estimate_radius = false
radius = 0.6
agent_height_offset = 0.5
path_height_offset = 0.5

[node name="Targetability" parent="." instance=ExtResource("5_y6273")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.05, 0)
Expand Down
2 changes: 1 addition & 1 deletion source/match/units/traits/Movement.gd
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ func _align_unit_position_to_navigation():
NavigationServer3D.map_get_closest_point(
get_navigation_map(), get_parent().global_transform.origin
)
- Vector3(0, agent_height_offset, 0)
- Vector3(0, path_height_offset, 0)
)


Expand Down
4 changes: 2 additions & 2 deletions source/match/units/traits/MovementObstacle.gd
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
extends NavigationObstacle3D

@export var domain = Constants.Match.Navigation.Domain.TERRAIN
@export var agent_height_offset = 0.0
@export var path_height_offset = 0.0

@onready var _match = find_parent("Match")
@onready var _unit = get_parent()
Expand All @@ -18,5 +18,5 @@ func _align_unit_position_to_navigation():
NavigationServer3D.map_get_closest_point(
get_navigation_map(), get_parent().global_transform.origin
)
- Vector3(0, agent_height_offset, 0)
- Vector3(0, path_height_offset, 0)
)

0 comments on commit 8b5f3c9

Please sign in to comment.