diff --git a/.github/workflows/linux_builds.yml b/.github/workflows/linux_builds.yml index e74964e..752a9af 100644 --- a/.github/workflows/linux_builds.yml +++ b/.github/workflows/linux_builds.yml @@ -9,6 +9,13 @@ jobs: steps: - uses: actions/checkout@v2 + # Azure repositories are not reliable, we need to prevent azure giving us packages. + - name: Make apt sources.list use the default Ubuntu repositories + run: | + sudo rm -f /etc/apt/sources.list.d/* + sudo cp -f misc/ci/sources.list /etc/apt/sources.list + sudo apt-get update + # Install all packages (except scons) - name: Configure dependencies run: | diff --git a/All.tscn b/All.tscn index 36f5d70..cfedf97 100644 --- a/All.tscn +++ b/All.tscn @@ -1,23 +1,37 @@ -[gd_scene load_steps=7 format=2] +[gd_scene load_steps=10 format=2] [ext_resource path="res://MainScenes/Control.tscn" type="PackedScene" id=1] [ext_resource path="res://MainScenes/Spatial.tscn" type="PackedScene" id=2] [ext_resource path="res://MainScenes/Node2D.tscn" type="PackedScene" id=3] [ext_resource path="res://MainScenes/Other.tscn" type="PackedScene" id=4] -[ext_resource path="res://MainScenes/Operators.gd" type="Script" id=5] +[ext_resource path="res://MainScenes/Operators.tscn" type="PackedScene" id=5] [ext_resource path="res://Physics/2D/Physics2D.tscn" type="PackedScene" id=6] +[ext_resource path="res://Rendering/Lights3D/Lights3D.tscn" type="PackedScene" id=7] +[ext_resource path="res://Rendering/Lights2D/Lights2D.tscn" type="PackedScene" id=8] +[ext_resource path="res://Physics/3D/Physics3D.tscn" type="PackedScene" id=9] [node name="All" type="Node"] -[node name="GridContainer" parent="." instance=ExtResource( 1 )] +[node name="MainScenes" type="Node" parent="."] -[node name="Node2D" parent="." instance=ExtResource( 3 )] +[node name="Spatial" parent="MainScenes" instance=ExtResource( 2 )] -[node name="Node" parent="." instance=ExtResource( 4 )] +[node name="Node2D" parent="MainScenes" instance=ExtResource( 3 )] -[node name="Spatial" parent="." instance=ExtResource( 2 )] +[node name="Other" parent="MainScenes" instance=ExtResource( 4 )] -[node name="Operators" type="Node2D" parent="."] -script = ExtResource( 5 ) +[node name="Control" parent="MainScenes" instance=ExtResource( 1 )] -[node name="Physics2D" parent="." instance=ExtResource( 6 )] +[node name="Operators" parent="MainScenes" instance=ExtResource( 5 )] + +[node name="Physics" type="Node" parent="."] + +[node name="Physics2D" parent="Physics" instance=ExtResource( 6 )] + +[node name="Physics3D" parent="Physics" instance=ExtResource( 9 )] + +[node name="Rendering" type="Node" parent="."] + +[node name="Lights2D" parent="Rendering" instance=ExtResource( 8 )] + +[node name="Lights3D" parent="Rendering" instance=ExtResource( 7 )] diff --git a/Autoload/Autoload.gd b/Autoload/Autoload.gd index d3ae7ea..15cc40b 100644 --- a/Autoload/Autoload.gd +++ b/Autoload/Autoload.gd @@ -1,21 +1,23 @@ extends Node -const screen_size = Vector2(1024,600) +const screen_size = Vector2(1024, 600) -const RANGE : int = 5 +const RANGE: int = 5 + +var time_to_show: float = -1000.0 -var time_to_show : float = -1000.0 func _init(): for argument in OS.get_cmdline_args(): - var rr : String = argument - if rr.find("tscn") != -1: # Ignore all tscn scenes/names + var rr: String = argument + if rr.find("tscn") != -1: # Ignore all tscn scenes/names continue time_to_show = argument.to_float() print("Time set to: " + str(time_to_show)) break -func _process(delta : float) -> void: + +func _process(delta: float) -> void: time_to_show -= delta if time_to_show < 0 && time_to_show > -500: get_tree().quit() diff --git a/MainScenes/Control.gd b/MainScenes/Control.gd index 24b1a80..26896ea 100644 --- a/MainScenes/Control.gd +++ b/MainScenes/Control.gd @@ -1,5 +1,6 @@ extends GridContainer + func _ready(): for _i in range(Autoload.RANGE): add_child(Control.new()) @@ -57,8 +58,9 @@ func _ready(): add_child(TextureRect.new()) add_child(Tree.new()) add_child(VideoPlayer.new()) - -func _process(_delta : float) -> void: - for i in get_children() : + + +func _process(_delta: float) -> void: + for i in get_children(): if i is Control: - i._set_size(Vector2(200 * randf() - 100,200 * randf() - 100)) + i._set_size(Vector2(200 * randf() - 100, 200 * randf() - 100)) diff --git a/MainScenes/Control.tscn b/MainScenes/Control.tscn index 10bf99e..b6c526e 100644 --- a/MainScenes/Control.tscn +++ b/MainScenes/Control.tscn @@ -2,8 +2,6 @@ [ext_resource path="res://MainScenes/Control.gd" type="Script" id=1] - - [node name="GridContainer" type="GridContainer"] anchor_right = 1.0 anchor_bottom = 1.0 diff --git a/MainScenes/Node2D.gd b/MainScenes/Node2D.gd index 3666da6..e1d0aa7 100644 --- a/MainScenes/Node2D.gd +++ b/MainScenes/Node2D.gd @@ -1,5 +1,6 @@ extends Node2D + func _ready(): for _i in range(Autoload.RANGE): add_child(Node2D.new()) @@ -14,7 +15,7 @@ func _ready(): add_child(CPUParticles2D.new()) add_child(Camera2D.new()) add_child(CanvasModulate.new()) - add_child(CollisionPolygon2D.new()) +# add_child(CollisionPolygon2D.new()) # Errors add_child(CollisionShape2D.new()) add_child(DampedSpringJoint2D.new()) add_child(GrooveJoint2D.new()) @@ -41,8 +42,9 @@ func _ready(): add_child(VisibilityNotifier2D.new()) add_child(VisibilityEnabler2D.new()) add_child(YSort.new()) - -func _process(_delta : float) -> void: - for i in get_children() : + + +func _process(_delta: float) -> void: + for i in get_children(): if i is Node2D: - i.set_position(Vector2(1000 * randf() - 500,1000 * randf() - 500)) + i.set_position(Vector2(1000 * randf() - 500, 1000 * randf() - 500)) diff --git a/MainScenes/Node2D.tscn b/MainScenes/Node2D.tscn index 759923a..baaa1d3 100644 --- a/MainScenes/Node2D.tscn +++ b/MainScenes/Node2D.tscn @@ -2,7 +2,6 @@ [ext_resource path="res://MainScenes/Node2D.gd" type="Script" id=1] - [node name="Node2D" type="Node2D"] script = ExtResource( 1 ) diff --git a/MainScenes/Operators.tscn b/MainScenes/Operators.tscn new file mode 100644 index 0000000..1ffbc32 --- /dev/null +++ b/MainScenes/Operators.tscn @@ -0,0 +1,10 @@ +[gd_scene load_steps=3 format=2] + +[ext_resource path="res://MainScenes/Operators.gd" type="Script" id=1] +[ext_resource path="res://MainScenes/Operators2.gd" type="Script" id=2] + +[node name="Operators" type="Node2D"] +script = ExtResource( 1 ) + +[node name="Operators2" type="Node2D" parent="."] +script = ExtResource( 2 ) diff --git a/MainScenes/Operators2.gd b/MainScenes/Operators2.gd new file mode 100644 index 0000000..0c1a0f6 --- /dev/null +++ b/MainScenes/Operators2.gd @@ -0,0 +1,227 @@ +extends Node2D + +#var all_types: Array = [ +# AABB(), +# Array(), +# Basis(), +# Color(), +# Dictionary(), +# NodePath(), +# Plane(), +# PoolByteArray(), +# PoolColorArray(), +# PoolIntArray(), +# PoolRealArray(), +# PoolStringArray(), +# PoolVector2Array(), +# PoolVector3Array(), +# Quat(), +# Rect2(), +# String(), +# Transform(), +# Transform2D(), +# Vector2(), +# Vector3(), +# float(), +# int(), +# bool() +#] + + +func _ready() -> void: +# for i in [] + + for i in [ + Color(), + Plane(), + Quat(), + Vector2(), + Vector3(), + float(), + int(), + ]: + i = -i + for i in [ + AABB(), + Array(), + Basis(), + Color(), + Dictionary(), + NodePath(), + Plane(), + PoolByteArray(), + PoolColorArray(), + PoolIntArray(), + PoolRealArray(), + PoolStringArray(), + PoolVector2Array(), + PoolVector3Array(), + Quat(), + Rect2(), + String(), + Transform(), + Transform2D(), + Vector2(), + Vector3(), + float(), + int(), + bool() +]: + i = i + for i in [ + Plane(), + Quat(), + Vector2(), + Vector3(), + float(), + int(), +]: + i = +i + for i in [ + Color(), + Vector2(), + Vector3(), + float(), + int(), +]: + i = i * 1.0 + i = i * 1 + + + + for i in [ + Color(), + Vector2(), + Vector3(), + float(), + int(), +]: + i = i / 1.0 + i = i / 1 + + + for i in [ + AABB(), + Array(), + Basis(), + Color(), + Dictionary(), + NodePath(), + Plane(), + PoolByteArray(), + PoolColorArray(), + PoolIntArray(), + PoolRealArray(), + PoolStringArray(), + PoolVector2Array(), + PoolVector3Array(), + Quat(), + Rect2(), + String(), + Transform(), + Transform2D(), + Vector2(), + Vector3(), + float(), + int(), + bool() +]: + i == i + i != i + + + for i in [ + String(), + Vector2(), + Vector3(), + float(), + int(), +]: + i >= i + i <= i + i > i + i < i + + + for i in [ + int() +]: + i | i + i & i + + for i in [ + AABB(), + Array(), + Basis(), + Color(), + Dictionary(), + NodePath(), + Plane(), + PoolByteArray(), + PoolColorArray(), + PoolIntArray(), + PoolRealArray(), + PoolStringArray(), + PoolVector2Array(), + PoolVector3Array(), + Quat(), + Rect2(), + String(), + Transform(), + Transform2D(), + Vector2(), + Vector3(), + float(), + int(), + bool() +]: + i || i + i && i + + for i in [ + int(), +]: + i = i % 10 + + for i in [ + Array(), + Dictionary(), + String(), +]: + i in i + + for i in [ + float(), + int(), + bool() +]: + i as int + + for i in [ + AABB(), + Array(), + Basis(), + Color(), + Dictionary(), + NodePath(), + Plane(), + PoolByteArray(), + PoolColorArray(), + PoolIntArray(), + PoolRealArray(), + PoolStringArray(), + PoolVector2Array(), + PoolVector3Array(), + Quat(), + Rect2(), + String(), + Transform(), + Transform2D(), + Vector2(), + Vector3(), + float(), + int(), + bool() +]: + typeof(i) + diff --git a/MainScenes/Other.gd b/MainScenes/Other.gd index 297cf74..3a57bf8 100644 --- a/MainScenes/Other.gd +++ b/MainScenes/Other.gd @@ -1,5 +1,6 @@ extends Node + func _ready() -> void: for _i in range(Autoload.RANGE): add_child(AnimationPlayer.new()) @@ -15,4 +16,3 @@ func _ready() -> void: add_child(Tween.new()) add_child(Viewport.new()) add_child(WorldEnvironment.new()) - diff --git a/MainScenes/Other.tscn b/MainScenes/Other.tscn index 7bcd959..570ca21 100644 --- a/MainScenes/Other.tscn +++ b/MainScenes/Other.tscn @@ -2,7 +2,5 @@ [ext_resource path="res://MainScenes/Other.gd" type="Script" id=1] - - [node name="Node" type="Node"] script = ExtResource( 1 ) diff --git a/MainScenes/Spatial.gd b/MainScenes/Spatial.gd index 8c2b1a1..a4d925c 100644 --- a/MainScenes/Spatial.gd +++ b/MainScenes/Spatial.gd @@ -1,5 +1,6 @@ extends Spatial + func _ready(): for i in range(Autoload.RANGE): add_child(Spatial.new()) @@ -61,9 +62,10 @@ func _ready(): add_child(VehicleWheel.new()) add_child(VisibilityNotifier.new()) add_child(VisibilityEnabler.new()) - -func _process(delta : float) -> void: + + +func _process(delta: float) -> void: for i in get_children(): if i.get_name() != "Camera": - i.set_scale(Vector3(delta + 1,delta + 1,delta + 1)) - i.set_translation(Vector3(10 * randf(),10 * randf(),10 * randf())) + i.set_scale(Vector3(delta + 1, delta + 1, delta + 1)) + i.set_translation(Vector3(10 * randf(), 10 * randf(), 10 * randf())) diff --git a/MainScenes/Spatial.tscn b/MainScenes/Spatial.tscn index 0738fda..f08b360 100644 --- a/MainScenes/Spatial.tscn +++ b/MainScenes/Spatial.tscn @@ -2,7 +2,6 @@ [ext_resource path="res://MainScenes/Spatial.gd" type="Script" id=1] - [node name="Spatial" type="Spatial"] script = ExtResource( 1 ) diff --git a/Physics/2D/Area2D.gd b/Physics/2D/Area2D.gd index 634b105..4002928 100644 --- a/Physics/2D/Area2D.gd +++ b/Physics/2D/Area2D.gd @@ -1,14 +1,16 @@ extends Node2D -var move_vector : Vector2 = Vector2(1,1) -var speed : float = 1000.0 +var move_vector: Vector2 = Vector2(1, 1) +var speed: float = 1000.0 + func _ready(): pass - + + func _process(delta): - position += Vector2(move_vector.x * delta * speed,move_vector.y * delta * speed) - + position += Vector2(move_vector.x * delta * speed, move_vector.y * delta * speed) + if position.y > Autoload.screen_size.y: move_vector.y = -1 elif position.y < 0: @@ -17,11 +19,11 @@ func _process(delta): move_vector.x = -1 elif position.x < 0: move_vector.x = 1 - + func _on_Area2D_area_entered(area): move_vector = -move_vector func _on_Area2D_body_entered(body): - move_vector = Vector2(move_vector.x,-move_vector.y) + move_vector = Vector2(move_vector.x, -move_vector.y) diff --git a/Physics/2D/Area2D.tscn b/Physics/2D/Area2D.tscn index 81a939c..45d25ab 100644 --- a/Physics/2D/Area2D.tscn +++ b/Physics/2D/Area2D.tscn @@ -9,6 +9,9 @@ script = ExtResource( 2 ) [node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="."] polygon = PoolVector2Array( 4.018, -13.1782, -15.9057, 3.23778, 1.63277, 17.5492, 19.3115, 2.39594 ) +[node name="CollisionPolygon2D2" type="CollisionPolygon2D" parent="."] +polygon = PoolVector2Array( -4.58427, -16.8342, -20.5974, -4.94143, -8.23639, 16.784, 20.4187, 13.5065 ) + [node name="Sprite" type="Sprite" parent="."] texture = ExtResource( 1 ) diff --git a/Physics/2D/KinematicBody2D.gd b/Physics/2D/KinematicBody2D.gd index ea50a4c..1b62b0a 100644 --- a/Physics/2D/KinematicBody2D.gd +++ b/Physics/2D/KinematicBody2D.gd @@ -1,14 +1,16 @@ extends KinematicBody2D -var move_vector : Vector2 = Vector2(1,1) -var speed : float = 1000.0 +var move_vector: Vector2 = Vector2(1, 1) +var speed: float = 1000.0 + func _ready(): pass - + + func _process(delta): - position += Vector2(move_vector.x * delta * speed,move_vector.y * delta * speed) - + position += Vector2(move_vector.x * delta * speed, move_vector.y * delta * speed) + if position.y > Autoload.screen_size.y: move_vector.y = -1 elif position.y < 0: diff --git a/Physics/2D/Physics2D.gd b/Physics/2D/Physics2D.gd index e251cf8..66c0e9e 100644 --- a/Physics/2D/Physics2D.gd +++ b/Physics/2D/Physics2D.gd @@ -1 +1,5 @@ extends Node2D + + +func _physics_process(delta): + pass diff --git a/Physics/2D/RigidBody2D.gd b/Physics/2D/RigidBody2D.gd index 35dff08..e41f2ab 100644 --- a/Physics/2D/RigidBody2D.gd +++ b/Physics/2D/RigidBody2D.gd @@ -1,14 +1,16 @@ extends RigidBody2D -var move_vector : Vector2 = Vector2(1,1) -var speed : float = 1000.0 +var move_vector: Vector2 = Vector2(1, 1) +var speed: float = 1000.0 + func _ready(): pass - + + func _process(delta): #position += Vector2(move_vector.x * delta * speed,move_vector.y * delta * speed) - + if position.y > Autoload.screen_size.y: move_vector.y = -1 elif position.y < 0: @@ -17,4 +19,4 @@ func _process(delta): move_vector.x = -1 elif position.x < 0: move_vector.x = 1 - apply_impulse(move_vector,Vector2(0,1)) + apply_impulse(move_vector, Vector2(0, 1)) diff --git a/Physics/2D/StaticBody2D.gd b/Physics/2D/StaticBody2D.gd index 98e77d2..b4380f0 100644 --- a/Physics/2D/StaticBody2D.gd +++ b/Physics/2D/StaticBody2D.gd @@ -1,14 +1,16 @@ extends StaticBody2D -var move_vector : Vector2 = Vector2(1,1) -var speed : float = 1000.0 +var move_vector: Vector2 = Vector2(1, 1) +var speed: float = 1000.0 + func _ready(): pass - + + func _process(delta): - position += Vector2(move_vector.x * delta * speed,move_vector.y * delta * speed) - + position += Vector2(move_vector.x * delta * speed, move_vector.y * delta * speed) + if position.y > Autoload.screen_size.y: move_vector.y = -1 elif position.y < 0: diff --git a/Physics/3D/Physics3D.tscn b/Physics/3D/Physics3D.tscn new file mode 100644 index 0000000..1376860 --- /dev/null +++ b/Physics/3D/Physics3D.tscn @@ -0,0 +1,273 @@ +[gd_scene load_steps=11 format=2] + +[ext_resource path="res://icon 32x32.png" type="Texture" id=1] +[ext_resource path="res://Physics/3D/StaticArena.gd" type="Script" id=2] + +[sub_resource type="PhysicsMaterial" id=1] +friction = 0.89 +rough = true + +[sub_resource type="SpatialMaterial" id=2] +albedo_color = Color( 1, 1, 1, 0.521569 ) +albedo_texture = ExtResource( 1 ) +metallic = 1.0 +metallic_specular = 0.86 +metallic_texture = ExtResource( 1 ) + +[sub_resource type="BoxShape" id=3] +extents = Vector3( 50, 2, 50 ) + +[sub_resource type="SpatialMaterial" id=4] +params_diffuse_mode = 1 +albedo_texture = ExtResource( 1 ) +metallic = 0.8 + +[sub_resource type="BoxShape" id=5] +extents = Vector3( 50, 20, 5 ) + +[sub_resource type="BoxShape" id=6] +extents = Vector3( 11.8794, 1.37845, 22.281 ) + +[sub_resource type="BoxShape" id=7] +extents = Vector3( 11.8794, 1.37845, 22.281 ) + +[sub_resource type="SphereShape" id=8] + +[node name="Physics3D" type="Spatial"] + +[node name="DirectionalLight" type="DirectionalLight" parent="."] +transform = Transform( 1, 0, 0, 0, -0.959707, 0.281002, 0, -0.281002, -0.959707, 0, 35.3705, 0 ) +light_energy = 1.45 + +[node name="StaticArena" type="Spatial" parent="."] +script = ExtResource( 2 ) + +[node name="StaticBody" type="StaticBody" parent="StaticArena"] +collision_layer = 2147483651 +collision_mask = 279045 +physics_material_override = SubResource( 1 ) + +[node name="CSGBox" type="CSGBox" parent="StaticArena/StaticBody"] +width = 100.0 +height = 4.32824 +depth = 100.0 +material = SubResource( 2 ) + +[node name="CollisionShape" type="CollisionShape" parent="StaticArena/StaticBody"] +shape = SubResource( 3 ) + +[node name="StaticBody2" type="StaticBody" parent="StaticArena"] +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 18.1689, 1.64214 ) +collision_layer = 2147483651 +collision_mask = 279045 +physics_material_override = SubResource( 1 ) + +[node name="CSGBox" type="CSGBox" parent="StaticArena/StaticBody2"] +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -46.5124 ) +width = 100.0 +height = 40.0 +depth = 10.0 +material = SubResource( 4 ) + +[node name="CollisionShape" type="CollisionShape" parent="StaticArena/StaticBody2"] +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -46.709 ) +shape = SubResource( 5 ) + +[node name="StaticBody3" type="StaticBody" parent="StaticArena"] +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 18.1689, 91.732 ) +collision_layer = 2147483651 +collision_mask = 279045 +physics_material_override = SubResource( 1 ) + +[node name="CSGBox" type="CSGBox" parent="StaticArena/StaticBody3"] +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -46.5124 ) +width = 100.0 +height = 40.0 +depth = 10.0 +material = SubResource( 4 ) + +[node name="CollisionShape" type="CollisionShape" parent="StaticArena/StaticBody3"] +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -46.709 ) +shape = SubResource( 5 ) + +[node name="StaticBody4" type="StaticBody" parent="StaticArena"] +transform = Transform( -1.62921e-07, 0, -1, 0, 1, 0, 1, 0, -1.62921e-07, -1.90218, 18.1689, 0.572887 ) +collision_layer = 2147483651 +collision_mask = 279045 +physics_material_override = SubResource( 1 ) + +[node name="CSGBox" type="CSGBox" parent="StaticArena/StaticBody4"] +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.13509, -46.5124 ) +width = 100.0 +height = 40.0 +depth = 10.0 +material = SubResource( 4 ) + +[node name="CollisionShape" type="CollisionShape" parent="StaticArena/StaticBody4"] +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -46.709 ) +shape = SubResource( 5 ) + +[node name="StaticBody5" type="StaticBody" parent="StaticArena"] +transform = Transform( -1.62921e-07, 0, -1, 0, 1, 0, 1, 0, -1.62921e-07, -92.1931, 18.8845, 0.814518 ) +collision_layer = 2147483651 +collision_mask = 279045 +physics_material_override = SubResource( 1 ) + +[node name="CSGBox" type="CSGBox" parent="StaticArena/StaticBody5"] +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -46.5124 ) +width = 100.0 +height = 40.0 +depth = 10.0 +material = SubResource( 4 ) + +[node name="CollisionShape" type="CollisionShape" parent="StaticArena/StaticBody5"] +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -46.709 ) +shape = SubResource( 5 ) + +[node name="StaticBody6" type="StaticBody" parent="StaticArena"] +transform = Transform( 0.998532, 0.013617, -0.0524264, 0, 0.967885, 0.251394, 0.054166, -0.251025, 0.966464, -16.8315, 7.76313, 0 ) + +[node name="CollisionShape" type="CollisionShape" parent="StaticArena/StaticBody6"] +shape = SubResource( 6 ) + +[node name="CSGBox" type="CSGBox" parent="StaticArena/StaticBody6"] +width = 23.9394 +depth = 44.6359 + +[node name="StaticBody7" type="StaticBody" parent="StaticArena"] +transform = Transform( -0.642787, 0.192579, -0.741443, 0, 0.967885, 0.251394, 0.766045, 0.161593, -0.622144, 10.0702, 7.03413, 0 ) + +[node name="CollisionShape" type="CollisionShape" parent="StaticArena/StaticBody7"] +transform = Transform( 1, -9.31323e-10, 0, 0, 1, 1.49012e-08, 3.72529e-09, 1.49012e-08, 1, 0, 0, 0 ) +shape = SubResource( 7 ) + +[node name="CSGBox" type="CSGBox" parent="StaticArena/StaticBody7"] +width = 23.9394 +depth = 44.6359 + +[node name="Objects" type="Spatial" parent="."] + +[node name="RigidBody" type="RigidBody" parent="Objects"] +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -15.1259, 41.1727, -21.1681 ) +linear_velocity = Vector3( 0, 5, 0 ) + +[node name="CollisionShape" type="CollisionShape" parent="Objects/RigidBody"] +transform = Transform( 7, 0, 0, 0, 7, 0, 0, 0, 7, 0, 0, 0 ) +shape = SubResource( 8 ) + +[node name="CSGSphere" type="CSGSphere" parent="Objects/RigidBody/CollisionShape"] + +[node name="RigidBody2" type="RigidBody" parent="Objects"] +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -15.1259, 41.1727, 20.5363 ) +linear_velocity = Vector3( 0, 5, 0 ) + +[node name="CollisionShape" type="CollisionShape" parent="Objects/RigidBody2"] +transform = Transform( 7, 0, 0, 0, 7, 0, 0, 0, 7, 0, 0, 0 ) +shape = SubResource( 8 ) + +[node name="CSGSphere" type="CSGSphere" parent="Objects/RigidBody2/CollisionShape"] + +[node name="RigidBody3" type="RigidBody" parent="Objects"] +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -15.1259, 50.364, -3.65285 ) +linear_velocity = Vector3( 0, 5, 0 ) + +[node name="CollisionShape" type="CollisionShape" parent="Objects/RigidBody3"] +transform = Transform( 7, 0, 0, 0, 7, 0, 0, 0, 7, 0, 0, 0 ) +shape = SubResource( 8 ) + +[node name="CSGSphere" type="CSGSphere" parent="Objects/RigidBody3/CollisionShape"] + +[node name="RigidBody4" type="RigidBody" parent="Objects"] +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 7.28166, 41.1727, -21.1681 ) +linear_velocity = Vector3( 0, 5, 0 ) + +[node name="CollisionShape" type="CollisionShape" parent="Objects/RigidBody4"] +transform = Transform( 7, 0, 0, 0, 7, 0, 0, 0, 7, 0, 0, 0 ) +shape = SubResource( 8 ) + +[node name="CSGSphere" type="CSGSphere" parent="Objects/RigidBody4/CollisionShape"] + +[node name="RigidBody5" type="RigidBody" parent="Objects"] +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 7.80622, 41.1727, 12.6092 ) +linear_velocity = Vector3( 0, 5, 0 ) + +[node name="CollisionShape" type="CollisionShape" parent="Objects/RigidBody5"] +transform = Transform( 7, 0, 0, 0, 7, 0, 0, 0, 7, 0, 0, 0 ) +shape = SubResource( 8 ) + +[node name="CSGSphere" type="CSGSphere" parent="Objects/RigidBody5/CollisionShape"] + +[node name="RigidBody6" type="RigidBody" parent="Objects"] +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 22.6969, 41.1727, -2.89124 ) +linear_velocity = Vector3( 0, 5, 0 ) + +[node name="CollisionShape" type="CollisionShape" parent="Objects/RigidBody6"] +transform = Transform( 7, 0, 0, 0, 7, 0, 0, 0, 7, 0, 0, 0 ) +shape = SubResource( 8 ) + +[node name="CSGSphere" type="CSGSphere" parent="Objects/RigidBody6/CollisionShape"] + +[node name="RigidBody7" type="RigidBody" parent="Objects"] +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 21.6828, 41.1727, 19.6551 ) +linear_velocity = Vector3( 0, 5, 0 ) + +[node name="CollisionShape" type="CollisionShape" parent="Objects/RigidBody7"] +transform = Transform( 7, 0, 0, 0, 7, 0, 0, 0, 7, 0, 0, 0 ) +shape = SubResource( 8 ) + +[node name="CSGSphere" type="CSGSphere" parent="Objects/RigidBody7/CollisionShape"] + +[node name="RigidBody8" type="RigidBody" parent="Objects"] +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -1.43668, 52.2537, -6.09689 ) +linear_velocity = Vector3( 0, 5, 0 ) + +[node name="CollisionShape" type="CollisionShape" parent="Objects/RigidBody8"] +transform = Transform( 7, 0, 0, 0, 7, 0, 0, 0, 7, 0, 0, 0 ) +shape = SubResource( 8 ) + +[node name="CSGSphere" type="CSGSphere" parent="Objects/RigidBody8/CollisionShape"] + +[node name="RigidBody9" type="RigidBody" parent="Objects"] +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 14.3219, 62.862, -5.02587 ) +linear_velocity = Vector3( 0, 5, 0 ) + +[node name="CollisionShape" type="CollisionShape" parent="Objects/RigidBody9"] +transform = Transform( 7, 0, 0, 0, 7, 0, 0, 0, 7, 0, 0, 0 ) +shape = SubResource( 8 ) + +[node name="CSGSphere" type="CSGSphere" parent="Objects/RigidBody9/CollisionShape"] + +[node name="RigidBody10" type="RigidBody" parent="Objects"] +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -28.7139, 41.1727, -9.76783 ) +linear_velocity = Vector3( 0, 5, 0 ) + +[node name="CollisionShape" type="CollisionShape" parent="Objects/RigidBody10"] +transform = Transform( 7, 0, 0, 0, 7, 0, 0, 0, 7, 0, 0, 0 ) +shape = SubResource( 8 ) + +[node name="CSGSphere" type="CSGSphere" parent="Objects/RigidBody10/CollisionShape"] + +[node name="RigidBody11" type="RigidBody" parent="Objects"] +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -8.57036, 66.2741, -5.42798 ) +linear_velocity = Vector3( 0, 5, 0 ) + +[node name="CollisionShape" type="CollisionShape" parent="Objects/RigidBody11"] +transform = Transform( 7, 0, 0, 0, 7, 0, 0, 0, 7, 0, 0, 0 ) +shape = SubResource( 8 ) + +[node name="CSGSphere" type="CSGSphere" parent="Objects/RigidBody11/CollisionShape"] + +[node name="RigidBody12" type="RigidBody" parent="Objects"] +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -36.4517, 3.2776, -36.8718 ) +linear_velocity = Vector3( 0, 5, 0 ) + +[node name="CollisionShape" type="CollisionShape" parent="Objects/RigidBody12"] +transform = Transform( 7, 0, 0, 0, 7, 0, 0, 0, 7, 0, 0, 0 ) +shape = SubResource( 8 ) + +[node name="CSGSphere" type="CSGSphere" parent="Objects/RigidBody12/CollisionShape"] + +[node name="Camera" type="Camera" parent="."] +transform = Transform( 0.922114, 0.23703, -0.305815, 0.0163102, 0.765871, 0.642788, 0.386575, -0.597711, 0.702354, -25.392, 55.117, 39.851 ) +current = true +far = 200.0 diff --git a/Physics/3D/StaticArena.gd b/Physics/3D/StaticArena.gd new file mode 100644 index 0000000..5d0bba0 --- /dev/null +++ b/Physics/3D/StaticArena.gd @@ -0,0 +1,5 @@ +extends Spatial + + +func _process(delta): + rotate(Vector3(0, 1, 0).normalized(), 1 * delta) diff --git a/Rendering/Lights2D/Light2D.gd b/Rendering/Lights2D/Light2D.gd new file mode 100644 index 0000000..533371b --- /dev/null +++ b/Rendering/Lights2D/Light2D.gd @@ -0,0 +1,18 @@ +extends Light2D + +var move_vector: Vector2 = Vector2(1, 1) +var speed: float = 100.0 + + +func _process(delta): + position += Vector2(move_vector.x * delta * speed, move_vector.y * delta * speed) + rotation += speed * delta + + if position.y > Autoload.screen_size.y: + move_vector.y = -1 + elif position.y < 0: + move_vector.y = 1 + elif position.x > Autoload.screen_size.x: + move_vector.x = -1 + elif position.x < 0: + move_vector.x = 1 diff --git a/Rendering/Lights2D/Light2D.tscn b/Rendering/Lights2D/Light2D.tscn new file mode 100644 index 0000000..446c5d2 --- /dev/null +++ b/Rendering/Lights2D/Light2D.tscn @@ -0,0 +1,11 @@ +[gd_scene load_steps=3 format=2] + +[ext_resource path="res://Rendering/Lights2D/Light2D.gd" type="Script" id=1] +[ext_resource path="res://icon 32x32.png" type="Texture" id=2] + +[node name="Light2D" type="Light2D"] +position = Vector2( 36.375, 37.875 ) +texture = ExtResource( 2 ) +texture_scale = 3.39 +shadow_enabled = true +script = ExtResource( 1 ) diff --git a/Rendering/Lights2D/Lights2D.tscn b/Rendering/Lights2D/Lights2D.tscn new file mode 100644 index 0000000..9730824 --- /dev/null +++ b/Rendering/Lights2D/Lights2D.tscn @@ -0,0 +1,100 @@ +[gd_scene load_steps=3 format=2] + +[ext_resource path="res://Rendering/Lights2D/Light2D.tscn" type="PackedScene" id=2] + +[sub_resource type="OccluderPolygon2D" id=1] +cull_mode = 1 +polygon = PoolVector2Array( -17.0128, 10.1432, -70.8541, 35.4749, 23.5811, 77.3471, 22.5851, 14.3859 ) + +[node name="Lights2D" type="Control"] +anchor_right = 1.0 +anchor_bottom = 1.0 +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="ColorRect" type="ColorRect" parent="."] +self_modulate = Color( 0.290196, 0.160784, 0, 0.529412 ) +anchor_right = 1.0 +anchor_bottom = 1.0 +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="Light2D" parent="." instance=ExtResource( 2 )] + +[node name="Light2D2" parent="." instance=ExtResource( 2 )] +position = Vector2( 552.563, -17.2793 ) + +[node name="Light2D3" parent="." instance=ExtResource( 2 )] +position = Vector2( 34.9607, 524.365 ) + +[node name="Light2D4" parent="." instance=ExtResource( 2 )] +position = Vector2( 679.842, 556.891 ) + +[node name="Light2D5" parent="." instance=ExtResource( 2 )] +position = Vector2( 418.213, 295.262 ) + +[node name="Light2D6" parent="." instance=ExtResource( 2 )] +position = Vector2( 863.69, 330.617 ) + +[node name="Light2D7" parent="." instance=ExtResource( 2 )] +position = Vector2( 336.188, 565.377 ) + +[node name="Light2D8" parent="." instance=ExtResource( 2 )] +position = Vector2( 996.626, 563.962 ) + +[node name="Light2D9" parent="." instance=ExtResource( 2 )] +position = Vector2( 582.261, 406.985 ) + +[node name="Light2D10" parent="." instance=ExtResource( 2 )] +position = Vector2( 600.646, 208.995 ) + +[node name="Light2D11" parent="." instance=ExtResource( 2 )] +position = Vector2( 842.477, 139.698 ) + +[node name="Light2D12" parent="." instance=ExtResource( 2 )] +position = Vector2( 240.022, 228.794 ) + +[node name="Light2D13" parent="." instance=ExtResource( 2 )] +position = Vector2( 84.4581, 320.718 ) + +[node name="Light2D14" parent="." instance=ExtResource( 2 )] +position = Vector2( 251.335, 390.014 ) + +[node name="Light2D15" parent="." instance=ExtResource( 2 )] +position = Vector2( 232.951, 64.745 ) + +[node name="Light2D16" parent="." instance=ExtResource( 2 )] +position = Vector2( 716.612, 57.674 ) + +[node name="Light2D17" parent="." instance=ExtResource( 2 )] +position = Vector2( 966.927, 117.071 ) + +[node name="LightOccluder2D" type="LightOccluder2D" parent="."] +position = Vector2( 469.444, 367.746 ) +occluder = SubResource( 1 ) + +[node name="LightOccluder2D2" type="LightOccluder2D" parent="."] +position = Vector2( 641.978, 284.308 ) +occluder = SubResource( 1 ) + +[node name="LightOccluder2D3" type="LightOccluder2D" parent="."] +position = Vector2( 374.692, 76.4184 ) +occluder = SubResource( 1 ) + +[node name="LightOccluder2D4" type="LightOccluder2D" parent="."] +position = Vector2( 876.738, 219.254 ) +occluder = SubResource( 1 ) + +[node name="LightOccluder2D5" type="LightOccluder2D" parent="."] +position = Vector2( 906.436, 492.197 ) +occluder = SubResource( 1 ) + +[node name="LightOccluder2D6" type="LightOccluder2D" parent="."] +position = Vector2( 906.436, 492.197 ) +occluder = SubResource( 1 ) + +[node name="LightOccluder2D7" type="LightOccluder2D" parent="."] +position = Vector2( 216.3, 438.457 ) +occluder = SubResource( 1 ) diff --git a/Rendering/Lights3D/Camera.gd b/Rendering/Lights3D/Camera.gd new file mode 100644 index 0000000..0a1afe8 --- /dev/null +++ b/Rendering/Lights3D/Camera.gd @@ -0,0 +1,10 @@ +extends Camera + +var speed = 1 +var curr = 0 + + +func _process(delta): + curr += delta * speed + + look_at_from_position(Vector3(cos(curr) * 3, 0, sin(curr) * 3), Vector3.ZERO, Vector3(0, 1, 0)) diff --git a/Rendering/Lights3D/DirectionalLight.gd b/Rendering/Lights3D/DirectionalLight.gd new file mode 100644 index 0000000..62f64ad --- /dev/null +++ b/Rendering/Lights3D/DirectionalLight.gd @@ -0,0 +1,10 @@ +extends DirectionalLight + +var speed = 1.2 +var curr = 0 + + +func _process(delta): + curr += delta * speed + + rotation = Vector3(sin(curr) * speed, cos(curr) * speed, sin(8 * curr) * speed) diff --git a/Rendering/Lights3D/Lights3D.tscn b/Rendering/Lights3D/Lights3D.tscn new file mode 100644 index 0000000..8cf5617 --- /dev/null +++ b/Rendering/Lights3D/Lights3D.tscn @@ -0,0 +1,47 @@ +[gd_scene load_steps=5 format=2] + +[ext_resource path="res://Rendering/Lights3D/Camera.gd" type="Script" id=1] +[ext_resource path="res://Rendering/Lights3D/DirectionalLight.gd" type="Script" id=2] +[ext_resource path="res://Rendering/Lights3D/OmniLight.gd" type="Script" id=3] +[ext_resource path="res://Rendering/Lights3D/SpotLight.gd" type="Script" id=4] + +[node name="Lights3D" type="Spatial"] + +[node name="Camera" type="Camera" parent="."] +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 2.87313 ) +script = ExtResource( 1 ) + +[node name="DirectionalLight" type="DirectionalLight" parent="."] +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 10.521, 0 ) +light_color = Color( 0.458824, 0.690196, 0.988235, 1 ) +script = ExtResource( 2 ) + +[node name="OmniLight" type="OmniLight" parent="."] +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 5.0767, 0 ) +light_color = Color( 0.556863, 0, 0, 1 ) +script = ExtResource( 3 ) + +[node name="SpotLight" type="SpotLight" parent="."] +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 4.09376 ) +light_color = Color( 0.478431, 0.266667, 1, 1 ) +spot_range = 8.6 +script = ExtResource( 4 ) + +[node name="Boxes" type="Spatial" parent="."] + +[node name="CSGBox" type="CSGBox" parent="Boxes"] +width = 0.782 +height = 1.07 +depth = 1.12259 + +[node name="CSGBox2" type="CSGBox" parent="Boxes"] +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -0.437537, 0.150547, -0.302456 ) +width = 0.782 +height = 1.583 +depth = 0.394 + +[node name="CSGBox3" type="CSGBox" parent="Boxes"] +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0.699736, 0.150547, -0.302456 ) +width = 0.342 +height = 0.521 +depth = 0.394 diff --git a/Rendering/Lights3D/OmniLight.gd b/Rendering/Lights3D/OmniLight.gd new file mode 100644 index 0000000..0bbaf6f --- /dev/null +++ b/Rendering/Lights3D/OmniLight.gd @@ -0,0 +1,10 @@ +extends OmniLight + +var speed = 0.2 +var curr = 0 + + +func _process(delta): + curr += delta * speed + + look_at_from_position(Vector3(cos(curr) * 3, sin(curr * curr) * 3, sin(curr) * 3), Vector3.ZERO, Vector3(0, 1, 0)) diff --git a/Rendering/Lights3D/SpotLight.gd b/Rendering/Lights3D/SpotLight.gd new file mode 100644 index 0000000..febc5c9 --- /dev/null +++ b/Rendering/Lights3D/SpotLight.gd @@ -0,0 +1,10 @@ +extends SpotLight + +var speed = 0.3 +var curr = 0 + + +func _process(delta): + curr += delta * speed + + look_at_from_position(Vector3(cos(curr) * 3, sin(curr * curr) * 3, sin(curr) * 3), Vector3.ZERO, Vector3(0, 1, 0)) diff --git a/icon 32x32.png.import b/icon 32x32.png.import index 40805c7..5d47393 100644 --- a/icon 32x32.png.import +++ b/icon 32x32.png.import @@ -2,33 +2,35 @@ importer="texture" type="StreamTexture" -path="res://.import/icon 32x32.png-b86539832226708d9735f29f6872d9e2.stex" +path.s3tc="res://.import/icon 32x32.png-b86539832226708d9735f29f6872d9e2.s3tc.stex" +path.etc2="res://.import/icon 32x32.png-b86539832226708d9735f29f6872d9e2.etc2.stex" metadata={ -"vram_texture": false +"imported_formats": [ "s3tc", "etc2" ], +"vram_texture": true } [deps] source_file="res://icon 32x32.png" -dest_files=[ "res://.import/icon 32x32.png-b86539832226708d9735f29f6872d9e2.stex" ] +dest_files=[ "res://.import/icon 32x32.png-b86539832226708d9735f29f6872d9e2.s3tc.stex", "res://.import/icon 32x32.png-b86539832226708d9735f29f6872d9e2.etc2.stex" ] [params] -compress/mode=0 +compress/mode=2 compress/lossy_quality=0.7 compress/hdr_mode=0 compress/bptc_ldr=0 compress/normal_map=0 -flags/repeat=0 +flags/repeat=true flags/filter=true -flags/mipmaps=false +flags/mipmaps=true flags/anisotropic=false -flags/srgb=2 +flags/srgb=1 process/fix_alpha_border=true process/premult_alpha=false process/HDR_as_SRGB=false process/invert_color=false stream=false size_limit=0 -detect_3d=true +detect_3d=false svg/scale=1.0 diff --git a/misc/ci/sources.list b/misc/ci/sources.list new file mode 100644 index 0000000..4d8f94f --- /dev/null +++ b/misc/ci/sources.list @@ -0,0 +1,4 @@ +deb http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse +deb http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse +deb http://archive.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse +deb http://archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse