Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,15 @@ jobs:
- uses: actions/checkout@v3
# set-up python (required for godot-gdscript-toolkit)
- name: Setup Python
uses: actions/[email protected]
uses: actions/setup-python@v4
with:
python-version: 3.12
- name: Install setuptools
run: pip3 install setuptools

# Install godot-gdscript-toolkit
- name: Install godot-gdscript-toolkit
run: pip3 install 'gdtoolkit==3.*'
run: pip3 install 'gdtoolkit==4.*'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it seems like you need to also install setuptools since python 3.12, we should pin the python version, so this doesn't happen again.

      - name: Setup Python
        uses: actions/setup-python@v4
        with:
          python-version: 3.12
      - name: Install setuptools
        run: pip3 install setuptools
      # Install godot-gdscript-toolkit
      - name: Install godot-gdscript-toolkit
        run: pip3 install 'gdtoolkit==4.*'


# lint all gd files
- name: Lint all the gd files with gdtoolkit
Expand Down
125 changes: 97 additions & 28 deletions .github/workflows/snapshot.yml
Original file line number Diff line number Diff line change
@@ -1,45 +1,114 @@
# inspired by https://github.com/abarichello/godot-ci/blob/31ec75f1ad6adeed9bb7ff5d2cd10504cad21386/.github/workflows/godot-ci.yml
name: Builds a Snapshot

on:
# Triggers the workflow on push or pull request
push:
pull_request:

env:
GODOT_VERSION: 4.1.2
EXPORT_NAME: Suffragium
PROJECT_PATH: game
# pack, debug, release
MODE: release

jobs:
build:
export-windows:
name: Windows Export
runs-on: ubuntu-latest

container:
image: barichello/godot-ci:4.1.2
steps:
- uses: actions/checkout@v2

- name: Download latest earthly
run: "sudo /bin/sh -c 'wget https://github.com/earthly/earthly/releases/latest/download/earthly-linux-amd64 -O /usr/local/bin/earthly && chmod +x /usr/local/bin/earthly'"

- name: Earthly version
run: earthly --version

- name: Run build
- name: Checkout
uses: actions/checkout@v4
- name: Setup
run: |
cd game
mv export_presets.snapshot.cfg export_presets.cfg
cd ..
earthly +build

# Publish Artifacts for download
- name: Publish Windows
uses: actions/upload-artifact@v3
mkdir -v -p ~/.local/share/godot/templates
mv /root/.local/share/godot/templates/${GODOT_VERSION}.stable ~/.local/share/godot/templates/${GODOT_VERSION}.stable
- name: Windows Build
run: |
mkdir -v -p build/windows
cd $PROJECT_PATH
godot -v --headless --export-$MODE "Windows Desktop" ../build/windows/$EXPORT_NAME.exe
- name: Upload Artifact
uses: actions/upload-artifact@v1
with:
name: windows
path: builds/windows
path: build/windows

- name: Publish Linux
uses: actions/upload-artifact@v3
export-linux:
name: Linux Export
runs-on: ubuntu-latest
container:
image: barichello/godot-ci:4.1.2
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup
run: |
mkdir -v -p ~/.local/share/godot/templates
mv /root/.local/share/godot/templates/${GODOT_VERSION}.stable ~/.local/share/godot/templates/${GODOT_VERSION}.stable
- name: Linux Build
run: |
mkdir -v -p build/linux
cd $PROJECT_PATH
godot -v --headless --export-$MODE "Linux/X11" ../build/linux/$EXPORT_NAME.x86_64
- name: Upload Artifact
uses: actions/upload-artifact@v1
with:
name: linux
path: builds/linux
path: build/linux

- name: Publish HTMl5
uses: actions/upload-artifact@v3
export-web:
name: Web Export
runs-on: ubuntu-latest
container:
image: barichello/godot-ci:4.1.2
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup
run: |
mkdir -v -p ~/.local/share/godot/templates
mv /root/.local/share/godot/templates/${GODOT_VERSION}.stable ~/.local/share/godot/templates/${GODOT_VERSION}.stable
- name: Web Build
run: |
mkdir -v -p build/web
cd $PROJECT_PATH
godot -v --headless --export-$MODE "HTML5" ../build/web/index.html
- name: Upload Artifact
uses: actions/upload-artifact@v1
with:
name: web
path: build/web
# - name: Install rsync 📚
# run: |
# apt-get update && apt-get install -y rsync
# - name: Deploy to GitHub Pages 🚀
# uses: JamesIves/github-pages-deploy-action@releases/v4
# with:
# branch: gh-pages # The branch the action should deploy to.
# folder: build/web # The folder the action should deploy.

export-mac:
name: Mac Export
runs-on: ubuntu-latest
container:
image: barichello/godot-ci:4.1.2
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup
run: |
mkdir -v -p ~/.local/share/godot/templates
mv /root/.local/share/godot/templates/${GODOT_VERSION}.stable ~/.local/share/godot/templates/${GODOT_VERSION}.stable
- name: Mac Build
run: |
mkdir -v -p build/mac
cd $PROJECT_PATH
godot -v --headless --export-$MODE "Mac OSX" ../build/mac/$EXPORT_NAME.zip
- name: Upload Artifact
uses: actions/upload-artifact@v1
with:
name: html5
path: builds/html5
name: mac
path: build/mac
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Godot-specific ignores
.import/
.godot/
export.cfg
export_presets.cfg
*.translation
Expand Down
2 changes: 1 addition & 1 deletion Earthfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
build-base:
FROM barichello/godot-ci:3.4.4
FROM barichello/godot-ci:4.1.2

WORKDIR game
COPY ./game .
Expand Down
9 changes: 4 additions & 5 deletions game/app/end_game_menu/end_game_menu.gd
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ extends CanvasLayer

var _game_config = null

onready var _main := $Control
onready var _label := $Control/CC/VC/Label
@onready var _label := $Control/CC/VC/Label


func _ready():
Expand All @@ -18,11 +17,11 @@ func _input(event: InputEvent):
return

if event.is_action_pressed("ui_cancel"):
get_tree().set_input_as_handled()
get_viewport().set_input_as_handled()
_on_ButtonMenu_pressed()
elif event.is_action_pressed("ui_accept"):
_on_ButtonRestart_pressed()
get_tree().set_input_as_handled()
get_viewport().set_input_as_handled()


func open(text, game_config):
Expand All @@ -48,4 +47,4 @@ func _on_ButtonRestart_pressed():

func _on_ButtonMenu_pressed():
close()
Utils.change_scene(GameManager.MENU_PATH)
Utils.change_scene_to_file(GameManager.MENU_PATH)
30 changes: 15 additions & 15 deletions game/app/end_game_menu/end_game_menu.tscn
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
[gd_scene load_steps=5 format=2]

[ext_resource path="res://app/style/theme_game_card.tres" type="Theme" id=1]
[ext_resource path="res://app/shader/blur.shader" type="Shader" id=2]
[ext_resource path="res://app/shader/blur.gdshader" type="Shader" id=2]
[ext_resource path="res://app/end_game_menu/end_game_menu.gd" type="Script" id=3]

[sub_resource type="ShaderMaterial" id=3]
shader = ExtResource( 2 )
shader_param/amount = 2.0

[node name="EndGameMenu" type="CanvasLayer"]
pause_mode = 2
process_mode = 3
layer = 128
script = ExtResource( 3 )

Expand All @@ -36,28 +36,28 @@ anchor_right = 1.0
anchor_bottom = 1.0

[node name="VC" type="VBoxContainer" parent="Control/CC"]
margin_left = 432.0
margin_top = 247.0
margin_right = 592.0
margin_bottom = 352.0
custom_constants/separation = 8
offset_left = 432.0
offset_top = 247.0
offset_right = 592.0
offset_bottom = 352.0
theme_override_constants/separation = 8

[node name="Label" type="Label" parent="Control/CC/VC"]
margin_right = 160.0
margin_bottom = 19.0
offset_right = 160.0
offset_bottom = 19.0
text = "T_PAUSED"
align = 1

[node name="ButtonRestart" type="Button" parent="Control/CC/VC"]
margin_top = 27.0
margin_right = 160.0
margin_bottom = 62.0
offset_top = 27.0
offset_right = 160.0
offset_bottom = 62.0
text = "T_RESTART"

[node name="ButtonMenu" type="Button" parent="Control/CC/VC"]
margin_top = 70.0
margin_right = 160.0
margin_bottom = 105.0
offset_top = 70.0
offset_right = 160.0
offset_bottom = 105.0
text = "T_BACK_TO_MENU"

[connection signal="pressed" from="Control/CC/VC/ButtonRestart" to="." method="_on_ButtonRestart_pressed"]
Expand Down
31 changes: 15 additions & 16 deletions game/app/images/alpha_pixel_1.png.import
Original file line number Diff line number Diff line change
@@ -1,35 +1,34 @@
[remap]

importer="texture"
type="StreamTexture"
path="res://.import/alpha_pixel_1.png-22cac7682bfdb021c302c5a6fb592fe1.stex"
type="CompressedTexture2D"
uid="uid://di3cpbvgy6di8"
path="res://.godot/imported/alpha_pixel_1.png-22cac7682bfdb021c302c5a6fb592fe1.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://app/images/alpha_pixel_1.png"
dest_files=[ "res://.import/alpha_pixel_1.png-22cac7682bfdb021c302c5a6fb592fe1.stex" ]
dest_files=["res://.godot/imported/alpha_pixel_1.png-22cac7682bfdb021c302c5a6fb592fe1.ctex"]

[params]

compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/hdr_compression=1
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
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/HDR_as_SRGB=false
process/invert_color=false
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
31 changes: 15 additions & 16 deletions game/app/images/cogwheel_16.png.import
Original file line number Diff line number Diff line change
@@ -1,35 +1,34 @@
[remap]

importer="texture"
type="StreamTexture"
path="res://.import/cogwheel_16.png-1a53f86a71bc0c4d5cc0e0fac3594f02.stex"
type="CompressedTexture2D"
uid="uid://hbkfur2u0e05"
path="res://.godot/imported/cogwheel_16.png-1a53f86a71bc0c4d5cc0e0fac3594f02.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://app/images/cogwheel_16.png"
dest_files=[ "res://.import/cogwheel_16.png-1a53f86a71bc0c4d5cc0e0fac3594f02.stex" ]
dest_files=["res://.godot/imported/cogwheel_16.png-1a53f86a71bc0c4d5cc0e0fac3594f02.ctex"]

[params]

compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/hdr_compression=1
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
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/HDR_as_SRGB=false
process/invert_color=false
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
Loading