diff --git a/viewport/dynamic_split_screen/CameraController.gd b/viewport/dynamic_split_screen/CameraController.gd new file mode 100644 index 00000000..c75cc3f7 --- /dev/null +++ b/viewport/dynamic_split_screen/CameraController.gd @@ -0,0 +1,113 @@ +extends Spatial + +# Handle the motion of both players' camera as well as communication with the +# SplitScreen shader to achieve the dynamic split screen effet +# +# Cameras are place on the segment joining the two players, either in the middle +# if players are close enough or at a fixed distance if they are not. +# In the first case, both cameras being at the same location, only the view of +# the first one is used for the entire screen thus allowing the players to play +# on a unsplit screen. +# In the second case, the screen is split in two with a line perpendicular to the +# segement joining the two players. +# +# The points of customization are: +# max_separation: the distance between players at which the view starts to split +# split_line_thickness: the thickness of the split line in pixels +# split_line_color: color of the split line +# adaptive_split_line_thickness: if true, the split line thickness will vary +# depending on the distance between players. If false, the thickness will +# be constant and equal to split_line_thickness + +export(float) var max_separation = 20.0 +export(float) var split_line_thickness = 3.0 +export(Color, RGBA) var split_line_color = Color(0.0, 0.0, 0.0, 1.0) +export(bool) var adaptive_split_line_thickness = true + +onready var player1 = $'../Player1' +onready var player2 = $'../Player2' +onready var camera1: Camera = $'Viewport1/Camera1' +onready var camera2: Camera = $'Viewport2/Camera2' +onready var view: TextureRect = $'View' + + +func _ready(): + _on_size_changed() + _update_splitscreen() + + get_viewport().connect("size_changed", self, "_on_size_changed") + + view.material.set_shader_param('viewport1', $Viewport1.get_texture()) + view.material.set_shader_param('viewport2', $Viewport2.get_texture()) + + +func _process(delta): + _move_cameras() + _update_splitscreen() + + +func _move_cameras(): + var position_difference = _compute_position_difference_in_world() + + var distance = clamp(_compute_horizontal_length(position_difference), 0, max_separation) + + position_difference = position_difference.normalized() * distance + + camera1.translation.x = player1.translation.x + position_difference.x / 2.0 + camera1.translation.z = player1.translation.z + position_difference.z / 2.0 + + camera2.translation.x = player2.translation.x - position_difference.x / 2.0 + camera2.translation.z = player2.translation.z - position_difference.z / 2.0 + + +func _update_splitscreen(): + var screen_size = get_viewport().get_visible_rect().size + + var player1_position = camera1.unproject_position(player1.translation) + player1_position.x /= screen_size.x; + player1_position.y /= screen_size.y; + + var player2_position = camera2.unproject_position(player2.translation) + player2_position.x /= screen_size.x; + player2_position.y /= screen_size.y; + + var thickness + if adaptive_split_line_thickness: + var position_difference = _compute_position_difference_in_world() + var distance = _compute_horizontal_length(position_difference) + thickness = lerp(0, split_line_thickness, (distance - max_separation) / max_separation) + thickness = clamp(thickness, 0, split_line_thickness) + else: + thickness = split_line_thickness + + view.material.set_shader_param('split_active', _get_split_state()) + view.material.set_shader_param('player1_position', player1_position) + view.material.set_shader_param('player2_position', player2_position) + view.material.set_shader_param('split_line_thickness', thickness) + view.material.set_shader_param('split_line_color', split_line_color) + + +# Split screen is active if players are too far apart from each other. +# Only the horizontal components (x, z) are used for distance computation +func _get_split_state(): + var position_difference = _compute_position_difference_in_world() + var separation_distance = _compute_horizontal_length(position_difference) + return separation_distance > max_separation + + +func _on_size_changed(): + var screen_size = get_viewport().get_visible_rect().size + + $Viewport1.size = screen_size + $Viewport2.size = screen_size + view.rect_size = screen_size + + view.material.set_shader_param('viewport_size', screen_size) + + +func _compute_position_difference_in_world(): + return player2.translation - player1.translation + + +func _compute_horizontal_length(vec): + return Vector2(vec.x, vec.z).length() diff --git a/viewport/dynamic_split_screen/PlayerMovement.gd b/viewport/dynamic_split_screen/PlayerMovement.gd new file mode 100644 index 00000000..ea48d422 --- /dev/null +++ b/viewport/dynamic_split_screen/PlayerMovement.gd @@ -0,0 +1,16 @@ +extends KinematicBody + +# Moves the player + +export(int, 1, 2) var player_id = 1 +export(float) var walk_speed = 20.0 + + +func _physics_process(delta): + var velocity = Vector3.ZERO + velocity.z = -Input.get_action_strength("move_up_player" + str(player_id)) + velocity.z += Input.get_action_strength("move_down_player" + str(player_id)) + velocity.x = -Input.get_action_strength("move_left_player" + str(player_id)) + velocity.x += Input.get_action_strength("move_right_player" + str(player_id)) + + move_and_slide(velocity.normalized() * walk_speed) diff --git a/viewport/dynamic_split_screen/README.md b/viewport/dynamic_split_screen/README.md new file mode 100644 index 00000000..d6dc097c --- /dev/null +++ b/viewport/dynamic_split_screen/README.md @@ -0,0 +1,24 @@ +# The project +This sample project showcases an implementation of dynamic split screen, also called Voronoi split screen, using the [Godot engine](https://godotengine.org). + +# Dynamic split screen +A dynamic split screen system displays a single screen when the two players are close but a splitted view when they move apart. + +The splitting line can take any angle depending on the players' position, so it won't be either vertical or horizontal. + +This system was popularized by the Lego videogames. + +# How it works +Two cameras are placed inside two separate viewports and their texture, as well as some other parameters, are passed to a shader attached to a TextureRect filling the whole screen. + +The `SplitScreen` shader, with the help of the `CameraController` script, chooses wich texture to display on each pixel to achieve the effect. + +The cameras are placed on the segment joining the two players, either in the middle if they're close enough or at a fixed distance otherwise. + +# How to use it +Open and launch the project inside the Godot engine and then you can use WASD keys to move the first player and IJKL keys to move the second one. + +The `Cameras` node has parameters to tune the distance at which the screen splits and also the width and color of the splitting line. + +# Try it out +An HTML5 export is testable [here](https://benjaminnavarro.github.io/godot_dynamic_split_screen/index.html). diff --git a/viewport/dynamic_split_screen/SplitScreen.shader b/viewport/dynamic_split_screen/SplitScreen.shader new file mode 100644 index 00000000..d2c95462 --- /dev/null +++ b/viewport/dynamic_split_screen/SplitScreen.shader @@ -0,0 +1,74 @@ +shader_type canvas_item; +render_mode unshaded; + +uniform vec2 viewport_size; // size in pixels of the viewport. Cannot be access from the shader in GLES2 +uniform sampler2D viewport1 : hint_albedo; +uniform sampler2D viewport2 : hint_albedo; +uniform bool split_active; // true: split screen, false: use view1 +uniform vec2 player1_position; // position of player 1 un UV coordinates +uniform vec2 player2_position; // position of player 2 un UV coordinates +uniform float split_line_thickness; // width of the split boder +uniform vec4 split_line_color; // color of the split border + + +// from https://stackoverflow.com/questions/15276454/is-it-possible-to-draw-line-thickness-in-a-fragment-shader +float distanceToLine(vec2 p1, vec2 p2, vec2 point) { + float a = p1.y - p2.y; + float b = p2.x - p1.x; + return abs(a * point.x + b * point.y + p1.x * p2.y - p2.x * p1.y) / sqrt(a * a + b * b); +} + +void fragment() { + vec3 view1 = texture(viewport1, UV).rgb; + vec3 view2 = texture(viewport2, UV).rgb; + + float width = viewport_size.x; + float height = viewport_size.y; + + if (split_active) { + vec2 dx = player2_position - player1_position; + float split_slope; + + if (dx.y != 0.0) { + split_slope = dx.x / dx.y; + } + else { + split_slope = 100000.0; // High value (vertical split) if dx.y = 0 + } + + vec2 split_origin = vec2(0.5, 0.5); + vec2 split_line_start = vec2(0.0, height * ((split_origin.x - 0.0) * split_slope + split_origin.y)); + vec2 split_line_end = vec2(width, height * ((split_origin.x - 1.0) * split_slope + split_origin.y)); + float distance_to_split_line = distanceToLine(split_line_start, split_line_end, vec2(UV.x * width, UV.y * height)); + + // Draw split border if close enough + if (distance_to_split_line < split_line_thickness) { + COLOR = split_line_color; + } + else { + float split_current_y = (split_origin.x - UV.x) * split_slope + split_origin.y; + float split_player1_position_y = (split_origin.x - player1_position.x) * split_slope + split_origin.y; + + // Check on which side of the split UV is and select the proper view + if (UV.y > split_current_y) { + if (player1_position.y > split_player1_position_y) { + COLOR = vec4(view1, 1.0); + } + else { + COLOR = vec4(view2, 1.0); + } + } + else { + if (player1_position.y < split_player1_position_y) { + COLOR = vec4(view1, 1.0); + } + else { + COLOR = vec4(view2, 1.0); + } + } + } + } + else { + COLOR = vec4(view1, 1.0); + } +} diff --git a/viewport/dynamic_split_screen/SplitScreen.tscn b/viewport/dynamic_split_screen/SplitScreen.tscn new file mode 100644 index 00000000..988d02dd --- /dev/null +++ b/viewport/dynamic_split_screen/SplitScreen.tscn @@ -0,0 +1,843 @@ +[gd_scene load_steps=59 format=2] + +[ext_resource path="res://WorldEnvironment.tscn" type="PackedScene" id=1] +[ext_resource path="res://CameraController.gd" type="Script" id=2] +[ext_resource path="res://SplitScreen.shader" type="Shader" id=3] +[ext_resource path="res://icon.png" type="Texture" id=4] +[ext_resource path="res://PlayerMovement.gd" type="Script" id=5] +[ext_resource path="res://Walls.gd" type="Script" id=6] + +[sub_resource type="ShaderMaterial" id=1] +shader = ExtResource( 3 ) +shader_param/viewport_size = null +shader_param/split_active = null +shader_param/player1_position = null +shader_param/player2_position = null +shader_param/split_line_thickness = null +shader_param/split_line_color = null + +[sub_resource type="CapsuleMesh" id=2] + +[sub_resource type="SpatialMaterial" id=3] +albedo_color = Color( 0.933333, 0.0784314, 0.0784314, 1 ) + +[sub_resource type="CapsuleShape" id=4] +radius = 1.00505 + +[sub_resource type="SpatialMaterial" id=5] +albedo_color = Color( 0.0784314, 0.411765, 0.933333, 1 ) + +[sub_resource type="SpatialMaterial" id=6] + +[sub_resource type="PlaneMesh" id=7] +material = SubResource( 6 ) +size = Vector2( 200, 200 ) + +[sub_resource type="BoxShape" id=8] + +[sub_resource type="BoxShape" id=9] + +[sub_resource type="SpatialMaterial" id=10] +albedo_color = Color( 0.216745, 0.554409, 0.314699, 1 ) + +[sub_resource type="CubeMesh" id=11] + +[sub_resource type="SpatialMaterial" id=12] +albedo_color = Color( 0.305405, 0.88821, 0.395714, 1 ) + +[sub_resource type="SpatialMaterial" id=13] +albedo_color = Color( 0.51251, 0.338898, 0.955708, 1 ) + +[sub_resource type="SpatialMaterial" id=14] +albedo_color = Color( 0.226943, 0.905497, 0.613352, 1 ) + +[sub_resource type="SpatialMaterial" id=15] +albedo_color = Color( 0.981949, 0.643245, 0.544702, 1 ) + +[sub_resource type="SpatialMaterial" id=16] +albedo_color = Color( 0.866943, 0.814262, 0.0451389, 1 ) + +[sub_resource type="SpatialMaterial" id=17] +albedo_color = Color( 0.644941, 0.278132, 0.847472, 1 ) + +[sub_resource type="SpatialMaterial" id=18] +albedo_color = Color( 0.195857, 0.55957, 0.975027, 1 ) + +[sub_resource type="SpatialMaterial" id=19] +albedo_color = Color( 0.962396, 0.768307, 0.272148, 1 ) + +[sub_resource type="SpatialMaterial" id=20] +albedo_color = Color( 0.0218338, 0.630367, 0.701396, 1 ) + +[sub_resource type="SpatialMaterial" id=21] +albedo_color = Color( 0.730764, 0.468268, 0.954273, 1 ) + +[sub_resource type="SpatialMaterial" id=22] +albedo_color = Color( 0.136579, 0.540391, 0.852438, 1 ) + +[sub_resource type="SpatialMaterial" id=23] +albedo_color = Color( 0.148986, 0.774603, 0.599427, 1 ) + +[sub_resource type="SpatialMaterial" id=24] +albedo_color = Color( 0.232976, 0.129002, 0.0511244, 1 ) + +[sub_resource type="SpatialMaterial" id=25] +albedo_color = Color( 0.209617, 0.264843, 0.776664, 1 ) + +[sub_resource type="SpatialMaterial" id=26] +albedo_color = Color( 0.0224221, 0.0494852, 0.371403, 1 ) + +[sub_resource type="SpatialMaterial" id=27] +albedo_color = Color( 0.0372276, 0.959928, 0.183207, 1 ) + +[sub_resource type="SpatialMaterial" id=28] +albedo_color = Color( 0.0966038, 0.326089, 0.233914, 1 ) + +[sub_resource type="SpatialMaterial" id=29] +albedo_color = Color( 0.187928, 0.614021, 0.219056, 1 ) + +[sub_resource type="SpatialMaterial" id=30] +albedo_color = Color( 0.259084, 0.601876, 0.565821, 1 ) + +[sub_resource type="SpatialMaterial" id=31] +albedo_color = Color( 0.744452, 0.6155, 0.965371, 1 ) + +[sub_resource type="SpatialMaterial" id=32] +albedo_color = Color( 0.221543, 0.129975, 0.25152, 1 ) + +[sub_resource type="SpatialMaterial" id=33] +albedo_color = Color( 0.407034, 0.063434, 0.826022, 1 ) + +[sub_resource type="SpatialMaterial" id=34] +albedo_color = Color( 0.0889729, 0.967076, 0.249959, 1 ) + +[sub_resource type="SpatialMaterial" id=35] +albedo_color = Color( 0.465289, 0.573838, 0.598849, 1 ) + +[sub_resource type="SpatialMaterial" id=36] +albedo_color = Color( 0.123197, 0.184637, 0.0637491, 1 ) + +[sub_resource type="SpatialMaterial" id=37] +albedo_color = Color( 0.469645, 0.682699, 0.462456, 1 ) + +[sub_resource type="SpatialMaterial" id=38] +albedo_color = Color( 0.235117, 0.164501, 0.804043, 1 ) + +[sub_resource type="SpatialMaterial" id=39] +albedo_color = Color( 0.788222, 0.277863, 0.795143, 1 ) + +[sub_resource type="SpatialMaterial" id=40] +albedo_color = Color( 0.0942122, 0.253081, 0.456666, 1 ) + +[sub_resource type="SpatialMaterial" id=41] +albedo_color = Color( 0.0998086, 0.737287, 0.515344, 1 ) + +[sub_resource type="SpatialMaterial" id=42] +albedo_color = Color( 0.620311, 0.528745, 0.951548, 1 ) + +[sub_resource type="SpatialMaterial" id=43] +albedo_color = Color( 0.541709, 0.766032, 0.988409, 1 ) + +[sub_resource type="SpatialMaterial" id=44] +albedo_color = Color( 0.785747, 0.313991, 0.736685, 1 ) + +[sub_resource type="SpatialMaterial" id=45] +albedo_color = Color( 0.0437973, 0.646887, 0.219997, 1 ) + +[sub_resource type="SpatialMaterial" id=46] +albedo_color = Color( 0.808976, 0.0676796, 0.934931, 1 ) + +[sub_resource type="SpatialMaterial" id=47] +albedo_color = Color( 0.134101, 0.976648, 0.791346, 1 ) + +[sub_resource type="SpatialMaterial" id=48] +albedo_color = Color( 0.458938, 0.139997, 0.381802, 1 ) + +[sub_resource type="SpatialMaterial" id=49] +albedo_color = Color( 0.86859, 0.814611, 0.772643, 1 ) + +[sub_resource type="SpatialMaterial" id=50] +albedo_color = Color( 0.0747827, 0.917116, 0.0636354, 1 ) + +[sub_resource type="SpatialMaterial" id=51] +albedo_color = Color( 0.000703006, 0.0199452, 0.405719, 1 ) + +[sub_resource type="SpatialMaterial" id=52] +albedo_color = Color( 0.238211, 0.205605, 0.980387, 1 ) + +[node name="World" type="Spatial"] + +[node name="WorldEnvironment" parent="." instance=ExtResource( 1 )] + +[node name="Cameras" type="Spatial" parent="."] +script = ExtResource( 2 ) + +[node name="View" type="TextureRect" parent="Cameras"] +material = SubResource( 1 ) +margin_right = 40.0 +margin_bottom = 40.0 +texture = ExtResource( 4 ) +expand = true + +[node name="Viewport1" type="Viewport" parent="Cameras"] +render_target_v_flip = true +render_target_update_mode = 3 + +[node name="Camera1" type="Camera" parent="Cameras/Viewport1"] +transform = Transform( 1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 0, 20, 0 ) +current = true + +[node name="Viewport2" type="Viewport" parent="Cameras"] +render_target_v_flip = true +render_target_update_mode = 3 + +[node name="Camera2" type="Camera" parent="Cameras/Viewport2"] +transform = Transform( 1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 0, 20, 0 ) +current = true + +[node name="Player1" type="KinematicBody" parent="."] +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.25, 0 ) +script = ExtResource( 5 ) + +[node name="Mesh" type="MeshInstance" parent="Player1"] +transform = Transform( 1, 0, 0, 0, -4.37114e-08, -1, 0, 1, -4.37114e-08, 0, 0, 0 ) +mesh = SubResource( 2 ) +material/0 = SubResource( 3 ) + +[node name="CollisionShape" type="CollisionShape" parent="Player1"] +transform = Transform( 1, 0, 0, 0, -4.37114e-08, -1, 0, 1, -4.37114e-08, 0, 0, 0 ) +shape = SubResource( 4 ) + +[node name="Player2" type="KinematicBody" parent="."] +editor/display_folded = true +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 4.18358, 1.25, 3.01882 ) +script = ExtResource( 5 ) +player_id = 2 + +[node name="Mesh" type="MeshInstance" parent="Player2"] +transform = Transform( 1, 0, 0, 0, -4.37114e-08, -1, 0, 1, -4.37114e-08, 0, 0, 0 ) +mesh = SubResource( 2 ) +material/0 = SubResource( 5 ) + +[node name="CollisionShape" type="CollisionShape" parent="Player2"] +transform = Transform( 1, 0, 0, 0, -4.37114e-08, -1, 0, 1, -4.37114e-08, 0, 0, 0 ) +shape = SubResource( 4 ) + +[node name="Ground" type="StaticBody" parent="."] + +[node name="Mesh" type="MeshInstance" parent="Ground"] +transform = Transform( 20, 0, 0, 0, 1, 0, 0, 0, 20, 0, 0, 0 ) +mesh = SubResource( 7 ) +material/0 = null + +[node name="CollisionShape" type="CollisionShape" parent="Ground"] +transform = Transform( 200, 0, 0, 0, 1, 0, 0, 0, 200, 0, -1, 0 ) +shape = SubResource( 8 ) + +[node name="Walls" type="Spatial" parent="."] +script = ExtResource( 6 ) + +[node name="Group1" type="Spatial" parent="Walls"] + +[node name="Wall1" type="StaticBody" parent="Walls/Group1"] +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -4.08384, 1, -5.90156 ) + +[node name="CollisionShape" type="CollisionShape" parent="Walls/Group1/Wall1"] +shape = SubResource( 9 ) + +[node name="MeshInstance" type="MeshInstance" parent="Walls/Group1/Wall1" groups=[ +"walls", +]] +material_override = SubResource( 10 ) +mesh = SubResource( 11 ) +material/0 = null + +[node name="Wall2" type="StaticBody" parent="Walls/Group1"] +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 12.3812, 1, -2.68735 ) + +[node name="CollisionShape" type="CollisionShape" parent="Walls/Group1/Wall2"] +shape = SubResource( 9 ) + +[node name="MeshInstance" type="MeshInstance" parent="Walls/Group1/Wall2" groups=[ +"walls", +]] +material_override = SubResource( 12 ) +mesh = SubResource( 11 ) +material/0 = null + +[node name="Wall3" type="StaticBody" parent="Walls/Group1"] +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -8.99091, 1, -13.3028 ) + +[node name="CollisionShape" type="CollisionShape" parent="Walls/Group1/Wall3"] +shape = SubResource( 9 ) + +[node name="MeshInstance" type="MeshInstance" parent="Walls/Group1/Wall3" groups=[ +"walls", +]] +material_override = SubResource( 13 ) +mesh = SubResource( 11 ) +material/0 = null + +[node name="Wall4" type="StaticBody" parent="Walls/Group1"] +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -1.10164, 1, 4.39061 ) + +[node name="CollisionShape" type="CollisionShape" parent="Walls/Group1/Wall4"] +shape = SubResource( 9 ) + +[node name="MeshInstance" type="MeshInstance" parent="Walls/Group1/Wall4" groups=[ +"walls", +]] +material_override = SubResource( 14 ) +mesh = SubResource( 11 ) +material/0 = null + +[node name="Wall5" type="StaticBody" parent="Walls/Group1"] +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 4.12965, 1, -9.09735 ) + +[node name="CollisionShape" type="CollisionShape" parent="Walls/Group1/Wall5"] +shape = SubResource( 9 ) + +[node name="MeshInstance" type="MeshInstance" parent="Walls/Group1/Wall5" groups=[ +"walls", +]] +material_override = SubResource( 15 ) +mesh = SubResource( 11 ) +material/0 = null + +[node name="Wall6" type="StaticBody" parent="Walls/Group1"] +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -6.99301, 1, 1.77014 ) + +[node name="CollisionShape" type="CollisionShape" parent="Walls/Group1/Wall6"] +shape = SubResource( 9 ) + +[node name="MeshInstance" type="MeshInstance" parent="Walls/Group1/Wall6" groups=[ +"walls", +]] +material_override = SubResource( 16 ) +mesh = SubResource( 11 ) +material/0 = null + +[node name="Group2" type="Spatial" parent="Walls"] +editor/display_folded = true +transform = Transform( 0.988065, 0, -0.154039, 0, 1, 0, 0.154039, 0, 0.988065, -22.59, 0, -3.1796 ) + +[node name="Wall1" type="StaticBody" parent="Walls/Group2"] +editor/display_folded = true +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -4.08384, 1, -5.90156 ) + +[node name="CollisionShape" type="CollisionShape" parent="Walls/Group2/Wall1"] +shape = SubResource( 9 ) + +[node name="MeshInstance" type="MeshInstance" parent="Walls/Group2/Wall1" groups=[ +"walls", +]] +material_override = SubResource( 17 ) +mesh = SubResource( 11 ) +material/0 = null + +[node name="Wall2" type="StaticBody" parent="Walls/Group2"] +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 12.3812, 1, -2.68735 ) + +[node name="CollisionShape" type="CollisionShape" parent="Walls/Group2/Wall2"] +shape = SubResource( 9 ) + +[node name="MeshInstance" type="MeshInstance" parent="Walls/Group2/Wall2" groups=[ +"walls", +]] +material_override = SubResource( 18 ) +mesh = SubResource( 11 ) +material/0 = null + +[node name="Wall3" type="StaticBody" parent="Walls/Group2"] +editor/display_folded = true +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -8.99091, 1, -13.3028 ) + +[node name="CollisionShape" type="CollisionShape" parent="Walls/Group2/Wall3"] +shape = SubResource( 9 ) + +[node name="MeshInstance" type="MeshInstance" parent="Walls/Group2/Wall3" groups=[ +"walls", +]] +material_override = SubResource( 19 ) +mesh = SubResource( 11 ) +material/0 = null + +[node name="Wall4" type="StaticBody" parent="Walls/Group2"] +editor/display_folded = true +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -1.10164, 1, 4.39061 ) + +[node name="CollisionShape" type="CollisionShape" parent="Walls/Group2/Wall4"] +shape = SubResource( 9 ) + +[node name="MeshInstance" type="MeshInstance" parent="Walls/Group2/Wall4" groups=[ +"walls", +]] +material_override = SubResource( 20 ) +mesh = SubResource( 11 ) +material/0 = null + +[node name="Wall5" type="StaticBody" parent="Walls/Group2"] +editor/display_folded = true +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 4.12965, 1, -9.09735 ) + +[node name="CollisionShape" type="CollisionShape" parent="Walls/Group2/Wall5"] +shape = SubResource( 9 ) + +[node name="MeshInstance" type="MeshInstance" parent="Walls/Group2/Wall5" groups=[ +"walls", +]] +material_override = SubResource( 21 ) +mesh = SubResource( 11 ) +material/0 = null + +[node name="Wall6" type="StaticBody" parent="Walls/Group2"] +editor/display_folded = true +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -6.99301, 1, 1.77014 ) + +[node name="CollisionShape" type="CollisionShape" parent="Walls/Group2/Wall6"] +shape = SubResource( 9 ) + +[node name="MeshInstance" type="MeshInstance" parent="Walls/Group2/Wall6" groups=[ +"walls", +]] +material_override = SubResource( 22 ) +mesh = SubResource( 11 ) +material/0 = null + +[node name="Group3" type="Spatial" parent="Walls"] +editor/display_folded = true +transform = Transform( 0.905096, 0, 0.425207, 0, 1, 0, -0.425207, 0, 0.905096, -12.7693, 0, 17.7449 ) + +[node name="Wall1" type="StaticBody" parent="Walls/Group3"] +editor/display_folded = true +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -4.08384, 1, -5.90156 ) + +[node name="CollisionShape" type="CollisionShape" parent="Walls/Group3/Wall1"] +shape = SubResource( 9 ) + +[node name="MeshInstance" type="MeshInstance" parent="Walls/Group3/Wall1" groups=[ +"walls", +]] +material_override = SubResource( 23 ) +mesh = SubResource( 11 ) +material/0 = null + +[node name="Wall2" type="StaticBody" parent="Walls/Group3"] +editor/display_folded = true +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 12.3812, 1, -2.68735 ) + +[node name="CollisionShape" type="CollisionShape" parent="Walls/Group3/Wall2"] +shape = SubResource( 9 ) + +[node name="MeshInstance" type="MeshInstance" parent="Walls/Group3/Wall2" groups=[ +"walls", +]] +material_override = SubResource( 24 ) +mesh = SubResource( 11 ) +material/0 = null + +[node name="Wall3" type="StaticBody" parent="Walls/Group3"] +editor/display_folded = true +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -8.99091, 1, -13.3028 ) + +[node name="CollisionShape" type="CollisionShape" parent="Walls/Group3/Wall3"] +shape = SubResource( 9 ) + +[node name="MeshInstance" type="MeshInstance" parent="Walls/Group3/Wall3" groups=[ +"walls", +]] +material_override = SubResource( 25 ) +mesh = SubResource( 11 ) +material/0 = null + +[node name="Wall4" type="StaticBody" parent="Walls/Group3"] +editor/display_folded = true +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -1.10164, 1, 4.39061 ) + +[node name="CollisionShape" type="CollisionShape" parent="Walls/Group3/Wall4"] +shape = SubResource( 9 ) + +[node name="MeshInstance" type="MeshInstance" parent="Walls/Group3/Wall4" groups=[ +"walls", +]] +material_override = SubResource( 26 ) +mesh = SubResource( 11 ) +material/0 = null + +[node name="Wall5" type="StaticBody" parent="Walls/Group3"] +editor/display_folded = true +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 4.12965, 1, -9.09735 ) + +[node name="CollisionShape" type="CollisionShape" parent="Walls/Group3/Wall5"] +shape = SubResource( 9 ) + +[node name="MeshInstance" type="MeshInstance" parent="Walls/Group3/Wall5" groups=[ +"walls", +]] +material_override = SubResource( 27 ) +mesh = SubResource( 11 ) +material/0 = null + +[node name="Wall6" type="StaticBody" parent="Walls/Group3"] +editor/display_folded = true +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -6.99301, 1, 1.77014 ) + +[node name="CollisionShape" type="CollisionShape" parent="Walls/Group3/Wall6"] +shape = SubResource( 9 ) + +[node name="MeshInstance" type="MeshInstance" parent="Walls/Group3/Wall6" groups=[ +"walls", +]] +material_override = SubResource( 28 ) +mesh = SubResource( 11 ) +material/0 = null + +[node name="Group4" type="Spatial" parent="Walls"] +transform = Transform( 0.155702, 0, -0.987804, 0, 1, 0, 0.987804, 0, 0.155702, 14.0374, 0, 12.1476 ) + +[node name="Wall1" type="StaticBody" parent="Walls/Group4"] +editor/display_folded = true +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -4.08384, 1, -5.90156 ) + +[node name="CollisionShape" type="CollisionShape" parent="Walls/Group4/Wall1"] +shape = SubResource( 9 ) + +[node name="MeshInstance" type="MeshInstance" parent="Walls/Group4/Wall1" groups=[ +"walls", +]] +material_override = SubResource( 29 ) +mesh = SubResource( 11 ) +material/0 = null + +[node name="Wall2" type="StaticBody" parent="Walls/Group4"] +editor/display_folded = true +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 12.3812, 1, -2.68735 ) + +[node name="CollisionShape" type="CollisionShape" parent="Walls/Group4/Wall2"] +shape = SubResource( 9 ) + +[node name="MeshInstance" type="MeshInstance" parent="Walls/Group4/Wall2" groups=[ +"walls", +]] +material_override = SubResource( 30 ) +mesh = SubResource( 11 ) +material/0 = null + +[node name="Wall3" type="StaticBody" parent="Walls/Group4"] +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -8.99091, 1, -13.3028 ) + +[node name="CollisionShape" type="CollisionShape" parent="Walls/Group4/Wall3"] +shape = SubResource( 9 ) + +[node name="MeshInstance" type="MeshInstance" parent="Walls/Group4/Wall3" groups=[ +"walls", +]] +material_override = SubResource( 31 ) +mesh = SubResource( 11 ) +material/0 = null + +[node name="Wall4" type="StaticBody" parent="Walls/Group4"] +editor/display_folded = true +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -1.10164, 1, 4.39061 ) + +[node name="CollisionShape" type="CollisionShape" parent="Walls/Group4/Wall4"] +shape = SubResource( 9 ) + +[node name="MeshInstance" type="MeshInstance" parent="Walls/Group4/Wall4" groups=[ +"walls", +]] +material_override = SubResource( 32 ) +mesh = SubResource( 11 ) +material/0 = null + +[node name="Wall5" type="StaticBody" parent="Walls/Group4"] +editor/display_folded = true +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 4.12965, 1, -9.09735 ) + +[node name="CollisionShape" type="CollisionShape" parent="Walls/Group4/Wall5"] +shape = SubResource( 9 ) + +[node name="MeshInstance" type="MeshInstance" parent="Walls/Group4/Wall5" groups=[ +"walls", +]] +material_override = SubResource( 33 ) +mesh = SubResource( 11 ) +material/0 = null + +[node name="Wall6" type="StaticBody" parent="Walls/Group4"] +editor/display_folded = true +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -6.99301, 1, 1.77014 ) + +[node name="CollisionShape" type="CollisionShape" parent="Walls/Group4/Wall6"] +shape = SubResource( 9 ) + +[node name="MeshInstance" type="MeshInstance" parent="Walls/Group4/Wall6" groups=[ +"walls", +]] +material_override = SubResource( 34 ) +mesh = SubResource( 11 ) +material/0 = null + +[node name="Group5" type="Spatial" parent="Walls"] +editor/display_folded = true +transform = Transform( 0.999549, 0, 0.0300306, 0, 1, 0, -0.0300306, 0, 0.999549, 0.500639, 0, 27.6888 ) + +[node name="Wall1" type="StaticBody" parent="Walls/Group5"] +editor/display_folded = true +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -4.08384, 1, -5.90156 ) + +[node name="CollisionShape" type="CollisionShape" parent="Walls/Group5/Wall1"] +shape = SubResource( 9 ) + +[node name="MeshInstance" type="MeshInstance" parent="Walls/Group5/Wall1" groups=[ +"walls", +]] +material_override = SubResource( 35 ) +mesh = SubResource( 11 ) +material/0 = null + +[node name="Wall2" type="StaticBody" parent="Walls/Group5"] +editor/display_folded = true +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 12.3812, 1, -2.68735 ) + +[node name="CollisionShape" type="CollisionShape" parent="Walls/Group5/Wall2"] +shape = SubResource( 9 ) + +[node name="MeshInstance" type="MeshInstance" parent="Walls/Group5/Wall2" groups=[ +"walls", +]] +material_override = SubResource( 36 ) +mesh = SubResource( 11 ) +material/0 = null + +[node name="Wall3" type="StaticBody" parent="Walls/Group5"] +editor/display_folded = true +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -8.99091, 1, -13.3028 ) + +[node name="CollisionShape" type="CollisionShape" parent="Walls/Group5/Wall3"] +shape = SubResource( 9 ) + +[node name="MeshInstance" type="MeshInstance" parent="Walls/Group5/Wall3" groups=[ +"walls", +]] +material_override = SubResource( 37 ) +mesh = SubResource( 11 ) +material/0 = null + +[node name="Wall4" type="StaticBody" parent="Walls/Group5"] +editor/display_folded = true +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -1.10164, 1, 4.39061 ) + +[node name="CollisionShape" type="CollisionShape" parent="Walls/Group5/Wall4"] +shape = SubResource( 9 ) + +[node name="MeshInstance" type="MeshInstance" parent="Walls/Group5/Wall4" groups=[ +"walls", +]] +material_override = SubResource( 38 ) +mesh = SubResource( 11 ) +material/0 = null + +[node name="Wall5" type="StaticBody" parent="Walls/Group5"] +editor/display_folded = true +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 4.12965, 1, -9.09735 ) + +[node name="CollisionShape" type="CollisionShape" parent="Walls/Group5/Wall5"] +shape = SubResource( 9 ) + +[node name="MeshInstance" type="MeshInstance" parent="Walls/Group5/Wall5" groups=[ +"walls", +]] +material_override = SubResource( 39 ) +mesh = SubResource( 11 ) +material/0 = null + +[node name="Wall6" type="StaticBody" parent="Walls/Group5"] +editor/display_folded = true +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -6.99301, 1, 1.77014 ) + +[node name="CollisionShape" type="CollisionShape" parent="Walls/Group5/Wall6"] +shape = SubResource( 9 ) + +[node name="MeshInstance" type="MeshInstance" parent="Walls/Group5/Wall6" groups=[ +"walls", +]] +material_override = SubResource( 40 ) +mesh = SubResource( 11 ) +material/0 = null + +[node name="Group6" type="Spatial" parent="Walls"] +editor/display_folded = true +transform = Transform( 0.613129, 0, -0.789983, 0, 1, 0, 0.789983, 0, 0.613129, 21.2586, 0, -14.244 ) + +[node name="Wall1" type="StaticBody" parent="Walls/Group6"] +editor/display_folded = true +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -4.08384, 1, -5.90156 ) + +[node name="CollisionShape" type="CollisionShape" parent="Walls/Group6/Wall1"] +shape = SubResource( 9 ) + +[node name="MeshInstance" type="MeshInstance" parent="Walls/Group6/Wall1" groups=[ +"walls", +]] +material_override = SubResource( 41 ) +mesh = SubResource( 11 ) +material/0 = null + +[node name="Wall2" type="StaticBody" parent="Walls/Group6"] +editor/display_folded = true +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 12.3812, 1, -2.68735 ) + +[node name="CollisionShape" type="CollisionShape" parent="Walls/Group6/Wall2"] +shape = SubResource( 9 ) + +[node name="MeshInstance" type="MeshInstance" parent="Walls/Group6/Wall2" groups=[ +"walls", +]] +material_override = SubResource( 42 ) +mesh = SubResource( 11 ) +material/0 = null + +[node name="Wall3" type="StaticBody" parent="Walls/Group6"] +editor/display_folded = true +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -8.99091, 1, -13.3028 ) + +[node name="CollisionShape" type="CollisionShape" parent="Walls/Group6/Wall3"] +shape = SubResource( 9 ) + +[node name="MeshInstance" type="MeshInstance" parent="Walls/Group6/Wall3" groups=[ +"walls", +]] +material_override = SubResource( 43 ) +mesh = SubResource( 11 ) +material/0 = null + +[node name="Wall4" type="StaticBody" parent="Walls/Group6"] +editor/display_folded = true +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -1.10164, 1, 4.39061 ) + +[node name="CollisionShape" type="CollisionShape" parent="Walls/Group6/Wall4"] +shape = SubResource( 9 ) + +[node name="MeshInstance" type="MeshInstance" parent="Walls/Group6/Wall4" groups=[ +"walls", +]] +material_override = SubResource( 44 ) +mesh = SubResource( 11 ) +material/0 = null + +[node name="Wall5" type="StaticBody" parent="Walls/Group6"] +editor/display_folded = true +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 4.12965, 1, -9.09735 ) + +[node name="CollisionShape" type="CollisionShape" parent="Walls/Group6/Wall5"] +shape = SubResource( 9 ) + +[node name="MeshInstance" type="MeshInstance" parent="Walls/Group6/Wall5" groups=[ +"walls", +]] +material_override = SubResource( 45 ) +mesh = SubResource( 11 ) +material/0 = null + +[node name="Wall6" type="StaticBody" parent="Walls/Group6"] +editor/display_folded = true +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -6.99301, 1, 1.77014 ) + +[node name="CollisionShape" type="CollisionShape" parent="Walls/Group6/Wall6"] +shape = SubResource( 9 ) + +[node name="MeshInstance" type="MeshInstance" parent="Walls/Group6/Wall6" groups=[ +"walls", +]] +material_override = SubResource( 46 ) +mesh = SubResource( 11 ) +material/0 = null + +[node name="Group7" type="Spatial" parent="Walls"] +editor/display_folded = true +transform = Transform( -0.999329, 0, -0.0366257, 0, 1, 0, 0.0366257, 0, -0.999329, -8.83615, 0, -32.7996 ) + +[node name="Wall1" type="StaticBody" parent="Walls/Group7"] +editor/display_folded = true +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -4.08384, 1, -5.90156 ) + +[node name="CollisionShape" type="CollisionShape" parent="Walls/Group7/Wall1"] +shape = SubResource( 9 ) + +[node name="MeshInstance" type="MeshInstance" parent="Walls/Group7/Wall1" groups=[ +"walls", +]] +material_override = SubResource( 47 ) +mesh = SubResource( 11 ) +material/0 = null + +[node name="Wall2" type="StaticBody" parent="Walls/Group7"] +editor/display_folded = true +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 12.3812, 1, -2.68735 ) + +[node name="CollisionShape" type="CollisionShape" parent="Walls/Group7/Wall2"] +shape = SubResource( 9 ) + +[node name="MeshInstance" type="MeshInstance" parent="Walls/Group7/Wall2" groups=[ +"walls", +]] +material_override = SubResource( 48 ) +mesh = SubResource( 11 ) +material/0 = null + +[node name="Wall3" type="StaticBody" parent="Walls/Group7"] +editor/display_folded = true +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -8.99091, 1, -13.3028 ) + +[node name="CollisionShape" type="CollisionShape" parent="Walls/Group7/Wall3"] +shape = SubResource( 9 ) + +[node name="MeshInstance" type="MeshInstance" parent="Walls/Group7/Wall3" groups=[ +"walls", +]] +material_override = SubResource( 49 ) +mesh = SubResource( 11 ) +material/0 = null + +[node name="Wall4" type="StaticBody" parent="Walls/Group7"] +editor/display_folded = true +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -1.10164, 1, 4.39061 ) + +[node name="CollisionShape" type="CollisionShape" parent="Walls/Group7/Wall4"] +shape = SubResource( 9 ) + +[node name="MeshInstance" type="MeshInstance" parent="Walls/Group7/Wall4" groups=[ +"walls", +]] +material_override = SubResource( 50 ) +mesh = SubResource( 11 ) +material/0 = null + +[node name="Wall5" type="StaticBody" parent="Walls/Group7"] +editor/display_folded = true +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 4.12965, 1, -9.09735 ) + +[node name="CollisionShape" type="CollisionShape" parent="Walls/Group7/Wall5"] +shape = SubResource( 9 ) + +[node name="MeshInstance" type="MeshInstance" parent="Walls/Group7/Wall5" groups=[ +"walls", +]] +material_override = SubResource( 51 ) +mesh = SubResource( 11 ) +material/0 = null + +[node name="Wall6" type="StaticBody" parent="Walls/Group7"] +editor/display_folded = true +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -6.99301, 1, 1.77014 ) + +[node name="CollisionShape" type="CollisionShape" parent="Walls/Group7/Wall6"] +shape = SubResource( 9 ) + +[node name="MeshInstance" type="MeshInstance" parent="Walls/Group7/Wall6" groups=[ +"walls", +]] +material_override = SubResource( 52 ) +mesh = SubResource( 11 ) +material/0 = null diff --git a/viewport/dynamic_split_screen/Walls.gd b/viewport/dynamic_split_screen/Walls.gd new file mode 100644 index 00000000..d806a5b9 --- /dev/null +++ b/viewport/dynamic_split_screen/Walls.gd @@ -0,0 +1,13 @@ +tool +extends Spatial + +# Set a random color to all objects in the 'walls' group + +func _ready(): + randomize() + var walls = get_tree().get_nodes_in_group("walls") + for wall in walls: + var material = SpatialMaterial.new() + material.albedo_color = Color(randf(), randf(), randf()) + + wall.material_override = material diff --git a/viewport/dynamic_split_screen/WorldEnvironment.tscn b/viewport/dynamic_split_screen/WorldEnvironment.tscn new file mode 100644 index 00000000..4b8a2d9b --- /dev/null +++ b/viewport/dynamic_split_screen/WorldEnvironment.tscn @@ -0,0 +1,11 @@ +[gd_scene load_steps=2 format=2] + +[ext_resource path="res://default_env.tres" type="Environment" id=1] + +[node name="WorldEnvironment" type="WorldEnvironment"] +environment = ExtResource( 1 ) + +[node name="DirectionalLight" type="DirectionalLight" parent="."] +transform = Transform( 1, 0, 0, 0, -0.818651, 0.574291, 0, -0.574291, -0.818651, 0, 70.567, -72.3668 ) +shadow_enabled = true +shadow_color = Color( 0.6, 0.6, 0.6, 1 ) diff --git a/viewport/dynamic_split_screen/default_env.tres b/viewport/dynamic_split_screen/default_env.tres new file mode 100644 index 00000000..24c391c0 --- /dev/null +++ b/viewport/dynamic_split_screen/default_env.tres @@ -0,0 +1,29 @@ +[gd_resource type="Environment" load_steps=2 format=2] + +[sub_resource type="ProceduralSky" id=1] +sky_top_color = Color( 0.211765, 0.313726, 0.552941, 1 ) +sky_horizon_color = Color( 0.545098, 0.686275, 0.811765, 1 ) +sky_curve = 0.131768 +sky_energy = 5.52 +ground_bottom_color = Color( 0.545098, 0.686275, 0.811765, 1 ) +ground_horizon_color = Color( 0.545098, 0.686275, 0.811765, 1 ) +ground_energy = 5.52 +sun_angle_max = 30.0 +sun_energy = 40.0 + +[resource] +background_mode = 2 +background_sky = SubResource( 1 ) +ambient_light_color = Color( 0.560784, 0.560784, 0.560784, 1 ) +ambient_light_sky_contribution = 0.3 +fog_color = Color( 1, 1, 1, 1 ) +fog_sun_color = Color( 1, 1, 1, 1 ) +fog_depth_enabled = false +fog_depth_begin = 400.0 +fog_depth_end = 1000.0 +fog_depth_curve = 0.287175 +fog_height_min = 2.0 +tonemap_mode = 2 +tonemap_white = 16.0 +dof_blur_far_distance = 416.97 +glow_intensity = 0.1 diff --git a/viewport/dynamic_split_screen/icon.png b/viewport/dynamic_split_screen/icon.png new file mode 100644 index 00000000..3b231d49 Binary files /dev/null and b/viewport/dynamic_split_screen/icon.png differ diff --git a/viewport/dynamic_split_screen/icon.png.import b/viewport/dynamic_split_screen/icon.png.import new file mode 100644 index 00000000..96cbf462 --- /dev/null +++ b/viewport/dynamic_split_screen/icon.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://icon.png" +dest_files=[ "res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +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 +svg/scale=1.0 diff --git a/viewport/dynamic_split_screen/project.godot b/viewport/dynamic_split_screen/project.godot new file mode 100644 index 00000000..82e8ab41 --- /dev/null +++ b/viewport/dynamic_split_screen/project.godot @@ -0,0 +1,87 @@ +; Engine configuration file. +; It's best edited using the editor UI and not directly, +; since the parameters that go here are not all obvious. +; +; Format: +; [section] ; section goes between [] +; param=value ; assign values to parameters + +config_version=4 + +_global_script_classes=[ ] +_global_script_class_icons={ + +} + +[application] + +config/name="Dynamic Split Screen" +run/main_scene="res://SplitScreen.tscn" +config/icon="res://icon.png" + +[debug] + +gdscript/warnings/return_value_discarded=false + +[input] + +move_up_player1={ +"deadzone": 0.5, +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":87,"unicode":0,"echo":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":90,"unicode":0,"echo":false,"script":null) +, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":1,"axis_value":-1.0,"script":null) + ] +} +move_down_player1={ +"deadzone": 0.5, +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":83,"unicode":0,"echo":false,"script":null) +, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":1,"axis_value":1.0,"script":null) + ] +} +move_left_player1={ +"deadzone": 0.5, +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":65,"unicode":0,"echo":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":81,"unicode":0,"echo":false,"script":null) +, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":0,"axis_value":-1.0,"script":null) + ] +} +move_right_player1={ +"deadzone": 0.5, +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":68,"unicode":0,"echo":false,"script":null) +, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":0,"axis_value":1.0,"script":null) + ] +} +move_up_player2={ +"deadzone": 0.5, +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":73,"unicode":0,"echo":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777232,"unicode":0,"echo":false,"script":null) +, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":3,"axis_value":-1.0,"script":null) + ] +} +move_down_player2={ +"deadzone": 0.5, +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":75,"unicode":0,"echo":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777234,"unicode":0,"echo":false,"script":null) +, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":3,"axis_value":1.0,"script":null) + ] +} +move_left_player2={ +"deadzone": 0.5, +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":74,"unicode":0,"echo":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777231,"unicode":0,"echo":false,"script":null) +, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":2,"axis_value":-1.0,"script":null) + ] +} +move_right_player2={ +"deadzone": 0.5, +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":76,"unicode":0,"echo":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777233,"unicode":0,"echo":false,"script":null) +, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":2,"axis_value":1.0,"script":null) + ] +} + +[rendering] + +quality/driver/driver_name="GLES2" +environment/default_clear_color=Color( 1, 1, 1, 1 ) +environment/default_environment="res://default_env.tres"