Skip to content

Commit 3f6d4f9

Browse files
authored
Initial commit
0 parents  commit 3f6d4f9

File tree

4 files changed

+119
-0
lines changed

4 files changed

+119
-0
lines changed

.github/workflows/release.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Create release
2+
3+
on:
4+
push:
5+
tags: ["*.*.*"]
6+
7+
permissions:
8+
contents: write
9+
10+
jobs:
11+
release:
12+
name: Create release with zip of the project
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v5
18+
19+
- name: Get repository name
20+
id: repo_info
21+
run: |
22+
REPO_NAME="${GITHUB_REPOSITORY##*/}"
23+
echo "repo_name=$REPO_NAME" >> $GITHUB_OUTPUT
24+
echo "tag_name=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
25+
26+
- name: Create zip archive
27+
# Create a zip of the repository files that excludes .git, .github, and .godot directories
28+
run: |
29+
zip -r "${{ steps.repo_info.outputs.repo_name }}.zip" . \
30+
-x "*.git*" \
31+
-x ".godot/*"
32+
33+
- name: Create release and upload asset
34+
uses: softprops/action-gh-release@v2
35+
with:
36+
name: Release ${{ steps.repo_info.outputs.tag_name }}
37+
body: |
38+
To explore the demo, download the zip file below and import it in Godot.
39+
40+
Head to the GDQuest Free Library for a detailed guide to get you started with saving and loading in Godot: [Saving and loading games in Godot 4 (with resources)](https://gdquest.com/library/save_game_godot4/)
41+
draft: false
42+
prerelease: false
43+
files: ${{ steps.repo_info.outputs.repo_name }}.zip

.gitignore

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Godot 4+ specific ignores
2+
.godot/
3+
.nomedia
4+
5+
# Godot-specific ignores
6+
.import/
7+
export.cfg
8+
export_credentials.cfg
9+
*.tmp
10+
11+
# Imported translations (automatically generated from CSV files)
12+
*.translation
13+
14+
# Mono-specific ignores
15+
.mono/
16+
data_*/
17+
mono_crash.*.json

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Demo: Savegames in Godot 4
2+
3+
This project gives an example of how to save and load a game's state in Godot using resources and JSON.
4+
5+
For a detailed guide to get you started with saving and loading in Godot, check out the GDQuest Library: [Saving and loading games in Godot 4 (with resources)](https://gdquest.com/library/save_game_godot4/)

project.godot

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
; Engine configuration file.
2+
; It's best edited using the editor UI and not directly,
3+
; since the parameters that go here are not all obvious.
4+
;
5+
; Format:
6+
; [section] ; section goes between []
7+
; param=value ; assign values to parameters
8+
9+
config_version=5
10+
11+
[application]
12+
13+
config/name="GDQuest demo"
14+
config/features=PackedStringArray("4.5")
15+
config/icon="res://icon.png"
16+
17+
[display]
18+
19+
window/size/viewport_width=1920
20+
window/size/viewport_height=1080
21+
window/stretch/mode="canvas_items"
22+
window/size/fullscreen=true
23+
24+
[input]
25+
26+
click={
27+
"deadzone": 0.5,
28+
"events": [Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"button_mask":0,"position":Vector2(0, 0),"global_position":Vector2(0, 0),"factor":1.0,"button_index":1,"canceled":false,"pressed":false,"double_click":false,"script":null)
29+
]
30+
}
31+
move_left={
32+
"deadzone": 0.5,
33+
"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":65,"physical_keycode":0,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
34+
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":0,"axis_value":-1.0,"script":null)
35+
]
36+
}
37+
move_right={
38+
"deadzone": 0.5,
39+
"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":68,"physical_keycode":0,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
40+
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":0,"axis_value":1.0,"script":null)
41+
]
42+
}
43+
move_up={
44+
"deadzone": 0.5,
45+
"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":87,"physical_keycode":0,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
46+
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":1,"axis_value":-1.0,"script":null)
47+
]
48+
}
49+
move_down={
50+
"deadzone": 0.5,
51+
"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":83,"physical_keycode":0,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
52+
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":1,"axis_value":1.0,"script":null)
53+
]
54+
}

0 commit comments

Comments
 (0)