Reorganize project into autoload/, menu/, ships/, world/, assets/
Move flat top-level files into topic folders and rewrite every res:// path reference (scenes, scripts, project.godot) accordingly. Rename node_2d.tscn -> ships/ship.tscn and lowercase images/ships/Example_ships -> assets/images/ships/example_ships for naming consistency. Update overview/structure.md to match. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@@ -6,40 +6,50 @@
|
|||||||
spacewar/ ← repo root
|
spacewar/ ← repo root
|
||||||
└── spacewar/ ← Godot project root (open this in Godot editor)
|
└── spacewar/ ← Godot project root (open this in Godot editor)
|
||||||
├── project.godot
|
├── project.godot
|
||||||
├── game_config.gd ← autoload singleton (tuning values, player state, signals)
|
├── autoload/
|
||||||
├── main_menu.tscn/gd ← entry point / main scene
|
│ └── game_config.gd ← autoload singleton (tuning values, player state, signals)
|
||||||
├── server_browser.tscn/gd ← server browser UI (built, not in active flow yet)
|
├── menu/
|
||||||
├── world.tscn ← game world
|
│ ├── main_menu.tscn/gd ← entry point / main scene
|
||||||
├── node_2d.tscn ← player ship scene
|
│ ├── server_browser.tscn/gd ← server browser UI (built, not in active flow yet)
|
||||||
├── ship_movement.gd ← player ship logic
|
│ ├── pause_menu.tscn/gd ← in-game pause overlay (ESC / Start button)
|
||||||
├── bullet.tscn/gd ← projectile
|
│ └── team_select.tscn/gd ← race + ship selection overlay (shown on world load)
|
||||||
├── pause_menu.tscn/gd ← in-game pause overlay (ESC / Start button)
|
├── ships/
|
||||||
├── team_select.tscn/gd ← race + ship selection overlay (shown on world load)
|
│ ├── ship.tscn ← player ship scene (formerly node_2d.tscn)
|
||||||
├── asteroid_movement.gd ← stub
|
│ ├── ship_movement.gd ← player ship logic
|
||||||
|
│ └── bullet.tscn/gd ← projectile
|
||||||
|
├── world/
|
||||||
|
│ ├── world.tscn ← game world
|
||||||
|
│ └── tile_map.tscn ← unused prototype tilemap
|
||||||
|
└── assets/
|
||||||
|
├── icon.svg
|
||||||
└── images/
|
└── images/
|
||||||
├── background/skybox/ ← 6 space background PNGs (1.png – 6.png)
|
├── background/skybox/ ← 6 space background PNGs (1.png – 6.png)
|
||||||
└── ships/Example_ships/ ← 4 placeholder ship sprites (1.png, 1B.png, 2a.png, 3b.png)
|
├── effects/ ← explosion1.png
|
||||||
|
├── ships/example_ships/ ← 4 placeholder ship sprites (1.png, 1B.png, 2a.png, 3b.png)
|
||||||
|
└── tiles/ ← bwQ7rQ.png, used by tile_map.tscn
|
||||||
```
|
```
|
||||||
|
|
||||||
|
> **Note:** `asteroid_movement.gd` referenced in an earlier version of this doc does not exist yet — it's still an open task (see `CLAUDE.md`).
|
||||||
|
|
||||||
## Scene Graph
|
## Scene Graph
|
||||||
|
|
||||||
### `main_menu.tscn` — entry point
|
### `menu/main_menu.tscn` — entry point
|
||||||
```
|
```
|
||||||
MainMenu (Control) ← main_menu.gd builds all UI in _ready()
|
MainMenu (Control) ← main_menu.gd builds all UI in _ready()
|
||||||
```
|
```
|
||||||
|
|
||||||
### `world.tscn` — game world
|
### `world/world.tscn` — game world
|
||||||
```
|
```
|
||||||
World (Node2D)
|
World (Node2D)
|
||||||
├── TextureRect ← static space background (skybox/1.png)
|
├── TextureRect ← static space background (skybox/1.png)
|
||||||
├── Player ← instance of node_2d.tscn
|
├── Player ← instance of ships/ship.tscn
|
||||||
├── HUD (CanvasLayer)
|
├── HUD (CanvasLayer)
|
||||||
│ └── HealthLabel
|
│ └── HealthLabel
|
||||||
├── PauseMenu (CanvasLayer, layer=10) ← pause_menu.tscn
|
├── PauseMenu (CanvasLayer, layer=10) ← menu/pause_menu.tscn
|
||||||
└── TeamSelect (CanvasLayer, layer=20) ← team_select.tscn; queue_free()s after selection
|
└── TeamSelect (CanvasLayer, layer=20) ← menu/team_select.tscn; queue_free()s after selection
|
||||||
```
|
```
|
||||||
|
|
||||||
### `node_2d.tscn` — player ship
|
### `ships/ship.tscn` — player ship
|
||||||
```
|
```
|
||||||
Player (CharacterBody2D) ← ship_movement.gd
|
Player (CharacterBody2D) ← ship_movement.gd
|
||||||
├── CollisionShape2D ← CircleShape2D
|
├── CollisionShape2D ← CircleShape2D
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 995 B After Width: | Height: | Size: 995 B |
@@ -3,15 +3,15 @@
|
|||||||
importer="texture"
|
importer="texture"
|
||||||
type="CompressedTexture2D"
|
type="CompressedTexture2D"
|
||||||
uid="uid://b527hu5te2484"
|
uid="uid://b527hu5te2484"
|
||||||
path="res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex"
|
path="res://.godot/imported/icon.svg-56083ea2a1f1a4f1e49773bdc6d7826c.ctex"
|
||||||
metadata={
|
metadata={
|
||||||
"vram_texture": false
|
"vram_texture": false
|
||||||
}
|
}
|
||||||
|
|
||||||
[deps]
|
[deps]
|
||||||
|
|
||||||
source_file="res://icon.svg"
|
source_file="res://assets/icon.svg"
|
||||||
dest_files=["res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex"]
|
dest_files=["res://.godot/imported/icon.svg-56083ea2a1f1a4f1e49773bdc6d7826c.ctex"]
|
||||||
|
|
||||||
[params]
|
[params]
|
||||||
|
|
||||||
|
Before Width: | Height: | Size: 545 KiB After Width: | Height: | Size: 545 KiB |
@@ -3,15 +3,15 @@
|
|||||||
importer="texture"
|
importer="texture"
|
||||||
type="CompressedTexture2D"
|
type="CompressedTexture2D"
|
||||||
uid="uid://d0i6jwqh131b1"
|
uid="uid://d0i6jwqh131b1"
|
||||||
path="res://.godot/imported/1.png-97f1111764d7d26127f844f9bb99447f.ctex"
|
path="res://.godot/imported/1.png-9043d9fbf9e2bf7867a65a014ac1bb5c.ctex"
|
||||||
metadata={
|
metadata={
|
||||||
"vram_texture": false
|
"vram_texture": false
|
||||||
}
|
}
|
||||||
|
|
||||||
[deps]
|
[deps]
|
||||||
|
|
||||||
source_file="res://images/background/skybox/1.png"
|
source_file="res://assets/images/background/skybox/1.png"
|
||||||
dest_files=["res://.godot/imported/1.png-97f1111764d7d26127f844f9bb99447f.ctex"]
|
dest_files=["res://.godot/imported/1.png-9043d9fbf9e2bf7867a65a014ac1bb5c.ctex"]
|
||||||
|
|
||||||
[params]
|
[params]
|
||||||
|
|
||||||
|
Before Width: | Height: | Size: 326 KiB After Width: | Height: | Size: 326 KiB |
@@ -3,15 +3,15 @@
|
|||||||
importer="texture"
|
importer="texture"
|
||||||
type="CompressedTexture2D"
|
type="CompressedTexture2D"
|
||||||
uid="uid://uchnddsvimku"
|
uid="uid://uchnddsvimku"
|
||||||
path="res://.godot/imported/2.png-535b6f5f8c8d79f538e82478a5ae919b.ctex"
|
path="res://.godot/imported/2.png-f325333b4ac2c9d640327b741b5bdd96.ctex"
|
||||||
metadata={
|
metadata={
|
||||||
"vram_texture": false
|
"vram_texture": false
|
||||||
}
|
}
|
||||||
|
|
||||||
[deps]
|
[deps]
|
||||||
|
|
||||||
source_file="res://images/background/skybox/2.png"
|
source_file="res://assets/images/background/skybox/2.png"
|
||||||
dest_files=["res://.godot/imported/2.png-535b6f5f8c8d79f538e82478a5ae919b.ctex"]
|
dest_files=["res://.godot/imported/2.png-f325333b4ac2c9d640327b741b5bdd96.ctex"]
|
||||||
|
|
||||||
[params]
|
[params]
|
||||||
|
|
||||||
|
Before Width: | Height: | Size: 299 KiB After Width: | Height: | Size: 299 KiB |
@@ -3,15 +3,15 @@
|
|||||||
importer="texture"
|
importer="texture"
|
||||||
type="CompressedTexture2D"
|
type="CompressedTexture2D"
|
||||||
uid="uid://tcs117dqynbv"
|
uid="uid://tcs117dqynbv"
|
||||||
path="res://.godot/imported/3.png-1ad36fe04660abf5feafa71bee86d926.ctex"
|
path="res://.godot/imported/3.png-aac58c86024c147faa7f0fe9c98e0813.ctex"
|
||||||
metadata={
|
metadata={
|
||||||
"vram_texture": false
|
"vram_texture": false
|
||||||
}
|
}
|
||||||
|
|
||||||
[deps]
|
[deps]
|
||||||
|
|
||||||
source_file="res://images/background/skybox/3.png"
|
source_file="res://assets/images/background/skybox/3.png"
|
||||||
dest_files=["res://.godot/imported/3.png-1ad36fe04660abf5feafa71bee86d926.ctex"]
|
dest_files=["res://.godot/imported/3.png-aac58c86024c147faa7f0fe9c98e0813.ctex"]
|
||||||
|
|
||||||
[params]
|
[params]
|
||||||
|
|
||||||
|
Before Width: | Height: | Size: 508 KiB After Width: | Height: | Size: 508 KiB |
@@ -3,15 +3,15 @@
|
|||||||
importer="texture"
|
importer="texture"
|
||||||
type="CompressedTexture2D"
|
type="CompressedTexture2D"
|
||||||
uid="uid://65mjcpw5rk06"
|
uid="uid://65mjcpw5rk06"
|
||||||
path="res://.godot/imported/4.png-f0201325d495db0494d2b1f7bbeec9a9.ctex"
|
path="res://.godot/imported/4.png-ac50d45c0235068a7d62ac864015b30b.ctex"
|
||||||
metadata={
|
metadata={
|
||||||
"vram_texture": false
|
"vram_texture": false
|
||||||
}
|
}
|
||||||
|
|
||||||
[deps]
|
[deps]
|
||||||
|
|
||||||
source_file="res://images/background/skybox/4.png"
|
source_file="res://assets/images/background/skybox/4.png"
|
||||||
dest_files=["res://.godot/imported/4.png-f0201325d495db0494d2b1f7bbeec9a9.ctex"]
|
dest_files=["res://.godot/imported/4.png-ac50d45c0235068a7d62ac864015b30b.ctex"]
|
||||||
|
|
||||||
[params]
|
[params]
|
||||||
|
|
||||||
|
Before Width: | Height: | Size: 507 KiB After Width: | Height: | Size: 507 KiB |
@@ -3,15 +3,15 @@
|
|||||||
importer="texture"
|
importer="texture"
|
||||||
type="CompressedTexture2D"
|
type="CompressedTexture2D"
|
||||||
uid="uid://bc1onqc7d21w7"
|
uid="uid://bc1onqc7d21w7"
|
||||||
path="res://.godot/imported/5.png-08cd6a64e2f902af1b1785a272d9c50f.ctex"
|
path="res://.godot/imported/5.png-9e39fa14a4d23423b7e41a120c0fc72a.ctex"
|
||||||
metadata={
|
metadata={
|
||||||
"vram_texture": false
|
"vram_texture": false
|
||||||
}
|
}
|
||||||
|
|
||||||
[deps]
|
[deps]
|
||||||
|
|
||||||
source_file="res://images/background/skybox/5.png"
|
source_file="res://assets/images/background/skybox/5.png"
|
||||||
dest_files=["res://.godot/imported/5.png-08cd6a64e2f902af1b1785a272d9c50f.ctex"]
|
dest_files=["res://.godot/imported/5.png-9e39fa14a4d23423b7e41a120c0fc72a.ctex"]
|
||||||
|
|
||||||
[params]
|
[params]
|
||||||
|
|
||||||
|
Before Width: | Height: | Size: 636 KiB After Width: | Height: | Size: 636 KiB |
@@ -3,15 +3,15 @@
|
|||||||
importer="texture"
|
importer="texture"
|
||||||
type="CompressedTexture2D"
|
type="CompressedTexture2D"
|
||||||
uid="uid://cvyfcu03jdqas"
|
uid="uid://cvyfcu03jdqas"
|
||||||
path="res://.godot/imported/6.png-21d9e30a24ce4c43ebcbe0ea36daa029.ctex"
|
path="res://.godot/imported/6.png-291acaf620f540245af50c3d50814b61.ctex"
|
||||||
metadata={
|
metadata={
|
||||||
"vram_texture": false
|
"vram_texture": false
|
||||||
}
|
}
|
||||||
|
|
||||||
[deps]
|
[deps]
|
||||||
|
|
||||||
source_file="res://images/background/skybox/6.png"
|
source_file="res://assets/images/background/skybox/6.png"
|
||||||
dest_files=["res://.godot/imported/6.png-21d9e30a24ce4c43ebcbe0ea36daa029.ctex"]
|
dest_files=["res://.godot/imported/6.png-291acaf620f540245af50c3d50814b61.ctex"]
|
||||||
|
|
||||||
[params]
|
[params]
|
||||||
|
|
||||||
|
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 30 KiB |
@@ -3,15 +3,15 @@
|
|||||||
importer="texture"
|
importer="texture"
|
||||||
type="CompressedTexture2D"
|
type="CompressedTexture2D"
|
||||||
uid="uid://ded6ek6l7n8gb"
|
uid="uid://ded6ek6l7n8gb"
|
||||||
path="res://.godot/imported/explosion1.png-ebaaa46c76a7bf39885ed36c21d9704d.ctex"
|
path="res://.godot/imported/explosion1.png-dbaabd892c7c9e8bfd179ebbad20e6c6.ctex"
|
||||||
metadata={
|
metadata={
|
||||||
"vram_texture": false
|
"vram_texture": false
|
||||||
}
|
}
|
||||||
|
|
||||||
[deps]
|
[deps]
|
||||||
|
|
||||||
source_file="res://images/effects/explosion1.png"
|
source_file="res://assets/images/effects/explosion1.png"
|
||||||
dest_files=["res://.godot/imported/explosion1.png-ebaaa46c76a7bf39885ed36c21d9704d.ctex"]
|
dest_files=["res://.godot/imported/explosion1.png-dbaabd892c7c9e8bfd179ebbad20e6c6.ctex"]
|
||||||
|
|
||||||
[params]
|
[params]
|
||||||
|
|
||||||
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
@@ -3,15 +3,15 @@
|
|||||||
importer="texture"
|
importer="texture"
|
||||||
type="CompressedTexture2D"
|
type="CompressedTexture2D"
|
||||||
uid="uid://td2tbmkm3r6u"
|
uid="uid://td2tbmkm3r6u"
|
||||||
path="res://.godot/imported/1.png-6cd3243048854fb354d682a18817356e.ctex"
|
path="res://.godot/imported/1.png-362339079d92758f46be17d4e359799c.ctex"
|
||||||
metadata={
|
metadata={
|
||||||
"vram_texture": false
|
"vram_texture": false
|
||||||
}
|
}
|
||||||
|
|
||||||
[deps]
|
[deps]
|
||||||
|
|
||||||
source_file="res://images/ships/Example_ships/1.png"
|
source_file="res://assets/images/ships/example_ships/1.png"
|
||||||
dest_files=["res://.godot/imported/1.png-6cd3243048854fb354d682a18817356e.ctex"]
|
dest_files=["res://.godot/imported/1.png-362339079d92758f46be17d4e359799c.ctex"]
|
||||||
|
|
||||||
[params]
|
[params]
|
||||||
|
|
||||||
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
@@ -3,15 +3,15 @@
|
|||||||
importer="texture"
|
importer="texture"
|
||||||
type="CompressedTexture2D"
|
type="CompressedTexture2D"
|
||||||
uid="uid://cgfd5fboa45dn"
|
uid="uid://cgfd5fboa45dn"
|
||||||
path="res://.godot/imported/1B.png-991b0890a43069731cad413022099b02.ctex"
|
path="res://.godot/imported/1B.png-4ca6f2d74cf902792fc79e84bac00b83.ctex"
|
||||||
metadata={
|
metadata={
|
||||||
"vram_texture": false
|
"vram_texture": false
|
||||||
}
|
}
|
||||||
|
|
||||||
[deps]
|
[deps]
|
||||||
|
|
||||||
source_file="res://images/ships/Example_ships/1B.png"
|
source_file="res://assets/images/ships/example_ships/1B.png"
|
||||||
dest_files=["res://.godot/imported/1B.png-991b0890a43069731cad413022099b02.ctex"]
|
dest_files=["res://.godot/imported/1B.png-4ca6f2d74cf902792fc79e84bac00b83.ctex"]
|
||||||
|
|
||||||
[params]
|
[params]
|
||||||
|
|
||||||
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
@@ -3,15 +3,15 @@
|
|||||||
importer="texture"
|
importer="texture"
|
||||||
type="CompressedTexture2D"
|
type="CompressedTexture2D"
|
||||||
uid="uid://wnrdhn33ce50"
|
uid="uid://wnrdhn33ce50"
|
||||||
path="res://.godot/imported/2a.png-9bfe77c7bec5a2e8a116acfd3eb6380a.ctex"
|
path="res://.godot/imported/2a.png-9fa51336ca7f78060a7eadc36c632e13.ctex"
|
||||||
metadata={
|
metadata={
|
||||||
"vram_texture": false
|
"vram_texture": false
|
||||||
}
|
}
|
||||||
|
|
||||||
[deps]
|
[deps]
|
||||||
|
|
||||||
source_file="res://images/ships/Example_ships/2a.png"
|
source_file="res://assets/images/ships/example_ships/2a.png"
|
||||||
dest_files=["res://.godot/imported/2a.png-9bfe77c7bec5a2e8a116acfd3eb6380a.ctex"]
|
dest_files=["res://.godot/imported/2a.png-9fa51336ca7f78060a7eadc36c632e13.ctex"]
|
||||||
|
|
||||||
[params]
|
[params]
|
||||||
|
|
||||||
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
@@ -3,15 +3,15 @@
|
|||||||
importer="texture"
|
importer="texture"
|
||||||
type="CompressedTexture2D"
|
type="CompressedTexture2D"
|
||||||
uid="uid://b6xkpyy1rg74v"
|
uid="uid://b6xkpyy1rg74v"
|
||||||
path="res://.godot/imported/3b.png-d95c52be2bb572cb2c8ffd7d62d1118b.ctex"
|
path="res://.godot/imported/3b.png-272e2c2803a6a3a9dfb46c9672f6a0fe.ctex"
|
||||||
metadata={
|
metadata={
|
||||||
"vram_texture": false
|
"vram_texture": false
|
||||||
}
|
}
|
||||||
|
|
||||||
[deps]
|
[deps]
|
||||||
|
|
||||||
source_file="res://images/ships/Example_ships/3b.png"
|
source_file="res://assets/images/ships/example_ships/3b.png"
|
||||||
dest_files=["res://.godot/imported/3b.png-d95c52be2bb572cb2c8ffd7d62d1118b.ctex"]
|
dest_files=["res://.godot/imported/3b.png-272e2c2803a6a3a9dfb46c9672f6a0fe.ctex"]
|
||||||
|
|
||||||
[params]
|
[params]
|
||||||
|
|
||||||
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
@@ -3,15 +3,15 @@
|
|||||||
importer="texture"
|
importer="texture"
|
||||||
type="CompressedTexture2D"
|
type="CompressedTexture2D"
|
||||||
uid="uid://dglp131j5tga6"
|
uid="uid://dglp131j5tga6"
|
||||||
path="res://.godot/imported/bwQ7rQ.png-13ccf92d28893d68bca8cee95abb7d20.ctex"
|
path="res://.godot/imported/bwQ7rQ.png-f54459e0d6bfa1fb00ae56276884677f.ctex"
|
||||||
metadata={
|
metadata={
|
||||||
"vram_texture": false
|
"vram_texture": false
|
||||||
}
|
}
|
||||||
|
|
||||||
[deps]
|
[deps]
|
||||||
|
|
||||||
source_file="res://bwQ7rQ.png"
|
source_file="res://assets/images/tiles/bwQ7rQ.png"
|
||||||
dest_files=["res://.godot/imported/bwQ7rQ.png-13ccf92d28893d68bca8cee95abb7d20.ctex"]
|
dest_files=["res://.godot/imported/bwQ7rQ.png-f54459e0d6bfa1fb00ae56276884677f.ctex"]
|
||||||
|
|
||||||
[params]
|
[params]
|
||||||
|
|
||||||
@@ -32,7 +32,7 @@ func _build_ui() -> void:
|
|||||||
|
|
||||||
func _add_bg() -> void:
|
func _add_bg() -> void:
|
||||||
var bg := TextureRect.new()
|
var bg := TextureRect.new()
|
||||||
bg.texture = load("res://images/background/skybox/2.png")
|
bg.texture = load("res://assets/images/background/skybox/2.png")
|
||||||
bg.expand_mode = TextureRect.EXPAND_FIT_WIDTH_PROPORTIONAL
|
bg.expand_mode = TextureRect.EXPAND_FIT_WIDTH_PROPORTIONAL
|
||||||
bg.stretch_mode = TextureRect.STRETCH_KEEP_ASPECT_COVERED
|
bg.stretch_mode = TextureRect.STRETCH_KEEP_ASPECT_COVERED
|
||||||
bg.set_anchors_and_offsets_preset(Control.PRESET_FULL_RECT)
|
bg.set_anchors_and_offsets_preset(Control.PRESET_FULL_RECT)
|
||||||
@@ -329,10 +329,10 @@ func _update_play_buttons() -> void:
|
|||||||
|
|
||||||
func _on_play_casual() -> void:
|
func _on_play_casual() -> void:
|
||||||
GameConfig.player_name = _name_input.text.strip_edges()
|
GameConfig.player_name = _name_input.text.strip_edges()
|
||||||
get_tree().change_scene_to_file("res://world.tscn")
|
get_tree().change_scene_to_file("res://world/world.tscn")
|
||||||
|
|
||||||
|
|
||||||
func _on_play_ranked() -> void:
|
func _on_play_ranked() -> void:
|
||||||
GameConfig.player_name = _name_input.text.strip_edges()
|
GameConfig.player_name = _name_input.text.strip_edges()
|
||||||
GameConfig.player_race = 1 # TODO: race selection screen
|
GameConfig.player_race = 1 # TODO: race selection screen
|
||||||
get_tree().change_scene_to_file("res://world.tscn")
|
get_tree().change_scene_to_file("res://world/world.tscn")
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
[gd_scene format=3 uid="uid://bmainmenu001"]
|
[gd_scene format=3 uid="uid://bmainmenu001"]
|
||||||
|
|
||||||
[ext_resource type="Script" path="res://main_menu.gd" id="1_script"]
|
[ext_resource type="Script" path="res://menu/main_menu.gd" id="1_script"]
|
||||||
|
|
||||||
[node name="MainMenu" type="Control"]
|
[node name="MainMenu" type="Control"]
|
||||||
anchor_right = 1.0
|
anchor_right = 1.0
|
||||||
@@ -117,7 +117,7 @@ func _flat(col: Color, radius: int = 0) -> StyleBoxFlat:
|
|||||||
|
|
||||||
|
|
||||||
func _on_quit_to_menu() -> void:
|
func _on_quit_to_menu() -> void:
|
||||||
get_tree().change_scene_to_file("res://main_menu.tscn")
|
get_tree().change_scene_to_file("res://menu/main_menu.tscn")
|
||||||
|
|
||||||
|
|
||||||
func _on_quit_to_desktop() -> void:
|
func _on_quit_to_desktop() -> void:
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
[gd_scene format=3 uid="uid://cpausemenu01a"]
|
[gd_scene format=3 uid="uid://cpausemenu01a"]
|
||||||
|
|
||||||
[ext_resource type="Script" path="res://pause_menu.gd" id="1_script"]
|
[ext_resource type="Script" path="res://menu/pause_menu.gd" id="1_script"]
|
||||||
|
|
||||||
[node name="PauseMenu" type="CanvasLayer"]
|
[node name="PauseMenu" type="CanvasLayer"]
|
||||||
script = ExtResource("1_script")
|
script = ExtResource("1_script")
|
||||||
@@ -15,7 +15,7 @@ func _ready() -> void:
|
|||||||
|
|
||||||
func _build_ui() -> void:
|
func _build_ui() -> void:
|
||||||
var bg := TextureRect.new()
|
var bg := TextureRect.new()
|
||||||
bg.texture = load("res://images/background/skybox/1.png")
|
bg.texture = load("res://assets/images/background/skybox/1.png")
|
||||||
bg.expand_mode = TextureRect.EXPAND_FIT_WIDTH_PROPORTIONAL
|
bg.expand_mode = TextureRect.EXPAND_FIT_WIDTH_PROPORTIONAL
|
||||||
bg.stretch_mode = TextureRect.STRETCH_KEEP_ASPECT_COVERED
|
bg.stretch_mode = TextureRect.STRETCH_KEEP_ASPECT_COVERED
|
||||||
bg.set_anchors_and_offsets_preset(Control.PRESET_FULL_RECT)
|
bg.set_anchors_and_offsets_preset(Control.PRESET_FULL_RECT)
|
||||||
@@ -280,4 +280,4 @@ func _update_join() -> void:
|
|||||||
func _on_join_pressed() -> void:
|
func _on_join_pressed() -> void:
|
||||||
GameConfig.player_name = _name_input.text.strip_edges()
|
GameConfig.player_name = _name_input.text.strip_edges()
|
||||||
GameConfig.player_race = _selected_race
|
GameConfig.player_race = _selected_race
|
||||||
get_tree().change_scene_to_file("res://world.tscn")
|
get_tree().change_scene_to_file("res://world/world.tscn")
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
[gd_scene format=3 uid="uid://doolmlvruun6o"]
|
[gd_scene format=3 uid="uid://doolmlvruun6o"]
|
||||||
|
|
||||||
[ext_resource type="Script" path="res://server_browser.gd" id="1_script"]
|
[ext_resource type="Script" path="res://menu/server_browser.gd" id="1_script"]
|
||||||
|
|
||||||
[node name="ServerBrowser" type="Control"]
|
[node name="ServerBrowser" type="Control"]
|
||||||
anchor_right = 1.0
|
anchor_right = 1.0
|
||||||
@@ -11,25 +11,25 @@ const SHIPS := [
|
|||||||
"name": "WARBIRD",
|
"name": "WARBIRD",
|
||||||
"role": "All-Round Fighter",
|
"role": "All-Round Fighter",
|
||||||
"desc": "The most versatile ship in the fleet. Solid speed, reliable firepower, and enough armor to stay in the fight. Forgiving to fly and effective in any situation — the go-to choice when you're not sure what you're up against.",
|
"desc": "The most versatile ship in the fleet. Solid speed, reliable firepower, and enough armor to stay in the fight. Forgiving to fly and effective in any situation — the go-to choice when you're not sure what you're up against.",
|
||||||
"path": "res://images/ships/Example_ships/1.png",
|
"path": "res://assets/images/ships/example_ships/1.png",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "JAVELIN",
|
"name": "JAVELIN",
|
||||||
"role": "Fast Interceptor",
|
"role": "Fast Interceptor",
|
||||||
"desc": "Built for speed above everything else. Light armor means you have to pick your fights carefully, but nothing can outrun you. Best used for hit-and-run strikes, hunting weakened targets, and escaping when things go wrong.",
|
"desc": "Built for speed above everything else. Light armor means you have to pick your fights carefully, but nothing can outrun you. Best used for hit-and-run strikes, hunting weakened targets, and escaping when things go wrong.",
|
||||||
"path": "res://images/ships/Example_ships/1B.png",
|
"path": "res://assets/images/ships/example_ships/1B.png",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "SPIDER",
|
"name": "SPIDER",
|
||||||
"role": "Heavy Support",
|
"role": "Heavy Support",
|
||||||
"desc": "Slow but extremely durable. High-volume fire makes it devastating in sustained engagements. Anchors a team by holding zones and suppressing enemy movements. Stay near allies — alone you're a target, together you're a wall.",
|
"desc": "Slow but extremely durable. High-volume fire makes it devastating in sustained engagements. Anchors a team by holding zones and suppressing enemy movements. Stay near allies — alone you're a target, together you're a wall.",
|
||||||
"path": "res://images/ships/Example_ships/2a.png",
|
"path": "res://assets/images/ships/example_ships/2a.png",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "LANCASTER",
|
"name": "LANCASTER",
|
||||||
"role": "Stealth Bomber",
|
"role": "Stealth Bomber",
|
||||||
"desc": "Medium speed with high burst damage potential. Built for patience — get into position, strike hard, and fade before the enemy can respond. Excels at flanking and ambushes. Requires discipline to play but punishes mistakes severely.",
|
"desc": "Medium speed with high burst damage potential. Built for patience — get into position, strike hard, and fade before the enemy can respond. Excels at flanking and ambushes. Requires discipline to play but punishes mistakes severely.",
|
||||||
"path": "res://images/ships/Example_ships/3b.png",
|
"path": "res://assets/images/ships/example_ships/3b.png",
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
[gd_scene format=3 uid="uid://dteamselect01"]
|
[gd_scene format=3 uid="uid://dteamselect01"]
|
||||||
|
|
||||||
[ext_resource type="Script" path="res://team_select.gd" id="1_script"]
|
[ext_resource type="Script" path="res://menu/team_select.gd" id="1_script"]
|
||||||
|
|
||||||
[node name="TeamSelect" type="CanvasLayer"]
|
[node name="TeamSelect" type="CanvasLayer"]
|
||||||
script = ExtResource("1_script")
|
script = ExtResource("1_script")
|
||||||
@@ -11,13 +11,13 @@ config_version=5
|
|||||||
[application]
|
[application]
|
||||||
|
|
||||||
config/name="spacewar"
|
config/name="spacewar"
|
||||||
run/main_scene="res://main_menu.tscn"
|
run/main_scene="res://menu/main_menu.tscn"
|
||||||
config/features=PackedStringArray("4.7", "Forward Plus")
|
config/features=PackedStringArray("4.7", "Forward Plus")
|
||||||
config/icon="res://icon.svg"
|
config/icon="res://assets/icon.svg"
|
||||||
|
|
||||||
[autoload]
|
[autoload]
|
||||||
|
|
||||||
GameConfig="*res://game_config.gd"
|
GameConfig="*res://autoload/game_config.gd"
|
||||||
|
|
||||||
[display]
|
[display]
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[gd_scene format=3]
|
[gd_scene format=3]
|
||||||
|
|
||||||
[ext_resource type="Script" path="res://bullet.gd" id="1"]
|
[ext_resource type="Script" path="res://ships/bullet.gd" id="1"]
|
||||||
|
|
||||||
[sub_resource type="CircleShape2D" id="CircleShape2D_1"]
|
[sub_resource type="CircleShape2D" id="CircleShape2D_1"]
|
||||||
radius = 4.0
|
radius = 4.0
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
[gd_scene format=3 uid="uid://dygtdlkvo6ofl"]
|
[gd_scene format=3 uid="uid://dygtdlkvo6ofl"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://c4kj3i73wjdcj" path="res://ship_movement.gd" id="1_0e48y"]
|
[ext_resource type="Script" uid="uid://c4kj3i73wjdcj" path="res://ships/ship_movement.gd" id="1_0e48y"]
|
||||||
[ext_resource type="Texture2D" uid="uid://td2tbmkm3r6u" path="res://images/ships/Example_ships/1.png" id="2_epypp"]
|
[ext_resource type="Texture2D" uid="uid://td2tbmkm3r6u" path="res://assets/images/ships/example_ships/1.png" id="2_epypp"]
|
||||||
|
|
||||||
[sub_resource type="CircleShape2D" id="CircleShape2D_2uxl3"]
|
[sub_resource type="CircleShape2D" id="CircleShape2D_2uxl3"]
|
||||||
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
extends CharacterBody2D
|
extends CharacterBody2D
|
||||||
|
|
||||||
const BULLET_SCENE = preload("res://bullet.tscn")
|
const BULLET_SCENE = preload("res://ships/bullet.tscn")
|
||||||
|
|
||||||
var _fire_cooldown: float = 0.0
|
var _fire_cooldown: float = 0.0
|
||||||
var health: int = 0
|
var health: int = 0
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
[gd_scene format=3 uid="uid://cxarety0nbcme"]
|
[gd_scene format=3 uid="uid://cxarety0nbcme"]
|
||||||
|
|
||||||
[ext_resource type="Texture2D" uid="uid://dglp131j5tga6" path="res://bwQ7rQ.png" id="1_7yhko"]
|
[ext_resource type="Texture2D" uid="uid://dglp131j5tga6" path="res://assets/images/tiles/bwQ7rQ.png" id="1_7yhko"]
|
||||||
|
|
||||||
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_1n30v"]
|
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_1n30v"]
|
||||||
texture = ExtResource("1_7yhko")
|
texture = ExtResource("1_7yhko")
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
[gd_scene format=3 uid="uid://c77s15ns13p6y"]
|
[gd_scene format=3 uid="uid://c77s15ns13p6y"]
|
||||||
|
|
||||||
[ext_resource type="PackedScene" uid="uid://dygtdlkvo6ofl" path="res://node_2d.tscn" id="1_f3sb7"]
|
[ext_resource type="PackedScene" uid="uid://dygtdlkvo6ofl" path="res://ships/ship.tscn" id="1_f3sb7"]
|
||||||
[ext_resource type="Texture2D" uid="uid://d0i6jwqh131b1" path="res://images/background/skybox/1.png" id="1_fj7yv"]
|
[ext_resource type="Texture2D" uid="uid://d0i6jwqh131b1" path="res://assets/images/background/skybox/1.png" id="1_fj7yv"]
|
||||||
[ext_resource type="PackedScene" uid="uid://cpausemenu01a" path="res://pause_menu.tscn" id="2_pm"]
|
[ext_resource type="PackedScene" uid="uid://cpausemenu01a" path="res://menu/pause_menu.tscn" id="2_pm"]
|
||||||
[ext_resource type="PackedScene" uid="uid://dteamselect01" path="res://team_select.tscn" id="3_ts"]
|
[ext_resource type="PackedScene" uid="uid://dteamselect01" path="res://menu/team_select.tscn" id="3_ts"]
|
||||||
|
|
||||||
[node name="World" type="Node2D" unique_id=1962020789]
|
[node name="World" type="Node2D" unique_id=1962020789]
|
||||||
|
|
||||||