Browse Source

Merge pull request #371 from BenjaminNavarro/master

Add dynamic split screen demo
Aaron Franke 5 years ago
parent
commit
d19c746231

+ 107 - 0
viewport/dynamic_split_screen/CameraController.gd

@@ -0,0 +1,107 @@
+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.black
+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) / screen_size
+	var player2_position = camera2.unproject_position(player2.translation) / screen_size
+	
+	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()

+ 16 - 0
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)

+ 24 - 0
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).

+ 74 - 0
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);
+	}
+}

+ 849 - 0
viewport/dynamic_split_screen/SplitScreen.tscn

@@ -0,0 +1,849 @@
+[gd_scene load_steps=59 format=2]
+
+[ext_resource path="res://default_env.tres" type="Environment" 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.0163026, 0.114588, 0.818035, 1 )
+
+[sub_resource type="CubeMesh" id=11]
+
+[sub_resource type="SpatialMaterial" id=12]
+albedo_color = Color( 0.442023, 0.852067, 0.785551, 1 )
+
+[sub_resource type="SpatialMaterial" id=13]
+albedo_color = Color( 0.133977, 0.584249, 0.0821372, 1 )
+
+[sub_resource type="SpatialMaterial" id=14]
+albedo_color = Color( 0.395405, 0.147314, 0.511854, 1 )
+
+[sub_resource type="SpatialMaterial" id=15]
+albedo_color = Color( 0.358208, 0.341966, 0.750179, 1 )
+
+[sub_resource type="SpatialMaterial" id=16]
+albedo_color = Color( 0.0385181, 0.653927, 0.576283, 1 )
+
+[sub_resource type="SpatialMaterial" id=17]
+albedo_color = Color( 0.443924, 0.573921, 0.930779, 1 )
+
+[sub_resource type="SpatialMaterial" id=18]
+albedo_color = Color( 0.128483, 0.778405, 0.110868, 1 )
+
+[sub_resource type="SpatialMaterial" id=19]
+albedo_color = Color( 0.543521, 0.0840736, 0.594072, 1 )
+
+[sub_resource type="SpatialMaterial" id=20]
+albedo_color = Color( 0.352389, 0.490206, 0.798489, 1 )
+
+[sub_resource type="SpatialMaterial" id=21]
+albedo_color = Color( 0.822321, 0.472029, 0.983391, 1 )
+
+[sub_resource type="SpatialMaterial" id=22]
+albedo_color = Color( 0.583607, 0.676134, 0.544426, 1 )
+
+[sub_resource type="SpatialMaterial" id=23]
+albedo_color = Color( 0.649951, 0.0237741, 0.247833, 1 )
+
+[sub_resource type="SpatialMaterial" id=24]
+albedo_color = Color( 0.353433, 0.617191, 0.257219, 1 )
+
+[sub_resource type="SpatialMaterial" id=25]
+albedo_color = Color( 0.906253, 0.193018, 0.0109898, 1 )
+
+[sub_resource type="SpatialMaterial" id=26]
+albedo_color = Color( 0.36634, 0.452803, 0.191172, 1 )
+
+[sub_resource type="SpatialMaterial" id=27]
+albedo_color = Color( 0.349107, 0.206072, 0.887825, 1 )
+
+[sub_resource type="SpatialMaterial" id=28]
+albedo_color = Color( 0.843479, 0.273944, 0.505478, 1 )
+
+[sub_resource type="SpatialMaterial" id=29]
+albedo_color = Color( 0.264661, 0.38266, 0.480852, 1 )
+
+[sub_resource type="SpatialMaterial" id=30]
+albedo_color = Color( 0.687662, 0.696755, 0.680426, 1 )
+
+[sub_resource type="SpatialMaterial" id=31]
+albedo_color = Color( 0.814134, 0.00935292, 0.638229, 1 )
+
+[sub_resource type="SpatialMaterial" id=32]
+albedo_color = Color( 0.384184, 0.377533, 0.0302155, 1 )
+
+[sub_resource type="SpatialMaterial" id=33]
+albedo_color = Color( 0.184496, 0.339946, 0.324298, 1 )
+
+[sub_resource type="SpatialMaterial" id=34]
+albedo_color = Color( 0.194326, 0.60499, 0.171343, 1 )
+
+[sub_resource type="SpatialMaterial" id=35]
+albedo_color = Color( 0.508901, 0.490152, 0.30141, 1 )
+
+[sub_resource type="SpatialMaterial" id=36]
+albedo_color = Color( 0.624739, 0.704332, 0.00355822, 1 )
+
+[sub_resource type="SpatialMaterial" id=37]
+albedo_color = Color( 0.0771367, 0.774939, 0.45235, 1 )
+
+[sub_resource type="SpatialMaterial" id=38]
+albedo_color = Color( 0.399716, 0.336696, 0.825879, 1 )
+
+[sub_resource type="SpatialMaterial" id=39]
+albedo_color = Color( 0.856053, 0.924137, 0.107357, 1 )
+
+[sub_resource type="SpatialMaterial" id=40]
+albedo_color = Color( 0.127189, 0.0391242, 0.264593, 1 )
+
+[sub_resource type="SpatialMaterial" id=41]
+albedo_color = Color( 0.424077, 0.60127, 0.504344, 1 )
+
+[sub_resource type="SpatialMaterial" id=42]
+albedo_color = Color( 0.30571, 0.480934, 0.532849, 1 )
+
+[sub_resource type="SpatialMaterial" id=43]
+albedo_color = Color( 0.892993, 0.368143, 0.294531, 1 )
+
+[sub_resource type="SpatialMaterial" id=44]
+albedo_color = Color( 0.871162, 0.297536, 0.598131, 1 )
+
+[sub_resource type="SpatialMaterial" id=45]
+albedo_color = Color( 0.00162285, 0.940276, 0.765143, 1 )
+
+[sub_resource type="SpatialMaterial" id=46]
+albedo_color = Color( 0.827975, 0.106024, 0.433734, 1 )
+
+[sub_resource type="SpatialMaterial" id=47]
+albedo_color = Color( 0.82613, 0.553719, 0.978482, 1 )
+
+[sub_resource type="SpatialMaterial" id=48]
+albedo_color = Color( 0.0476994, 0.153394, 0.0724453, 1 )
+
+[sub_resource type="SpatialMaterial" id=49]
+albedo_color = Color( 0.102562, 0.788223, 0.515108, 1 )
+
+[sub_resource type="SpatialMaterial" id=50]
+albedo_color = Color( 0.663143, 0.185048, 0.580067, 1 )
+
+[sub_resource type="SpatialMaterial" id=51]
+albedo_color = Color( 0.905171, 0.0303818, 0.0867862, 1 )
+
+[sub_resource type="SpatialMaterial" id=52]
+albedo_color = Color( 0.318201, 0.572828, 0.773561, 1 )
+
+[node name="World" type="Spatial"]
+
+[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
+environment = ExtResource( 1 )
+
+[node name="DirectionalLight" type="DirectionalLight" parent="WorldEnvironment"]
+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 )
+
+[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

+ 13 - 0
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

+ 29 - 0
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

BIN
viewport/dynamic_split_screen/icon.png


+ 34 - 0
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

+ 91 - 0
viewport/dynamic_split_screen/project.godot

@@ -0,0 +1,91 @@
+; 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)
+, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":1,"axis":1,"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)
+, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":1,"axis":1,"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)
+, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":1,"axis":0,"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)
+, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":1,"axis":0,"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"