From cd3ef1c3da46c81ad519f02561230fee98ba109e Mon Sep 17 00:00:00 2001 From: Tony Bark Date: Tue, 18 Feb 2025 18:49:00 +0000 Subject: [PATCH] Initial commit --- .gitattributes | 63 +++++++++++++++++++ .gitignore | 114 +++++++++++++++++++++++++++++++++++ LICENSE | 24 ++++++++ project/default_env.tres | 101 +++++++++++++++++++++++++++++++ project/icon.png | Bin 0 -> 3498 bytes project/icon.png.import | 34 +++++++++++ project/project.godot | 36 +++++++++++ project/scenes/GameScn.tscn | 14 +++++ project/scenes/PauseScn.tscn | 45 ++++++++++++++ project/scenes/TitleScn.tscn | 25 ++++++++ project/source/GameKit.gd | 15 +++++ project/source/GameScn.gd | 7 +++ project/source/PauseScn.gd | 15 +++++ project/source/TitleScn.gd | 4 ++ 14 files changed, 497 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 LICENSE create mode 100644 project/default_env.tres create mode 100644 project/icon.png create mode 100644 project/icon.png.import create mode 100644 project/project.godot create mode 100644 project/scenes/GameScn.tscn create mode 100644 project/scenes/PauseScn.tscn create mode 100644 project/scenes/TitleScn.tscn create mode 100644 project/source/GameKit.gd create mode 100644 project/source/GameScn.gd create mode 100644 project/source/PauseScn.gd create mode 100644 project/source/TitleScn.gd diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..1ff0c42 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,63 @@ +############################################################################### +# Set default behavior to automatically normalize line endings. +############################################################################### +* text=auto + +############################################################################### +# Set default behavior for command prompt diff. +# +# This is need for earlier builds of msysgit that does not have it on by +# default for csharp files. +# Note: This is only used by command line +############################################################################### +#*.cs diff=csharp + +############################################################################### +# Set the merge driver for project and solution files +# +# Merging from the command prompt will add diff markers to the files if there +# are conflicts (Merging from VS is not affected by the settings below, in VS +# the diff markers are never inserted). Diff markers may cause the following +# file extensions to fail to load in VS. An alternative would be to treat +# these files as binary and thus will always conflict and require user +# intervention with every merge. To do so, just uncomment the entries below +############################################################################### +#*.sln merge=binary +#*.csproj merge=binary +#*.vbproj merge=binary +#*.vcxproj merge=binary +#*.vcproj merge=binary +#*.dbproj merge=binary +#*.fsproj merge=binary +#*.lsproj merge=binary +#*.wixproj merge=binary +#*.modelproj merge=binary +#*.sqlproj merge=binary +#*.wwaproj merge=binary + +############################################################################### +# behavior for image files +# +# image files are treated as binary by default. +############################################################################### +#*.jpg binary +#*.png binary +#*.gif binary + +############################################################################### +# diff behavior for common document formats +# +# Convert binary document formats to text before diffing them. This feature +# is only available from the command line. Turn it on by uncommenting the +# entries below. +############################################################################### +#*.doc diff=astextplain +#*.DOC diff=astextplain +#*.docx diff=astextplain +#*.DOCX diff=astextplain +#*.dot diff=astextplain +#*.DOT diff=astextplain +#*.pdf diff=astextplain +#*.PDF diff=astextplain +#*.rtf diff=astextplain +#*.RTF diff=astextplain diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8c5faef --- /dev/null +++ b/.gitignore @@ -0,0 +1,114 @@ +# Created by https://www.toptal.com/developers/gitignore/api/godot,visualstudiocode,macos,linux,windows +# Edit at https://www.toptal.com/developers/gitignore?templates=godot,visualstudiocode,macos,linux,windows + +### Godot ### +# Godot 4+ specific ignores +.godot/ + +# Godot-specific ignores +.import/ +export.cfg +export_presets.cfg + +# Imported translations (automatically generated from CSV files) +*.translation + +# Mono-specific ignores +.mono/ +data_*/ +mono_crash.*.json + +### Linux ### +*~ + +# temporary files which can be created if a process still has a handle open of a deleted file +.fuse_hidden* + +# KDE directory preferences +.directory + +# Linux trash folder which might appear on any partition or disk +.Trash-* + +# .nfs files are created when an open file is removed but is still being accessed +.nfs* + +### macOS ### +# General +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +### macOS Patch ### +# iCloud generated files +*.icloud + +### VisualStudioCode ### +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +!.vscode/*.code-snippets + +# Local History for Visual Studio Code +.history/ + +# Built Visual Studio Code Extensions +*.vsix + +### VisualStudioCode Patch ### +# Ignore all local history of files +.history +.ionide + +### Windows ### +# Windows thumbnail cache files +Thumbs.db +Thumbs.db:encryptable +ehthumbs.db +ehthumbs_vista.db + +# Dump file +*.stackdump + +# Folder config file +[Dd]esktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msix +*.msm +*.msp + +# Windows shortcuts +*.lnk + +# End of https://www.toptal.com/developers/gitignore/api/godot,visualstudiocode,macos,linux,windows diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..6bb8a29 --- /dev/null +++ b/LICENSE @@ -0,0 +1,24 @@ +This is free and unencumbered software released into the public domain. + +Anyone is free to copy, modify, publish, use, compile, sell, or +distribute this software, either in source code form or as a compiled +binary, for any purpose, commercial or non-commercial, and by any +means. + +In jurisdictions that recognize copyright laws, the author or authors +of this software dedicate any and all copyright interest in the +software to the public domain. We make this dedication for the benefit +of the public at large and to the detriment of our heirs and +successors. We intend this dedication to be an overt act of +relinquishment in perpetuity of all present and future rights to this +software under copyright law. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +For more information, please refer to \ No newline at end of file diff --git a/project/default_env.tres b/project/default_env.tres new file mode 100644 index 0000000..9df75f5 --- /dev/null +++ b/project/default_env.tres @@ -0,0 +1,101 @@ +[gd_resource type="Environment" load_steps=2 format=2] + +[sub_resource type="Sky" id=1] + +radiance_size = 4 +sky_top_color = Color( 0.0470588, 0.454902, 0.976471, 1 ) +sky_horizon_color = Color( 0.556863, 0.823529, 0.909804, 1 ) +sky_curve = 0.25 +sky_energy = 1.0 +ground_bottom_color = Color( 0.101961, 0.145098, 0.188235, 1 ) +ground_horizon_color = Color( 0.482353, 0.788235, 0.952941, 1 ) +ground_curve = 0.01 +ground_energy = 1.0 +sun_color = Color( 1, 1, 1, 1 ) +sun_latitude = 35.0 +sun_longitude = 0.0 +sun_angle_min = 1.0 +sun_angle_max = 100.0 +sun_curve = 0.05 +sun_energy = 16.0 +texture_size = 2 + +[resource] + +background_mode = 2 +background_sky = SubResource( 1 ) +background_sky_custom_fov = 0.0 +background_color = Color( 0, 0, 0, 1 ) +background_energy = 1.0 +background_canvas_max_layer = 0 +ambient_light_color = Color( 0, 0, 0, 1 ) +ambient_light_energy = 1.0 +ambient_light_sky_contribution = 1.0 +fog_enabled = false +fog_color = Color( 0.5, 0.6, 0.7, 1 ) +fog_sun_color = Color( 1, 0.9, 0.7, 1 ) +fog_sun_amount = 0.0 +fog_depth_enabled = true +fog_depth_begin = 10.0 +fog_depth_curve = 1.0 +fog_transmit_enabled = false +fog_transmit_curve = 1.0 +fog_height_enabled = false +fog_height_min = 0.0 +fog_height_max = 100.0 +fog_height_curve = 1.0 +tonemap_mode = 0 +tonemap_exposure = 1.0 +tonemap_white = 1.0 +auto_exposure_enabled = false +auto_exposure_scale = 0.4 +auto_exposure_min_luma = 0.05 +auto_exposure_max_luma = 8.0 +auto_exposure_speed = 0.5 +ss_reflections_enabled = false +ss_reflections_max_steps = 64 +ss_reflections_fade_in = 0.15 +ss_reflections_fade_out = 2.0 +ss_reflections_depth_tolerance = 0.2 +ss_reflections_roughness = true +ssao_enabled = false +ssao_radius = 1.0 +ssao_intensity = 1.0 +ssao_radius2 = 0.0 +ssao_intensity2 = 1.0 +ssao_bias = 0.01 +ssao_light_affect = 0.0 +ssao_color = Color( 0, 0, 0, 1 ) +ssao_quality = 0 +ssao_blur = 3 +ssao_edge_sharpness = 4.0 +dof_blur_far_enabled = false +dof_blur_far_distance = 10.0 +dof_blur_far_transition = 5.0 +dof_blur_far_amount = 0.1 +dof_blur_far_quality = 1 +dof_blur_near_enabled = false +dof_blur_near_distance = 2.0 +dof_blur_near_transition = 1.0 +dof_blur_near_amount = 0.1 +dof_blur_near_quality = 1 +glow_enabled = false +glow_levels/1 = false +glow_levels/2 = false +glow_levels/3 = true +glow_levels/4 = false +glow_levels/5 = true +glow_levels/6 = false +glow_levels/7 = false +glow_intensity = 0.8 +glow_strength = 1.0 +glow_bloom = 0.0 +glow_blend_mode = 2 +glow_hdr_threshold = 1.0 +glow_hdr_scale = 2.0 +glow_bicubic_upscale = false +adjustment_enabled = false +adjustment_brightness = 1.0 +adjustment_contrast = 1.0 +adjustment_saturation = 1.0 + diff --git a/project/icon.png b/project/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..a0b64eee944cb4cfb2aa8dc0d8d78faf6ca44dc1 GIT binary patch literal 3498 zcmV;b4OQ}qP)% zdvH`$n!tbO-hQU@>JCZgK>`UR0Wu_jNB~7FAPOkpus*=C*qH%bc6M=ecWTDjftr2P zz(}c6<;KLdCS>sd8X;~ZVy~@fNA7?nzXd6 z&m0p2dUBUn)};@_l#%zU zRxQsJl7v3Nh+3;hl4OJsy@)fvd1Abg>Ruq(g&n?DCT3K2sKvrw@fAhuzNU{pGR*yi)T3K2s1=WEE z0c4HtR_pey(P3*)9e7XzvViZz*YDsuTeBpAhzI($!%IpqFm-$hxmo63^X3jTGj)6k zNeTTo{phe&AmaP&v!|Jom_21YlkO^FSl&Q{5GabmrqA~A!kZgImifh^N10nT5g`OY zMWN#SC3YVvXUpdYuvlCBMbDT!plE0g3+7DazO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100644 index 0000000..078624e --- /dev/null +++ b/project/icon.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cltqljwt37ib5" +path="res://.godot/imported/icon.png-487276ed1e3a0c39cad0279d744ee560.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://icon.png" +dest_files=["res://.godot/imported/icon.png-487276ed1e3a0c39cad0279d744ee560.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 diff --git a/project/project.godot b/project/project.godot new file mode 100644 index 0000000..f6343d6 --- /dev/null +++ b/project/project.godot @@ -0,0 +1,36 @@ +; 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="Godot 4.3 Starter" +run/main_scene="res://scenes/TitleScn.tscn" +config/features=PackedStringArray("4.3") + +[autoload] + +GameKit="*res://source/GameKit.gd" + +[display] + +window/size/resizable=false + +[input] + +ui_pause={ +"deadzone": 0.5, +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":4194305,"physical_keycode":0,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null) +, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":6,"pressure":0.0,"pressed":false,"script":null) +] +} + +[locale] + +translations=PackedStringArray("res://lang/local.en.translation", "res://lang/local.sv.translation") diff --git a/project/scenes/GameScn.tscn b/project/scenes/GameScn.tscn new file mode 100644 index 0000000..cd9afab --- /dev/null +++ b/project/scenes/GameScn.tscn @@ -0,0 +1,14 @@ +[gd_scene load_steps=4 format=3 uid="uid://b0fl2hf2lbd0s"] + +[ext_resource type="Script" path="res://source/GameScn.gd" id="1"] +[ext_resource type="Texture2D" uid="uid://cltqljwt37ib5" path="res://icon.png" id="2_24hj0"] +[ext_resource type="PackedScene" uid="uid://baomgr7v1oi8q" path="res://scenes/PauseScn.tscn" id="3_gdh7b"] + +[node name="GameScn" type="Node"] +script = ExtResource("1") + +[node name="Sprite2D" type="Sprite2D" parent="."] +position = Vector2(466, 192) +texture = ExtResource("2_24hj0") + +[node name="PauseScn" parent="." instance=ExtResource("3_gdh7b")] diff --git a/project/scenes/PauseScn.tscn b/project/scenes/PauseScn.tscn new file mode 100644 index 0000000..dcb8dc4 --- /dev/null +++ b/project/scenes/PauseScn.tscn @@ -0,0 +1,45 @@ +[gd_scene load_steps=2 format=3 uid="uid://baomgr7v1oi8q"] + +[ext_resource type="Script" path="res://source/PauseScn.gd" id="1"] + +[node name="PauseScn" type="Control"] +layout_mode = 3 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +script = ExtResource("1") +metadata/_edit_use_anchors_ = true + +[node name="PauseWin" type="Window" parent="."] +title = "Pause" +position = Vector2i(0, 36) +size = Vector2i(150, 150) +visible = false + +[node name="PauseVbox" type="VBoxContainer" parent="PauseWin"] +anchors_preset = 8 +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +offset_left = -111.0 +offset_top = -70.0 +offset_right = 108.0 +offset_bottom = 58.0 +grow_horizontal = 2 +grow_vertical = 2 +alignment = 1 + +[node name="ResumeBtn" type="Button" parent="PauseWin/PauseVbox"] +layout_mode = 2 +text = "Resume" + +[node name="ExitBtn" type="Button" parent="PauseWin/PauseVbox"] +layout_mode = 2 +text = "Exit" + +[connection signal="close_requested" from="PauseWin" to="." method="_on_pause_win_close_requested"] +[connection signal="pressed" from="PauseWin/PauseVbox/ResumeBtn" to="." method="_on_resume_btn_pressed"] +[connection signal="pressed" from="PauseWin/PauseVbox/ExitBtn" to="." method="_on_exit_btn_pressed"] diff --git a/project/scenes/TitleScn.tscn b/project/scenes/TitleScn.tscn new file mode 100644 index 0000000..27fb7c1 --- /dev/null +++ b/project/scenes/TitleScn.tscn @@ -0,0 +1,25 @@ +[gd_scene load_steps=2 format=3 uid="uid://dih82g5487hy7"] + +[ext_resource type="Script" path="res://source/TitleScn.gd" id="1"] + +[node name="TitleScn" type="Node"] +script = ExtResource("1") + +[node name="TitleVBox" type="VBoxContainer" parent="."] +anchors_preset = 8 +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +offset_left = -73.5 +offset_top = -23.5 +offset_right = 73.5 +offset_bottom = 23.5 +grow_horizontal = 2 +grow_vertical = 2 + +[node name="PlayBtn" type="Button" parent="TitleVBox"] +layout_mode = 2 +text = "Play" + +[connection signal="pressed" from="TitleVBox/PlayBtn" to="." method="_on_PlayBtn_pressed"] diff --git a/project/source/GameKit.gd b/project/source/GameKit.gd new file mode 100644 index 0000000..d14e111 --- /dev/null +++ b/project/source/GameKit.gd @@ -0,0 +1,15 @@ +extends Node + +const NOT_IMPLEMENTED = "This feature is not implemented" + +func is_game_paused(is_paused): + if is_paused == true: + get_tree().paused = true + else: + get_tree().paused = false + +func switch_scenes(is_mode): + if is_mode == "title": + get_tree().change_scene_to_file("res://scenes/TitleScn.tscn") + elif is_mode == "game": + get_tree().change_scene_to_file("res://scenes/GameScn.tscn") diff --git a/project/source/GameScn.gd b/project/source/GameScn.gd new file mode 100644 index 0000000..3a1e899 --- /dev/null +++ b/project/source/GameScn.gd @@ -0,0 +1,7 @@ +extends Node + +func _process(delta): + if Input.is_action_pressed("ui_pause"): + GameKit.is_game_paused(true) + $PauseScn/PauseWin.move_to_center(); + $PauseScn/PauseWin.show() diff --git a/project/source/PauseScn.gd b/project/source/PauseScn.gd new file mode 100644 index 0000000..eaaf0ee --- /dev/null +++ b/project/source/PauseScn.gd @@ -0,0 +1,15 @@ +extends Control + +func _resume_game() -> void: + $PauseWin.hide() + GameKit.is_game_paused(false) + +func _on_resume_btn_pressed() -> void: + _resume_game() + +func _on_exit_btn_pressed() -> void: + GameKit.is_game_paused(false) + GameKit.switch_scenes("title") + +func _on_pause_win_close_requested() -> void: + _resume_game() diff --git a/project/source/TitleScn.gd b/project/source/TitleScn.gd new file mode 100644 index 0000000..e8ae56a --- /dev/null +++ b/project/source/TitleScn.gd @@ -0,0 +1,4 @@ +extends Node + +func _on_PlayBtn_pressed(): + GameKit.switch_scenes("game")