diff --git a/assets/text/text.csv b/assets/text/text.csv index 4967502..e61e984 100644 --- a/assets/text/text.csv +++ b/assets/text/text.csv @@ -3,9 +3,11 @@ UI_UNSET,unset UI_LISTEN,listening... UI_CANCEL,Cancel UI_ACCEPT,Accept +UI_START,Start! UI_ON,On UI_OFF,Off UI_BACK,"⏎ Back" +UI_LOCKED,Locked UI_GOAL,Goal! , TITLE_START,"- Press Start -" @@ -23,6 +25,11 @@ TITLE_NETWORK_MULTI,"Online Multiplayer" TITLE_PROFILE,Profile TITLE_CREDITS,Credits , +DM_HEADING,"Real GFOLF - Local Setup" +DM_MAP,"Select a Map" +DM_PLAYERS,Gfolfers +DM_ADD_PLAYER,"Add a Gfolfer" +DM_NAME_PLACEHOLDER,"Enter a name" , PAUSE_HEADING,Paused PAUSE_RESUME,Resume @@ -124,3 +131,5 @@ BALL_PLASMA,Plasma BALL_BRICK,Brick BALL_BEACH,"Beach Ball" BALL_POWER,Powerball +, +MAP_DEBUG,"Debug Island" diff --git a/levels/debug_level/debug_island.tres b/levels/debug_level/debug_island.tres new file mode 100644 index 0000000..af67fe7 --- /dev/null +++ b/levels/debug_level/debug_island.tres @@ -0,0 +1,11 @@ +[gd_resource type="Resource" script_class="Level" load_steps=4 format=3 uid="uid://chewry1b1a28j"] + +[ext_resource type="Texture2D" uid="uid://dlqet1c5a7j7k" path="res://levels/debug_level/preview.jpg" id="1_1ewcj"] +[ext_resource type="PackedScene" uid="uid://bm2o3mex10v11" path="res://levels/debug_level/debug_level.tscn" id="2_eu01o"] +[ext_resource type="Script" path="res://src/world/level_catalog/level.gd" id="3_83327"] + +[resource] +script = ExtResource("3_83327") +scene = ExtResource("2_eu01o") +level_name = "MAP_DEBUG" +preview = ExtResource("1_1ewcj") diff --git a/levels/debug_level/debug_level.tscn b/levels/debug_level/debug_level.tscn index 9ece3b8..ca53ddb 100644 --- a/levels/debug_level/debug_level.tscn +++ b/levels/debug_level/debug_level.tscn @@ -365,7 +365,7 @@ shape = SubResource("BoxShape3D_x3wvm") transform = Transform3D(-0.74629, 0, -0.665621, 0, 1, 0, 0.665621, 0, -0.74629, 381.024, -0.5, 224.968) [node name="ItemSpawner" type="Marker3D" parent="Course/WaterTable/Sailboat"] -transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.73528, 0.292423, 0.248718) +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.5, 5) script = ExtResource("8_5kaye") item = ExtResource("8_3jmdx") amount = -1 @@ -374,6 +374,7 @@ spawn_turns = 1 [node name="Flag" parent="Course" instance=ExtResource("13_6jtao")] transform = Transform3D(-0.777146, 0, -0.629321, 0, 1, 0, 0.629321, 0, -0.777146, 540, 4, 452) +visible = false [node name="TestSpawners" type="Node3D" parent="Course"] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 228.164, 4, 274.211) diff --git a/levels/debug_level/preview.jpg b/levels/debug_level/preview.jpg new file mode 100644 index 0000000..efdf20b --- /dev/null +++ b/levels/debug_level/preview.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0779b76ce0179571a168ff6056369c79fd2f8b3d83acadfeb763ede89cd39580 +size 132080 diff --git a/levels/debug_level/preview.jpg.import b/levels/debug_level/preview.jpg.import new file mode 100644 index 0000000..06864fb --- /dev/null +++ b/levels/debug_level/preview.jpg.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dlqet1c5a7j7k" +path="res://.godot/imported/preview.jpg-00ef6b4680c54da42f46dbea949541d6.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://levels/debug_level/preview.jpg" +dest_files=["res://.godot/imported/preview.jpg-00ef6b4680c54da42f46dbea949541d6.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=true +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 diff --git a/project.godot b/project.godot index e97497e..61c9c9c 100644 --- a/project.godot +++ b/project.godot @@ -21,6 +21,7 @@ run/max_fps=60 GameRuntime="*res://src/game/game_runtime.gd" ClubCatalog="*res://src/equipment/clubs/club_catalog.tscn" +LevelCatalog="*res://src/world/level/level_catalog.gd" GameSettings="*res://src/game/game_settings.gd" [debug] diff --git a/src/world/level/level.gd b/src/world/level/level.gd new file mode 100644 index 0000000..75fa741 --- /dev/null +++ b/src/world/level/level.gd @@ -0,0 +1,16 @@ +class_name Level extends Resource +## Container for a level scene & associated data. + +## Scene file of this level. +@export var scene: PackedScene + +## Name of the level (or corresponding i18n key) +@export var level_name: String + +## Preview image for the level. Will be used for thumbnails. +@export var preview: Texture2D + +## Global typesafe accessor for level catalog +static var catalog: LevelCatalogType: + get: + return LevelCatalog diff --git a/src/world/level/level_catalog.gd b/src/world/level/level_catalog.gd new file mode 100644 index 0000000..4986a07 --- /dev/null +++ b/src/world/level/level_catalog.gd @@ -0,0 +1,4 @@ +class_name LevelCatalogType extends Node +## Provides access to levels. + +@export var levels: Array[Level] = [] diff --git a/src/world/level/level_catalog.tscn b/src/world/level/level_catalog.tscn new file mode 100644 index 0000000..c4a6a3c --- /dev/null +++ b/src/world/level/level_catalog.tscn @@ -0,0 +1,9 @@ +[gd_scene load_steps=4 format=3 uid="uid://cdtdvka0bssgy"] + +[ext_resource type="Script" path="res://src/world/level/level_catalog.gd" id="1_wjjeu"] +[ext_resource type="Resource" uid="uid://chewry1b1a28j" path="res://levels/debug_level/debug_island.tres" id="3_3eqbc"] +[ext_resource type="Script" path="res://src/world/level/level.gd" id="3_8lfqu"] + +[node name="LevelCatalog" type="Node"] +script = ExtResource("1_wjjeu") +levels = Array[ExtResource("3_8lfqu")]([ExtResource("3_3eqbc")])