From 41f6494eea764a4d4540a7e9696b21cce999017b Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 17 Sep 2026 15:25:38 -0500 Subject: [PATCH] initial commit --- .editorconfig | 4 +++ .gitattributes | 2 ++ .gitignore | 4 +++ GeometryJump.csproj | 7 +++++ GeometryJump.sln | 19 +++++++++++ Globals.cs | 16 ++++++++++ Globals.cs.uid | 1 + Level/LevelData.cs | 15 +++++++++ Level/LevelData.cs.uid | 1 + Level/PathNode.cs | 16 ++++++++++ Level/PathNode.cs.uid | 1 + Level/RenderPath.cs | 14 +++++++++ Level/RenderPath.cs.uid | 1 + Player/Player.cs | 19 +++++++++++ Player/Player.cs.uid | 1 + Renderer/Level.cs | 70 +++++++++++++++++++++++++++++++++++++++++ Renderer/Level.cs.uid | 1 + Renderer/Level.tscn | 6 ++++ icon.svg | 1 + icon.svg.import | 44 ++++++++++++++++++++++++++ level.json | 64 +++++++++++++++++++++++++++++++++++++ project.godot | 37 ++++++++++++++++++++++ 22 files changed, 344 insertions(+) create mode 100644 .editorconfig create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 GeometryJump.csproj create mode 100644 GeometryJump.sln create mode 100644 Globals.cs create mode 100644 Globals.cs.uid create mode 100644 Level/LevelData.cs create mode 100644 Level/LevelData.cs.uid create mode 100644 Level/PathNode.cs create mode 100644 Level/PathNode.cs.uid create mode 100644 Level/RenderPath.cs create mode 100644 Level/RenderPath.cs.uid create mode 100644 Player/Player.cs create mode 100644 Player/Player.cs.uid create mode 100644 Renderer/Level.cs create mode 100644 Renderer/Level.cs.uid create mode 100644 Renderer/Level.tscn create mode 100644 icon.svg create mode 100644 icon.svg.import create mode 100644 level.json create mode 100644 project.godot diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..f28239b --- /dev/null +++ b/.editorconfig @@ -0,0 +1,4 @@ +root = true + +[*] +charset = utf-8 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..8ad74f7 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +# Normalize EOL for all files that Git considers text files. +* text=auto eol=lf diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a91cf0c --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +# Godot 4+ specific ignores +.godot/ +/android/ +.vs diff --git a/GeometryJump.csproj b/GeometryJump.csproj new file mode 100644 index 0000000..68f0fd4 --- /dev/null +++ b/GeometryJump.csproj @@ -0,0 +1,7 @@ + + + net8.0 + net9.0 + true + + \ No newline at end of file diff --git a/GeometryJump.sln b/GeometryJump.sln new file mode 100644 index 0000000..78f9bc0 --- /dev/null +++ b/GeometryJump.sln @@ -0,0 +1,19 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GeometryJump", "GeometryJump.csproj", "{00FAD1AC-B7CC-410B-A013-36BADFA62596}" +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 + {00FAD1AC-B7CC-410B-A013-36BADFA62596}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {00FAD1AC-B7CC-410B-A013-36BADFA62596}.Debug|Any CPU.Build.0 = Debug|Any CPU + {00FAD1AC-B7CC-410B-A013-36BADFA62596}.ExportDebug|Any CPU.ActiveCfg = ExportDebug|Any CPU + {00FAD1AC-B7CC-410B-A013-36BADFA62596}.ExportDebug|Any CPU.Build.0 = ExportDebug|Any CPU + {00FAD1AC-B7CC-410B-A013-36BADFA62596}.ExportRelease|Any CPU.ActiveCfg = ExportRelease|Any CPU + {00FAD1AC-B7CC-410B-A013-36BADFA62596}.ExportRelease|Any CPU.Build.0 = ExportRelease|Any CPU + EndGlobalSection +EndGlobal diff --git a/Globals.cs b/Globals.cs new file mode 100644 index 0000000..96aef77 --- /dev/null +++ b/Globals.cs @@ -0,0 +1,16 @@ +using Godot; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace GeometryJump +{ + public static class Globals + { + public static string BasePath = Engine.IsEditorHint() + ? OS.GetExecutablePath().GetBaseDir() + : ProjectSettings.GlobalizePath("res://"); + } +} diff --git a/Globals.cs.uid b/Globals.cs.uid new file mode 100644 index 0000000..fd16bdf --- /dev/null +++ b/Globals.cs.uid @@ -0,0 +1 @@ +uid://bjcwhrf0f4oxx diff --git a/Level/LevelData.cs b/Level/LevelData.cs new file mode 100644 index 0000000..7600252 --- /dev/null +++ b/Level/LevelData.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace GeometryJump.Level +{ + public class LevelData + { + public string LevelName { get; set; } + public string LevelAuthor { get; set; } + public List LevelRenderPaths { get; set; } + } +} diff --git a/Level/LevelData.cs.uid b/Level/LevelData.cs.uid new file mode 100644 index 0000000..b0e1539 --- /dev/null +++ b/Level/LevelData.cs.uid @@ -0,0 +1 @@ +uid://cgenx7eugs5nx diff --git a/Level/PathNode.cs b/Level/PathNode.cs new file mode 100644 index 0000000..f587fa5 --- /dev/null +++ b/Level/PathNode.cs @@ -0,0 +1,16 @@ +using Godot; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace GeometryJump.Level +{ + public class PathNode + { + public Color NodeColor { get; set; } + public float PosX { get; set; } + public float PosY { get; set; } + } +} diff --git a/Level/PathNode.cs.uid b/Level/PathNode.cs.uid new file mode 100644 index 0000000..ffb2021 --- /dev/null +++ b/Level/PathNode.cs.uid @@ -0,0 +1 @@ +uid://d1puwvn6e51hg diff --git a/Level/RenderPath.cs b/Level/RenderPath.cs new file mode 100644 index 0000000..82592f3 --- /dev/null +++ b/Level/RenderPath.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace GeometryJump.Level +{ + public class RenderPath + { + public List Points { get; set; } + public List Vertcies { get; set; } + } +} diff --git a/Level/RenderPath.cs.uid b/Level/RenderPath.cs.uid new file mode 100644 index 0000000..e2aaebc --- /dev/null +++ b/Level/RenderPath.cs.uid @@ -0,0 +1 @@ +uid://b8krqxcdhp75j diff --git a/Player/Player.cs b/Player/Player.cs new file mode 100644 index 0000000..2ffb2a1 --- /dev/null +++ b/Player/Player.cs @@ -0,0 +1,19 @@ +using Godot; +using System; + +namespace GeometryJump.Player +{ + public partial class Player : Node + { + // Called when the node enters the scene tree for the first time. + public override void _Ready() + { + } + + // Called every frame. 'delta' is the elapsed time since the previous frame. + public override void _Process(double delta) + { + } + } + +} \ No newline at end of file diff --git a/Player/Player.cs.uid b/Player/Player.cs.uid new file mode 100644 index 0000000..d246895 --- /dev/null +++ b/Player/Player.cs.uid @@ -0,0 +1 @@ +uid://mytie5f3pb12 diff --git a/Renderer/Level.cs b/Renderer/Level.cs new file mode 100644 index 0000000..09e7d6b --- /dev/null +++ b/Renderer/Level.cs @@ -0,0 +1,70 @@ +using GeometryJump; +using GeometryJump.Level; +using Godot; +using System; +using System.Collections.Generic; +using System.Text.Json; + +public partial class Level : Node2D +{ + public LevelData level = new LevelData + { + LevelName = "Test", + LevelAuthor = "Xtimhedi", + LevelRenderPaths = new List + { + new RenderPath{ + Points = new System.Collections.Generic.List + { + new PathNode { NodeColor = Colors.Red, PosX = 0, PosY = 0 }, + new PathNode { NodeColor = Colors.Red, PosX = 10, PosY = 0 }, + new PathNode { NodeColor = Colors.Red, PosX = 10, PosY = 10 }, + }, + Vertcies = new System.Collections.Generic.List { 0, 1, 2 } + } + } + }; + + public override void _Ready() + { + SerializeLevel(); + GD.Print(Globals.BasePath); + } + + public void SerializeLevel() + { + var options = new JsonSerializerOptions { WriteIndented = true }; + string jsonString = JsonSerializer.Serialize(level, options); + + string savePath = Globals.BasePath.PathJoin("level.json"); + using var file = FileAccess.Open(savePath, FileAccess.ModeFlags.Write); + + if (file != null) + { + file.StoreString(jsonString); + } + else + { + GD.PrintErr($"Failed to open path: {savePath}. Error: {FileAccess.GetOpenError()}"); + } + } + + public void RenderLevel() + { + foreach (RenderPath rp in level.LevelRenderPaths) + { + // setup pathing + List nodes = rp.Points; + List verts = rp.Vertcies; + + foreach (int vert in verts) + { + PathNode curNode = nodes[vert]; + if (curNode != null) + { + + } + } + } + } +} \ No newline at end of file diff --git a/Renderer/Level.cs.uid b/Renderer/Level.cs.uid new file mode 100644 index 0000000..2469c7f --- /dev/null +++ b/Renderer/Level.cs.uid @@ -0,0 +1 @@ +uid://cw1toc1hcl5p5 diff --git a/Renderer/Level.tscn b/Renderer/Level.tscn new file mode 100644 index 0000000..56f2c94 --- /dev/null +++ b/Renderer/Level.tscn @@ -0,0 +1,6 @@ +[gd_scene format=3 uid="uid://cgfk2vhdo4nbi"] + +[ext_resource type="Script" uid="uid://cw1toc1hcl5p5" path="res://Renderer/Level.cs" id="1_u072b"] + +[node name="Level" type="Node2D" unique_id=1624383015] +script = ExtResource("1_u072b") diff --git a/icon.svg b/icon.svg new file mode 100644 index 0000000..c6bbb7d --- /dev/null +++ b/icon.svg @@ -0,0 +1 @@ + diff --git a/icon.svg.import b/icon.svg.import new file mode 100644 index 0000000..bd79d4d --- /dev/null +++ b/icon.svg.import @@ -0,0 +1,44 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://drgsvpjwqgqn3" +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/high_quality_mode=0 +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +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/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +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/level.json b/level.json new file mode 100644 index 0000000..09d931c --- /dev/null +++ b/level.json @@ -0,0 +1,64 @@ +{ + "LevelName": "Test", + "LevelAuthor": "Xtimhedi", + "LevelRenderPath": { + "Points": [ + { + "NodeColor": { + "R8": 255, + "G8": 0, + "B8": 0, + "A8": 255, + "H": 0, + "S": 1, + "V": 1, + "OkHslH": 0.08120528, + "OkHslS": 1, + "OkHslL": 0.56808466, + "Luminance": 0.2126 + }, + "PosX": 0, + "PosY": 0 + }, + { + "NodeColor": { + "R8": 255, + "G8": 0, + "B8": 0, + "A8": 255, + "H": 0, + "S": 1, + "V": 1, + "OkHslH": 0.08120528, + "OkHslS": 1, + "OkHslL": 0.56808466, + "Luminance": 0.2126 + }, + "PosX": 10, + "PosY": 0 + }, + { + "NodeColor": { + "R8": 255, + "G8": 0, + "B8": 0, + "A8": 255, + "H": 0, + "S": 1, + "V": 1, + "OkHslH": 0.08120528, + "OkHslS": 1, + "OkHslL": 0.56808466, + "Luminance": 0.2126 + }, + "PosX": 10, + "PosY": 10 + } + ], + "Vertcies": [ + 0, + 1, + 2 + ] + } +} \ No newline at end of file diff --git a/project.godot b/project.godot new file mode 100644 index 0000000..47ac5dd --- /dev/null +++ b/project.godot @@ -0,0 +1,37 @@ +; 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 + +[application] + +config/name="GeometryJump" +run/main_scene="uid://cgfk2vhdo4nbi" +config/features=PackedStringArray("4.8", "C#", "Forward Plus") +config/icon="res://icon.svg" + +[display] + +window/stretch/mode="canvas_items" +window/stretch/aspect="expand" + +[dotnet] + +project/assembly_name="GeometryJump" + +[input_devices] + +joypads/ignore_joypad_on_unfocused_application=true + +[physics] + +3d/physics_engine="Jolt Physics" + +[rendering] + +rendering_device/driver.windows="d3d12"