Skip to content

Commit

Permalink
Merge master and remove exportBehavior for test
Browse files Browse the repository at this point in the history
  • Loading branch information
JulianEgbert committed Jul 27, 2023
1 parent 53dc2bf commit 810cb3e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 34 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/build-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,12 @@ jobs:
echo "GAME_DIR=$GAME_DIR" >> $GITHUB_OUTPUT
echo "GAME_NAME=$GAME_NAME" >> $GITHUB_OUTPUT
- name: Exit Check
run: if [[ $GAME_DIR = Error:* ]]; then exit 1; fi
run: |
if [[ $GAME_DIR = Error:* ]]
then
echo "::error::$GAME_DIR"
exit 1;
fi
export-web:
needs: find_export_game
Expand Down Expand Up @@ -56,11 +61,10 @@ jobs:
- name: Godot Web Build
run: |
./scripts/export.sh $GAME_DIR
- name: Move game_info.json and thumbnail
- name: Move game_info.json and thumbnail.png
run: |
if [ -f ${GAME_DIR}/game_info.json ]; then mv ${GAME_DIR}/game_info.json build/web/game_info.json; fi
if [ -f ${GAME_DIR}/thumbnail.png ]; then mv ${GAME_DIR}/thumbnail.png build/web/thumbnail.png; fi
if [ -f ${GAME_DIR}/thumbnail.jpg ]; then mv ${GAME_DIR}/thumbnail.jpg build/web/thumbnail.jpg; fi
- name: Patch for Cross Origin Isolation and SharedArrayBuffer
run: |
mv scripts/enable-threads.js build/web/enable-threads.js
Expand Down
25 changes: 3 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -217,30 +217,11 @@ Before you can deploy your game check the following:
2. Make sure that all assets you use are inside your projects folder (e.g. `prototypes/myPrototype`).
3. Make sure that no filenames or folders have a `space` character in them.

#### game_info.json and thumbnail
#### ExportBehavior

In order to display detailed information of your game make sure to create a `game_info.json` file inside your projects folder. Your file could look like this:
To automatically export your game you have to add an `ExportBehavior` (do not rename this node!) anywhere in your game. There you can configure settings such as `title`, `description` and `authors` of the game, as well as how the `thumbnail.png` gets generated.

```json
{
"title": "My Game",
"description": "The description of my game that is displayed in the overview.",
"authors": ["Developer 1", "Developer 2"],
"thumbnailType": "png"
}
```

Also make sure to have a thumbnail in your folder that matches the `thumbnailType` you provide (currently supported are `png` and `jpg`).

For more details on the supported structure checkout the [documentation of gh-pages](https://github.com/hpi-swa-lab/godot-pronto/tree/gh-pages#readme).

### Workflow

You have to run the [Build & Deploy Game](https://github.com/hpi-swa-lab/godot-pronto/actions/workflows/build-deploy.yml) Action manually. As the branch to "use the workflow from" you select your branch that you developed on and that you prepared in the step above.

In the next line you have to provide the name of the folder that your project is in (e.g. `myPrototype`). In the second line you can specify another path to this folder in case you didn't create your project inside the `prototypes` folder.

Check if the workflow runs with any issues. If everything went well it should push your game to the `gh-pages` branch. This automatically triggers another workflow to rebuild the page. Wait until this workflow has completed before going to the next step.
If you then commit your game it will automatically trigger the workflow and deploy your game. If everything went well it should push your game to the `gh-pages` branch. This automatically triggers another workflow to rebuild the page. Wait until this workflow has completed before going to the next step.

### Testing

Expand Down
10 changes: 1 addition & 9 deletions prototypes/i6w1-jf-geometry-dash/level.tscn
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[gd_scene load_steps=140 format=3 uid="uid://dgtvy2gh8t7ox"]
[gd_scene load_steps=139 format=3 uid="uid://dgtvy2gh8t7ox"]

[ext_resource type="Script" path="res://addons/pronto/behaviors/PlaceholderBehavior.gd" id="1_k1a43"]
[ext_resource type="Script" path="res://addons/pronto/behaviors/CameraShakeBehavior.gd" id="1_l4f51"]
Expand Down Expand Up @@ -33,7 +33,6 @@
[ext_resource type="Texture2D" uid="uid://dljsmxh5c8f4e" path="res://prototypes/i6w1-jf-geometry-dash/flag.webp" id="31_beccf"]
[ext_resource type="Texture2D" uid="uid://dc2jdack2pfjd" path="res://prototypes/i6w1-jf-geometry-dash/assets/green-pipe-tileset.png" id="32_juxy7"]
[ext_resource type="Texture2D" uid="uid://2rl6ebjsk8xj" path="res://prototypes/i6w1-jf-geometry-dash/assets/base_ufo.png" id="33_oewmy"]
[ext_resource type="Script" path="res://addons/pronto/behaviors/ExportBehavior.gd" id="34_la0q0"]

[sub_resource type="GDScript" id="GDScript_nqhmh"]
script/source = "@tool
Expand Down Expand Up @@ -1381,11 +1380,4 @@ position = Vector2(21803, -143)
[node name="Node2D" parent="." instance=ExtResource("21_wcc3c")]
position = Vector2(23640, -128)
[node name="ExportBehavior" type="Node2D" parent="."]
script = ExtResource("34_la0q0")
title = "Geometry Dash"
authors = PackedStringArray("Finn", "Julian")
description = "A Geometry Dash clone made in Godot/Pronot."
wait_seconds = 15
[connection signal="pressed" from="Camera2D/StartButton" to="Camera2D/LevelComplete" method="_on_start_button_pressed"]

0 comments on commit 810cb3e

Please sign in to comment.