Skip to content

Commit ae02236

Browse files
authored
Merge pull request #541 from Duroxxigar/mono-mp
Created C# networked Pong
2 parents c7610e9 + 3f8567f commit ae02236

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+886
-123
lines changed

2d/pong/left_pallete.png

-104 Bytes
Binary file not shown.

2d/pong/paddle.png

84 Bytes
Loading

mono/pong/left_pallete.png.import renamed to 2d/pong/paddle.png.import

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22

33
importer="texture"
44
type="StreamTexture"
5-
path="res://.import/left_pallete.png-bc33611074a0f886142e37c77bd2545a.stex"
5+
path="res://.import/paddle.png-0e798fb0912613386507c9904d5cc01a.stex"
66
metadata={
77
"vram_texture": false
88
}
99

1010
[deps]
1111

12-
source_file="res://left_pallete.png"
13-
dest_files=[ "res://.import/left_pallete.png-bc33611074a0f886142e37c77bd2545a.stex" ]
12+
source_file="res://paddle.png"
13+
dest_files=[ "res://.import/paddle.png-0e798fb0912613386507c9904d5cc01a.stex" ]
1414

1515
[params]
1616

2d/pong/pong.tscn

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
[gd_scene load_steps=13 format=2]
1+
[gd_scene load_steps=12 format=2]
22

33
[ext_resource path="res://logic/paddle.gd" type="Script" id=1]
4-
[ext_resource path="res://left_pallete.png" type="Texture" id=2]
5-
[ext_resource path="res://right_pallete.png" type="Texture" id=3]
4+
[ext_resource path="res://paddle.png" type="Texture" id=2]
65
[ext_resource path="res://logic/ball.gd" type="Script" id=4]
76
[ext_resource path="res://ball.png" type="Texture" id=5]
87
[ext_resource path="res://separator.png" type="Texture" id=6]
@@ -32,6 +31,7 @@ __meta__ = {
3231
}
3332

3433
[node name="Left" type="Area2D" parent="."]
34+
modulate = Color( 0, 1, 1, 1 )
3535
position = Vector2( 67.6285, 192.594 )
3636
script = ExtResource( 1 )
3737

@@ -42,11 +42,12 @@ texture = ExtResource( 2 )
4242
shape = SubResource( 1 )
4343

4444
[node name="Right" type="Area2D" parent="."]
45+
modulate = Color( 1, 0, 1, 1 )
4546
position = Vector2( 563.815, 188.919 )
4647
script = ExtResource( 1 )
4748

4849
[node name="Sprite" type="Sprite" parent="Right"]
49-
texture = ExtResource( 3 )
50+
texture = ExtResource( 2 )
5051

5152
[node name="Collision" type="CollisionShape2D" parent="Right"]
5253
shape = SubResource( 1 )

2d/pong/right_pallete.png

-104 Bytes
Binary file not shown.

2d/pong/right_pallete.png.import

Lines changed: 0 additions & 34 deletions
This file was deleted.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<Project Sdk="Godot.NET.Sdk/3.2.3">
2+
<PropertyGroup>
3+
<TargetFramework>net472</TargetFramework>
4+
<RootNamespace>PongMultiplayer</RootNamespace>
5+
</PropertyGroup>
6+
</Project>
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Microsoft Visual Studio Solution File, Format Version 12.00
2+
# Visual Studio 2012
3+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Pong Multiplayer with C#", "Pong Multiplayer with C#.csproj", "{4BB6C2D0-FC11-466E-8C73-8DAD689F135A}"
4+
EndProject
5+
Global
6+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
7+
Debug|Any CPU = Debug|Any CPU
8+
ExportDebug|Any CPU = ExportDebug|Any CPU
9+
ExportRelease|Any CPU = ExportRelease|Any CPU
10+
EndGlobalSection
11+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
12+
{4BB6C2D0-FC11-466E-8C73-8DAD689F135A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
13+
{4BB6C2D0-FC11-466E-8C73-8DAD689F135A}.Debug|Any CPU.Build.0 = Debug|Any CPU
14+
{4BB6C2D0-FC11-466E-8C73-8DAD689F135A}.ExportDebug|Any CPU.ActiveCfg = ExportDebug|Any CPU
15+
{4BB6C2D0-FC11-466E-8C73-8DAD689F135A}.ExportDebug|Any CPU.Build.0 = ExportDebug|Any CPU
16+
{4BB6C2D0-FC11-466E-8C73-8DAD689F135A}.ExportRelease|Any CPU.ActiveCfg = ExportRelease|Any CPU
17+
{4BB6C2D0-FC11-466E-8C73-8DAD689F135A}.ExportRelease|Any CPU.Build.0 = ExportRelease|Any CPU
18+
EndGlobalSection
19+
EndGlobal

mono/multiplayer_pong/README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Pong Multiplayer with C#
2+
3+
A multiplayer demo of Pong. One player presses "host". The other presses "join". This only works locally.
4+
5+
Language: [C#](https://docs.godotengine.org/en/latest/getting_started/scripting/c_sharp/index.html)
6+
7+
Renderer: GLES 2
8+
9+
Note: There is a GDScript version available [here](https://github.com/godotengine/godot-demo-projects/tree/master/networking/multiplayer_pong).
10+
11+
## Screenshots
12+
13+
![Screenshot](../../2d/pong/screenshots/pong.png)

mono/multiplayer_pong/ball.png

115 Bytes
Loading

0 commit comments

Comments
 (0)