summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Stålnacke <joel@saker.fi>2026-03-19 21:26:44 +0200
committerJoel Stålnacke <joel@saker.fi>2026-03-19 21:26:44 +0200
commit3b60cd682120947119f442bb71ab2a5e98decccc (patch)
treec168115bc480616656b8a8bf6e3da7f887e722df
parentc8ec21382633851dfb25922f7c15610818865b29 (diff)
Remove Godot client
-rw-r--r--client/.gitattributes2
-rw-r--r--client/.gitignore3
-rw-r--r--client/Djup.csproj13
-rw-r--r--client/Djup.sln19
-rw-r--r--client/Game.cs37
-rw-r--r--client/Game.cs.uid1
-rw-r--r--client/Player.cs24
-rw-r--r--client/Player.cs.uid1
-rw-r--r--client/World.cs75
-rw-r--r--client/World.cs.uid1
-rw-r--r--client/game.tscn13
-rw-r--r--client/icon.svg1
-rw-r--r--client/icon.svg.import37
-rw-r--r--client/player.tscn6
-rw-r--r--client/project.godot51
-rw-r--r--client/world.tscn6
16 files changed, 0 insertions, 290 deletions
diff --git a/client/.gitattributes b/client/.gitattributes
deleted file mode 100644
index 8ad74f7..0000000
--- a/client/.gitattributes
+++ /dev/null
@@ -1,2 +0,0 @@
-# Normalize EOL for all files that Git considers text files.
-* text=auto eol=lf
diff --git a/client/.gitignore b/client/.gitignore
deleted file mode 100644
index 0af181c..0000000
--- a/client/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-# Godot 4+ specific ignores
-.godot/
-/android/
diff --git a/client/Djup.csproj b/client/Djup.csproj
deleted file mode 100644
index de4ca2f..0000000
--- a/client/Djup.csproj
+++ /dev/null
@@ -1,13 +0,0 @@
-<Project Sdk="Godot.NET.Sdk/4.6.1">
- <PropertyGroup>
- <TargetFramework>net10.0</TargetFramework>
- <EnableDynamicLoading>true</EnableDynamicLoading>
- <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- </PropertyGroup>
-
- <ItemGroup>
- <ProjectReference Include="..\Djup.Native\Djup.Native.csproj" />
- </ItemGroup>
-
- <Import Project="../Djup.Native/AddRuntimeTargetsToDepsJson.targets" />
-</Project>
diff --git a/client/Djup.sln b/client/Djup.sln
deleted file mode 100644
index fc24000..0000000
--- a/client/Djup.sln
+++ /dev/null
@@ -1,19 +0,0 @@
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 2012
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Djup", "Djup.csproj", "{77DE270B-0994-425F-9CA2-4E664136B608}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- ExportDebug|Any CPU = ExportDebug|Any CPU
- ExportRelease|Any CPU = ExportRelease|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {77DE270B-0994-425F-9CA2-4E664136B608}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {77DE270B-0994-425F-9CA2-4E664136B608}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {77DE270B-0994-425F-9CA2-4E664136B608}.ExportDebug|Any CPU.ActiveCfg = ExportDebug|Any CPU
- {77DE270B-0994-425F-9CA2-4E664136B608}.ExportDebug|Any CPU.Build.0 = ExportDebug|Any CPU
- {77DE270B-0994-425F-9CA2-4E664136B608}.ExportRelease|Any CPU.ActiveCfg = ExportRelease|Any CPU
- {77DE270B-0994-425F-9CA2-4E664136B608}.ExportRelease|Any CPU.Build.0 = ExportRelease|Any CPU
- EndGlobalSection
-EndGlobal
diff --git a/client/Game.cs b/client/Game.cs
deleted file mode 100644
index 6bf6192..0000000
--- a/client/Game.cs
+++ /dev/null
@@ -1,37 +0,0 @@
-using Godot;
-using System;
-using Djup.Native;
-
-public partial class Game : Node2D
-{
- private World world;
-
- private int[] balls = new int[100];
- private Random rng = new();
-
- // Called when the node enters the scene tree for the first time.
- public unsafe override void _Ready()
- {
- RenderingServer.SetDefaultClearColor(Colors.LightGray);
- LibDjup.log_set_output((level, source, line, msg) => {
- string level_name = level switch
- {
- LogLevel.Trace => "trace",
- LogLevel.Debug => "debug",
- LogLevel.Info => " info",
- LogLevel.Warn => " warn",
- LogLevel.Error => "error",
- LogLevel.Fatal => "fatal",
- _ => "UNKNOWN"
- };
- GD.Print($"libdjup {source.PadLeft(10)}:{line.ToString().PadRight(3)} {level_name}: {msg}");
- });
-
- world = GetNode<World>("World");
-
- world.PutPlayer(0, new Djup.Native.Player()
- {
- Position = new Vec2(100f, 100f),
- });
- }
-}
diff --git a/client/Game.cs.uid b/client/Game.cs.uid
deleted file mode 100644
index 09994b1..0000000
--- a/client/Game.cs.uid
+++ /dev/null
@@ -1 +0,0 @@
-uid://bacc4njrygwie
diff --git a/client/Player.cs b/client/Player.cs
deleted file mode 100644
index da95275..0000000
--- a/client/Player.cs
+++ /dev/null
@@ -1,24 +0,0 @@
-using Godot;
-using System;
-using Djup.Native;
-
-public partial class Player : Node2D
-{
- [Export]
- public World World { get; set; }
- public uint Id { get; set; } = 0;
-
- public unsafe override void _Process(double delta)
- {
- byte input = 0;
- if (Input.IsActionPressed("up"))
- input |= (byte)PlayerInput.Up;
- if (Input.IsActionPressed("down"))
- input |= (byte)PlayerInput.Down;
- if (Input.IsActionPressed("left"))
- input |= (byte)PlayerInput.Left;
- if (Input.IsActionPressed("right"))
- input |= (byte)PlayerInput.Right;
- World.SetPlayerInput(Id, input);
- }
-}
diff --git a/client/Player.cs.uid b/client/Player.cs.uid
deleted file mode 100644
index 336ca89..0000000
--- a/client/Player.cs.uid
+++ /dev/null
@@ -1 +0,0 @@
-uid://83q1e5vk2swk
diff --git a/client/World.cs b/client/World.cs
deleted file mode 100644
index 8f5dfb6..0000000
--- a/client/World.cs
+++ /dev/null
@@ -1,75 +0,0 @@
-using Godot;
-using System;
-using Djup.Native;
-
-public partial class World : Node2D
-{
- private IntPtr context;
- private IntPtr currentSnapshot;
- public const double Tps = 1d/60d;
-
- public unsafe override void _Ready()
- {
- context = LibDjup.physics_context_create(2);
- currentSnapshot = LibDjup.physics_context_get_snapshot(context);
- }
-
- public override void _ExitTree()
- {
- LibDjup.physics_context_free(context);
- }
-
- public unsafe void PutPlayer(uint id, Djup.Native.Player player)
- {
- if (LibDjup.snapshot_put_player(currentSnapshot, id, &player) != 0)
- {
- throw new Exception($"Failed to put player {id}");
- }
- }
-
- public void SetPlayerInput(uint playerId, byte input)
- {
- int ret = LibDjup.snapshot_set_player_input(currentSnapshot, playerId, input);
- if (ret != 0)
- {
- throw new Exception($"Failed to set input of player {playerId}: {ret}");
- }
- }
-
- private unsafe void DrawPlayer(Djup.Native.Player player)
- {
- float radius = 50f;
- this.DrawCircle(new Vector2(player.Position.X, player.Position.Y), radius, Colors.DarkBlue, antialiased: true);
- this.DrawCircle(new Vector2(player.Position.X, player.Position.Y), radius * 0.90f, Colors.Blue, antialiased: true);
- }
-
- public unsafe override void _Draw()
- {
- Snapshot *s = (Snapshot *)currentSnapshot;
-
- for (int i = 0; i < Constants.WorldMaxPlayers; i++)
- {
- var p = s->Players[i];
- if (p.State == EntityState.Active)
- {
- DrawPlayer(p);
- }
- }
- }
-
- public override void _Process(double delta)
- {
- this.QueueRedraw();
- }
-
- public override void _PhysicsProcess(double delta)
- {
- IntPtr next = LibDjup.physics_context_get_snapshot(context);
- if (LibDjup.physics_tick(currentSnapshot, Tps, next) != 0)
- {
- throw new Exception("World tick failed");
- }
- LibDjup.physics_context_return_snapshot(context, currentSnapshot);
- currentSnapshot = next;
- }
-}
diff --git a/client/World.cs.uid b/client/World.cs.uid
deleted file mode 100644
index 01d051f..0000000
--- a/client/World.cs.uid
+++ /dev/null
@@ -1 +0,0 @@
-uid://cj1l4s5bq73bd
diff --git a/client/game.tscn b/client/game.tscn
deleted file mode 100644
index 576d002..0000000
--- a/client/game.tscn
+++ /dev/null
@@ -1,13 +0,0 @@
-[gd_scene format=3 uid="uid://w0k2j13hm04i"]
-
-[ext_resource type="Script" path="res://Game.cs" id="1_t8lam"]
-[ext_resource type="PackedScene" uid="uid://drdk1by1fun2q" path="res://world.tscn" id="2_tm4sj"]
-[ext_resource type="PackedScene" uid="uid://b0f23dtef1o4h" path="res://player.tscn" id="3_caccr"]
-
-[node name="Game" type="Node2D"]
-script = ExtResource("1_t8lam")
-
-[node name="World" parent="." instance=ExtResource("2_tm4sj")]
-
-[node name="Player" parent="." node_paths=PackedStringArray("World") instance=ExtResource("3_caccr")]
-World = NodePath("../World")
diff --git a/client/icon.svg b/client/icon.svg
deleted file mode 100644
index 9d8b7fa..0000000
--- a/client/icon.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg xmlns="http://www.w3.org/2000/svg" width="128" height="128"><rect width="124" height="124" x="2" y="2" fill="#363d52" stroke="#212532" stroke-width="4" rx="14"/><g fill="#fff" transform="translate(12.322 12.322)scale(.101)"><path d="M105 673v33q407 354 814 0v-33z"/><path fill="#478cbf" d="m105 673 152 14q12 1 15 14l4 67 132 10 8-61q2-11 15-15h162q13 4 15 15l8 61 132-10 4-67q3-13 15-14l152-14V427q30-39 56-81-35-59-83-108-43 20-82 47-40-37-88-64 7-51 8-102-59-28-123-42-26 43-46 89-49-7-98 0-20-46-46-89-64 14-123 42 1 51 8 102-48 27-88 64-39-27-82-47-48 49-83 108 26 42 56 81zm0 33v39c0 276 813 276 814 0v-39l-134 12-5 69q-2 10-14 13l-162 11q-12 0-16-11l-10-65H446l-10 65q-4 11-16 11l-162-11q-12-3-14-13l-5-69z"/><path d="M483 600c0 34 58 34 58 0v-86c0-34-58-34-58 0z"/><circle cx="725" cy="526" r="90"/><circle cx="299" cy="526" r="90"/></g><g fill="#414042" transform="translate(12.322 12.322)scale(.101)"><circle cx="307" cy="532" r="60"/><circle cx="717" cy="532" r="60"/></g></svg> \ No newline at end of file
diff --git a/client/icon.svg.import b/client/icon.svg.import
deleted file mode 100644
index 57c75ba..0000000
--- a/client/icon.svg.import
+++ /dev/null
@@ -1,37 +0,0 @@
-[remap]
-
-importer="texture"
-type="CompressedTexture2D"
-uid="uid://cg5s4tfihtewl"
-path="res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex"
-metadata={
-"vram_texture": false
-}
-
-[deps]
-
-source_file="res://icon.svg"
-dest_files=["res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.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
-svg/scale=1.0
-editor/scale_with_editor_scale=false
-editor/convert_colors_with_editor_theme=false
diff --git a/client/player.tscn b/client/player.tscn
deleted file mode 100644
index ef3913c..0000000
--- a/client/player.tscn
+++ /dev/null
@@ -1,6 +0,0 @@
-[gd_scene format=3 uid="uid://b0f23dtef1o4h"]
-
-[ext_resource type="Script" path="res://Player.cs" id="1_bjul0"]
-
-[node name="Player" type="Node2D"]
-script = ExtResource("1_bjul0")
diff --git a/client/project.godot b/client/project.godot
deleted file mode 100644
index d5cf98a..0000000
--- a/client/project.godot
+++ /dev/null
@@ -1,51 +0,0 @@
-; 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=5
-
-[animation]
-
-compatibility/default_parent_skeleton_in_mesh_instance_3d=true
-
-[application]
-
-config/name="Djup"
-run/main_scene="res://game.tscn"
-config/features=PackedStringArray("4.6", "C#", "Forward Plus")
-config/icon="res://icon.svg"
-
-[display]
-
-window/stretch/mode="canvas_items"
-
-[dotnet]
-
-project/assembly_name="Djup"
-
-[input]
-
-left={
-"deadzone": 0.5,
-"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":65,"key_label":0,"unicode":97,"location":0,"echo":false,"script":null)
-]
-}
-right={
-"deadzone": 0.5,
-"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":68,"key_label":0,"unicode":100,"location":0,"echo":false,"script":null)
-]
-}
-up={
-"deadzone": 0.5,
-"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":87,"key_label":0,"unicode":119,"location":0,"echo":false,"script":null)
-]
-}
-down={
-"deadzone": 0.5,
-"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":83,"key_label":0,"unicode":115,"location":0,"echo":false,"script":null)
-]
-}
diff --git a/client/world.tscn b/client/world.tscn
deleted file mode 100644
index 972f028..0000000
--- a/client/world.tscn
+++ /dev/null
@@ -1,6 +0,0 @@
-[gd_scene format=3 uid="uid://drdk1by1fun2q"]
-
-[ext_resource type="Script" path="res://World.cs" id="1_7wii1"]
-
-[node name="World" type="Node2D"]
-script = ExtResource("1_7wii1")