-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
set up basic split screen in godot 4
- Loading branch information
Showing
18 changed files
with
1,910 additions
and
28 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
[remap] | ||
|
||
importer="texture" | ||
type="CompressedTexture2D" | ||
uid="uid://bhjxc5s34c3cu" | ||
path="res://.godot/imported/10.png-21bb3e1511466bd58cb39629e4bca525.ctex" | ||
metadata={ | ||
"vram_texture": false | ||
} | ||
|
||
[deps] | ||
|
||
source_file="res://prototypes/game-shadows-of-surveillance/10.png" | ||
dest_files=["res://.godot/imported/10.png-21bb3e1511466bd58cb39629e4bca525.ctex"] | ||
|
||
[params] | ||
|
||
compress/mode=0 | ||
compress/high_quality=false | ||
compress/lossy_quality=0.7 | ||
compress/hdr_compression=1 | ||
compress/normal_map=0 | ||
compress/channel_pack=0 | ||
mipmaps/generate=false | ||
mipmaps/limit=-1 | ||
roughness/mode=0 | ||
roughness/src_normal="" | ||
process/fix_alpha_border=true | ||
process/premult_alpha=false | ||
process/normal_map_invert_y=false | ||
process/hdr_as_srgb=false | ||
process/hdr_clamp_exposure=false | ||
process/size_limit=0 | ||
detect_3d/compress_to=1 |
27 changes: 27 additions & 0 deletions
27
prototypes/game-shadows-of-surveillance/game-shadows-of-surveillance.gd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
extends Node2D | ||
|
||
@onready var players := { | ||
"1": { | ||
viewport = $LeftSubViewportContainer/SubViewport, | ||
camera = $LeftSubViewportContainer/SubViewport/Camera2D, | ||
player = $LeftSubViewportContainer/SubViewport/Level/Player1, | ||
}, | ||
"2": { | ||
viewport = $RightSubViewportContainer/SubViewport, | ||
camera = $RightSubViewportContainer/SubViewport/Camera2D, | ||
player = $LeftSubViewportContainer/SubViewport/Level/Player2, | ||
} | ||
} | ||
|
||
# Called when the node enters the scene tree for the first time. | ||
func _ready(): | ||
players["2"].viewport.world_2d = players["1"].viewport.world_2d | ||
|
||
for node in players.values(): | ||
var remote_transform := RemoteTransform2D.new() | ||
remote_transform.remote_path = node.camera.get_path() | ||
node.player.add_child(remote_transform) | ||
|
||
# Called every frame. 'delta' is the elapsed time since the previous frame. | ||
func _process(delta): | ||
pass |
50 changes: 50 additions & 0 deletions
50
prototypes/game-shadows-of-surveillance/game-shadows-of-surveillance.tscn
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
[gd_scene load_steps=4 format=3 uid="uid://c83unhh8aqtco"] | ||
|
||
[ext_resource type="Script" path="res://addons/pronto/behaviors/ExportBehavior.gd" id="1"] | ||
[ext_resource type="Script" path="res://prototypes/game-shadows-of-surveillance/game-shadows-of-surveillance.gd" id="1_odj0a"] | ||
[ext_resource type="PackedScene" uid="uid://dyvtu758xr2so" path="res://scenes/level.tscn" id="3_3xcs3"] | ||
|
||
[node name="Game" type="Node2D"] | ||
script = ExtResource("1_odj0a") | ||
|
||
[node name="ExportBehavior" type="Node2D" parent="."] | ||
position = Vector2(576, 324) | ||
script = ExtResource("1") | ||
title = "Shadows of Surveillance" | ||
authors = PackedStringArray("Ole Becker", "David Schroschk", "Matvey Sivashinski") | ||
description = "You are a brilliant scientist who just discovered time travel. Unfortunately, during your first test, something goes wrong and your mind is split into two parts, one part travels to the future and one is stuck in the present. | ||
In this coop split screen game, your goal is to somehow recombine the two parts of your mind. But be careful: In the future, some things have changed..." | ||
|
||
[node name="LeftSubViewportContainer" type="SubViewportContainer" parent="."] | ||
offset_right = 565.0 | ||
offset_bottom = 646.0 | ||
stretch = true | ||
|
||
[node name="SubViewport" type="SubViewport" parent="LeftSubViewportContainer"] | ||
handle_input_locally = false | ||
size = Vector2i(565, 646) | ||
render_target_update_mode = 4 | ||
|
||
[node name="Camera2D" type="Camera2D" parent="LeftSubViewportContainer/SubViewport"] | ||
|
||
[node name="Level" parent="LeftSubViewportContainer/SubViewport" instance=ExtResource("3_3xcs3")] | ||
|
||
[node name="RightSubViewportContainer" type="SubViewportContainer" parent="."] | ||
offset_left = 576.0 | ||
offset_right = 1153.0 | ||
offset_bottom = 650.0 | ||
stretch = true | ||
|
||
[node name="SubViewport" type="SubViewport" parent="RightSubViewportContainer"] | ||
handle_input_locally = false | ||
size = Vector2i(577, 650) | ||
render_target_update_mode = 4 | ||
|
||
[node name="Camera2D" type="Camera2D" parent="RightSubViewportContainer/SubViewport"] | ||
|
||
[node name="ColorRect" type="ColorRect" parent="."] | ||
offset_left = 566.0 | ||
offset_top = -4.0 | ||
offset_right = 574.0 | ||
offset_bottom = 648.0 | ||
color = Color(0.0235294, 0.501961, 1, 1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"authors": [ | ||
"Ole Becker", | ||
"David Schroschk", | ||
"Matvey Sivashinski" | ||
], | ||
"description": "You are a brilliant scientist who just discovered time travel. Unfortunately, during your first test, something goes wrong and your mind is split into two parts, one part travels to the future and one is stuck in the present. \nIn this coop split screen game, your goal is to somehow recombine the two parts of your mind. But be careful: In the future, some things have changed...", | ||
"time": "2024-01-20", | ||
"title": "Shadows of Surveillance" | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions
34
prototypes/game-shadows-of-surveillance/thumbnail.png.import
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
[remap] | ||
|
||
importer="texture" | ||
type="CompressedTexture2D" | ||
uid="uid://fk1ulnsrwyon" | ||
path="res://.godot/imported/thumbnail.png-4decdd16a2263ffe18c5c2388d77a903.ctex" | ||
metadata={ | ||
"vram_texture": false | ||
} | ||
|
||
[deps] | ||
|
||
source_file="res://prototypes/game-shadows-of-surveillance/thumbnail.png" | ||
dest_files=["res://.godot/imported/thumbnail.png-4decdd16a2263ffe18c5c2388d77a903.ctex"] | ||
|
||
[params] | ||
|
||
compress/mode=0 | ||
compress/high_quality=false | ||
compress/lossy_quality=0.7 | ||
compress/hdr_compression=1 | ||
compress/normal_map=0 | ||
compress/channel_pack=0 | ||
mipmaps/generate=false | ||
mipmaps/limit=-1 | ||
roughness/mode=0 | ||
roughness/src_normal="" | ||
process/fix_alpha_border=true | ||
process/premult_alpha=false | ||
process/normal_map_invert_y=false | ||
process/hdr_as_srgb=false | ||
process/hdr_clamp_exposure=false | ||
process/size_limit=0 | ||
detect_3d/compress_to=1 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions
34
prototypes/game-shadows-of-surveillance/tilemap.png.import
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
[remap] | ||
|
||
importer="texture" | ||
type="CompressedTexture2D" | ||
uid="uid://bdve8nywhrdlw" | ||
path="res://.godot/imported/tilemap.png-c21f45507889f24a3e40940c0b9d9912.ctex" | ||
metadata={ | ||
"vram_texture": false | ||
} | ||
|
||
[deps] | ||
|
||
source_file="res://prototypes/game-shadows-of-surveillance/tilemap.png" | ||
dest_files=["res://.godot/imported/tilemap.png-c21f45507889f24a3e40940c0b9d9912.ctex"] | ||
|
||
[params] | ||
|
||
compress/mode=0 | ||
compress/high_quality=false | ||
compress/lossy_quality=0.7 | ||
compress/hdr_compression=1 | ||
compress/normal_map=0 | ||
compress/channel_pack=0 | ||
mipmaps/generate=false | ||
mipmaps/limit=-1 | ||
roughness/mode=0 | ||
roughness/src_normal="" | ||
process/fix_alpha_border=true | ||
process/premult_alpha=false | ||
process/normal_map_invert_y=false | ||
process/hdr_as_srgb=false | ||
process/hdr_clamp_exposure=false | ||
process/size_limit=0 | ||
detect_3d/compress_to=1 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions
34
prototypes/game-shadows-of-surveillance/tilemap_packed.png.import
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
[remap] | ||
|
||
importer="texture" | ||
type="CompressedTexture2D" | ||
uid="uid://bq6gt543ylrs6" | ||
path="res://.godot/imported/tilemap_packed.png-419ac89aa0aaaf7534778e86f9dcf5b9.ctex" | ||
metadata={ | ||
"vram_texture": false | ||
} | ||
|
||
[deps] | ||
|
||
source_file="res://prototypes/game-shadows-of-surveillance/tilemap_packed.png" | ||
dest_files=["res://.godot/imported/tilemap_packed.png-419ac89aa0aaaf7534778e86f9dcf5b9.ctex"] | ||
|
||
[params] | ||
|
||
compress/mode=0 | ||
compress/high_quality=false | ||
compress/lossy_quality=0.7 | ||
compress/hdr_compression=1 | ||
compress/normal_map=0 | ||
compress/channel_pack=0 | ||
mipmaps/generate=false | ||
mipmaps/limit=-1 | ||
roughness/mode=0 | ||
roughness/src_normal="" | ||
process/fix_alpha_border=true | ||
process/premult_alpha=false | ||
process/normal_map_invert_y=false | ||
process/hdr_as_srgb=false | ||
process/hdr_clamp_exposure=false | ||
process/size_limit=0 | ||
detect_3d/compress_to=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
[gd_scene load_steps=4 format=3 uid="uid://bb5vilequmrb2"] | ||
|
||
[ext_resource type="Texture2D" uid="uid://dn87bxukebfvu" path="res://icon.svg" id="1_mrgum"] | ||
[ext_resource type="Script" path="res://addons/pronto/behaviors/PlatformerControllerBehavior.gd" id="2_uxt7j"] | ||
|
||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_6dg28"] | ||
size = Vector2(128, 127) | ||
|
||
[node name="Character" type="CharacterBody2D"] | ||
|
||
[node name="Sprite2D" type="Sprite2D" parent="."] | ||
texture = ExtResource("1_mrgum") | ||
|
||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."] | ||
position = Vector2(0, -0.5) | ||
shape = SubResource("RectangleShape2D_6dg28") | ||
|
||
[node name="PlatformerControllerBehavior" type="Node2D" parent="."] | ||
position = Vector2(576, 324) | ||
script = ExtResource("2_uxt7j") |
Oops, something went wrong.