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
5 changes: 5 additions & 0 deletions .github/workflows/about.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
1.compile-games.yml
This is the automatic compilation pipeline of GitHub Actions. When someone requests a PR to the main branch, it automatically finds the modified games in games/. Compile these games across platforms only (Win x86/Linux x86/Linux ARM), then backfill the executable files to compiled-games/< game name >/ in the repository, and finally attach the "compiled" tag to the PR.

2.validate-games.yml
Check and verify the config.txt file of the game in the PR submission. If it does not meet the requirements, the merge is not allowed.
364 changes: 288 additions & 76 deletions .github/workflows/compile-games.yml

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions advanced-game-design-team/about.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Some guidance and cases on developing games using the splashkit framework are provided. We hope you can quickly get started with the framework. There are many excellent teaching cases and guidance
70 changes: 33 additions & 37 deletions compile-game.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,24 @@ if [[ $language == "C#" ]]; then
if [[ -z "$command" ]]; then
echo "No compile command found, using default"
if [[ $BINARY_NAME == "linux-arm" ]]; then
skm dotnet publish --runtime linux-arm --no-self-contained -o ./compiled/
# RID linux-arm64 = 64-bit AArch64 (Pi 3/4/5 with 64-bit OS).
# RID linux-arm = 32-bit armhf (legacy Pi); the Pi5 64-bit OS has no armhf loader.
skm dotnet publish --runtime linux-arm64 --no-self-contained -o ./compiled/
else
skm dotnet publish -o ./compiled/
fi
else
echo Appending output flag and name/loc
echo Appending output flag and name/loc
command+=" -o ./compiled/"
# If targeting ARM and the user's compile-command didn't pin a runtime,
# force linux-arm64 so we don't fall back to the host runner's RID (x86-64).
# Skipped when the user already specified --runtime, to respect their choice.
if [[ $BINARY_NAME == "linux-arm" ]] && [[ $command != *"--runtime"* ]]; then
echo "Injecting --runtime linux-arm64 --no-self-contained for ARM target"
command+=" --runtime linux-arm64 --no-self-contained"
fi
echo "Running compile command: $command"
eval $command
fi
else
#Assume C++ Language or Makefile
Expand All @@ -75,26 +86,12 @@ else
fi
fi

#Create tar Archvie of the compiled folder
mkdir published
tar -czvf published/$game_name-$BINARY_NAME.tar.gz -C compiled/ .

#Assets tar
AssetsTar=published/$game_name-assets.tar

# Create an empty Assets tar archive
tar -cvf "$AssetsTar" --files-from /dev/null

# Function to add a directory to the archive if it exists
add_directory_to_archive() {
local directory="$1"
if [ -d "$directory" ]; then
tar -rf "$AssetsTar" -C "$(dirname "$directory")" "$(basename "$directory")"
fi
}

if [ $BINARY_NAME = "win-x86" ]; then
#List of Directories that may have assets (non case senstive)
# Bundle asset directories into compiled/ BEFORE tarring, so the platform
# tarball is self-contained (binary + resources in one archive).
# Previously assets were packed into a separate <game>-assets.tar.gz that
# publish-release never picked up — end users got a binary with no resources.
if [ "$BINARY_NAME" = "win-x86" ]; then
# Windows filesystem is case-insensitive, list lowercase only
AssetsDirectories=(
"resources"
"animations"
Expand All @@ -106,7 +103,7 @@ if [ $BINARY_NAME = "win-x86" ]; then
"sounds"
)
else
#List of Directories that may have assets (case senstive)
# Linux/macOS filesystem is case-sensitive, list both cases
AssetsDirectories=(
"Resources"
"resources"
Expand All @@ -127,20 +124,19 @@ else
)
fi

bundled=()
for dir in "${AssetsDirectories[@]}"; do
add_directory_to_archive "$dir"
if [ -d "$dir" ]; then
cp -r "$dir" compiled/
bundled+=("$dir")
fi
done


# List contents of the archive
archive_contents=$(tar -tf "$AssetsTar")

# Check if the archive is empty
if [ -z "$archive_contents" ]; then
echo "No Assets Found"
rm "$AssetsTar"
else
#compress the assets tar
gzip "$AssetsTar"
echo "Archive '$AssetsTar' created with specified directories."
if [ ${#bundled[@]} -eq 0 ]; then
echo "No asset directories found to bundle"
else
echo "Bundled asset directories into compiled/: ${bundled[*]}"
fi

#Create tar archive of the compiled folder (binary + bundled assets)
mkdir published
tar -czvf published/$game_name-$BINARY_NAME.tar.gz -C compiled/ .
3 changes: 2 additions & 1 deletion games/2dRacer/config.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,5 @@ repository=https://github.com/yourname/yourgame
#executable=game.exe

# [Optional] Uncomment to include specific compile commands - if you have a specific compile command (eg. 'make', 'skm g++ *.cpp -lstd++')
#compile-command=skm g++ *.cpp
# Two demos exist (AdvancedDemo, BasicDemo); publish the AdvancedDemo project explicitly
compile-command=skm dotnet publish AdvancedDemo/_2dRacerDemo.csproj
3 changes: 2 additions & 1 deletion games/HomemadePong/config.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,5 @@ repository=https://github.com/studioant/arcade_game
#executable=pong.exe

# [Optional] Specific compile command - if you have a specific compile command (eg. 'make', 'skm g++ *.cpp') - Uncomment if required
compile-command=skm g++ *.cpp
compile-command=skm g++ *.cpp
# test trigger 8 - validate incremental + warning + size-guard after fixes
2 changes: 1 addition & 1 deletion games/Pingpong/config.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ repository=https://github.com/thoth-tech/arcade-games
#executable=game.exe

# [Optional] Uncomment to include specific compile commands - if you have a specific compile command (eg. 'make', 'skm g++ *.cpp -lstd++')
#compile-command=skm g++ *.cpp -o game
compile-command=skm g++ *.cpp
4 changes: 3 additions & 1 deletion games/Runner_Dash/config.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,6 @@ repository=https://github.com/yourname/yourgame
#executable=game.exe

# [Optional] Uncomment to include specific compile commands - if you have a specific compile command (eg. 'make', 'skm g++ *.cpp -lstd++')
#compile-command=skm g++ *.cpp
#compile-command=skm g++ *.cpp
# test trigger - bootstrap full release
# CI trigger: validate C# default-branch RID linux-arm64 fix
4 changes: 3 additions & 1 deletion games/SkySurge/config.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,6 @@ repository=https://github.com/ayanmasood/arcade-games.git
#executable=game.exe

# [Optional] Uncomment to include specific compile commands - if you have a specific compile command (eg. 'make', 'skm g++ *.cpp -lstd++')
#compile-command=skm g++ *.cpp -o game
# Disambiguate from "Sky Surge.sln" so dotnet publish picks the .csproj
compile-command=skm dotnet publish Sky_Surge.csproj
# CI trigger: validate C# eval-branch --runtime linux-arm64 injection (re-run)
3 changes: 2 additions & 1 deletion games/VentureAdventure/config.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,5 @@ repository=https://github.com/thoth-tech/arcade-games
#executable=game.exe

# [Optional] Specific compile command - if you have a specific compile command (eg. 'make', 'skm g++ *.cpp') - Uncomment if required
compile-command=skm g++ *.cpp -o game
compile-command=skm g++ *.cpp -o game
# CI trigger: validate C++ asset-bundling into platform tarball
2 changes: 1 addition & 1 deletion games/car-race/config.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ repository=https://github.com/yourname/yourgame
#executable=game.exe

# [Optional] Uncomment to include specific compile commands - if you have a specific compile command (eg. 'make', 'skm g++ *.cpp -lstd++')
#compile-command=skm g++ *.cpp -o game
compile-command=skm g++ *.cpp
1 change: 1 addition & 0 deletions scripts/about.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
A more confusing script, it specifically to CI compiled as the output of the arcade games - warehouses - games finished down, into/home/deakin/games/LaunchScripts /, All the runnable files of compile-games are placed in this directory. That is to say, the latest updates are kept here, but there is no information here indicating exactly what this path does. Is this the developer's own test script for specifying the path on their own host? It seems to have no universality in this project? This has nothing to do with the automatic update that machine aims to achieve either? In fact, games already has an excellent CI to implement automatic updates, but unfortunately, the pull logic of arcade machine doesn't match it.