commit 5acfa7f42bc5e3433c7f98239ab265cadf4ff16f Author: moyin <2443444649@qq.com> Date: Mon Dec 8 16:03:47 2025 +0800 init:项目初始化,搭建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..0af181c --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +# Godot 4+ specific ignores +.godot/ +/android/ diff --git a/README.md b/README.md new file mode 100644 index 0000000..3e6c1d8 --- /dev/null +++ b/README.md @@ -0,0 +1,52 @@ +# whaleTown + +一个使用 Godot 4.5 引擎开发的游戏项目。 + +## 项目信息 + +- **引擎版本**: Godot 4.5 +- **渲染器**: Forward Plus +- **项目类型**: 2D 游戏 + +## 项目结构 + +``` +whaleTown/ +├── addons/ # Godot 插件目录 +├── assets/ # 游戏资源文件(图片、音频等) +├── data/ # 游戏数据文件(配置、关卡数据等) +├── docs/ # 项目文档 +├── scenes/ # 游戏场景文件 +│ └── main_scene.tscn # 主场景 +├── scripts/ # GDScript 脚本文件 +├── tests/ # 测试文件 +├── icon.svg # 项目图标 +└── project.godot # Godot 项目配置文件 +``` + +## 开始使用 + +### 前置要求 + +- [Godot Engine 4.5](https://godotengine.org/download) 或更高版本 + +### 运行项目 + +1. 克隆或下载此项目 +2. 使用 Godot 编辑器打开项目 +3. 在编辑器中点击"运行"按钮或按 F5 键启动游戏 + +### 开发指南 + +- **场景文件**: 所有场景文件存放在 `scenes/` 目录 +- **脚本文件**: 所有 GDScript 脚本存放在 `scripts/` 目录 +- **资源文件**: 图片、音频等资源存放在 `assets/` 目录 +- **游戏数据**: 配置文件、关卡数据等存放在 `data/` 目录 + +## 贡献 + +欢迎提交 Issue 和 Pull Request! + +## 许可证 + +[在此添加许可证信息] diff --git a/addons/.gitkeep b/addons/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/assets/.gitkeep b/assets/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/data/.gitkeep b/data/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/docs/.gitkeep b/docs/.gitkeep new file mode 100644 index 0000000..e69de29 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..c594d36 --- /dev/null +++ b/icon.svg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://0h40lbuc63pp" +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/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/project.godot b/project.godot new file mode 100644 index 0000000..5645744 --- /dev/null +++ b/project.godot @@ -0,0 +1,15 @@ +; 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="whaleTown" +config/features=PackedStringArray("4.5", "Forward Plus") +config/icon="res://icon.svg" diff --git a/scenes/.gitkeep b/scenes/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/scenes/main_scene.tscn b/scenes/main_scene.tscn new file mode 100644 index 0000000..a525467 --- /dev/null +++ b/scenes/main_scene.tscn @@ -0,0 +1,8 @@ +[gd_scene load_steps=2 format=3 uid="uid://4ptgx76y83mx"] + +[sub_resource type="AudioStream" id="AudioStream_o3jxj"] + +[node name="Node2D" type="Node2D"] + +[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."] +stream = SubResource("AudioStream_o3jxj") diff --git a/scripts/.gitkeep b/scripts/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/tests/.gitkeep b/tests/.gitkeep new file mode 100644 index 0000000..e69de29