Compare commits

...

6 Commits

4 changed files with 15 additions and 49 deletions

View File

@@ -11,6 +11,8 @@ env:
jobs:
build:
name: Build (${{ matrix.target }})
env:
VCPKG_SYSTEM_LIBRARIES: "OFF"
strategy:
fail-fast: false
matrix:
@@ -38,11 +40,19 @@ jobs:
- name: Rust Cache
uses: Swatinem/rust-cache@v2
- name: Cache vcpkg
uses: actions/cache@v4
with:
path: target/vcpkg
key: ${{ runner.os }}-vcpkg-${{ hashFiles('Cargo.toml', 'Cargo.lock') }}
restore-keys: |
${{ runner.os }}-vcpkg-
- name: Vcpkg Linux Dependencies
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y build-essential autoconf automake libtool pkg-config gettext m4 libtool libltdl-dev
sudo apt-get install -y build-essential gettext libltdl-dev
- name: Vcpkg
run: |
@@ -52,14 +62,10 @@ jobs:
- name: Build
run: cargo build --release
- name: Install Cargo Binstall
uses: cargo-bins/cargo-binstall@main
- name: Acquire Package Version
shell: bash
run: |
cargo binstall toml-cli -y --no-cleanup --maximum-resolution-timeout 25
PACKAGE_VERSION=$(toml get ./Cargo.toml package.version --raw)
PACKAGE_VERSION=$(cargo metadata --format-version 1 --no-deps | jq '.packages[0].version' -r)
echo "PACKAGE_VERSION=${PACKAGE_VERSION}" >> $GITHUB_ENV
- name: Upload Artifact
@@ -85,6 +91,7 @@ jobs:
uses: mymindstorm/setup-emsdk@v14
with:
version: 3.1.43
actions-cache-folder: "emsdk-cache"
- name: Setup Rust (WASM32 Emscripten)
uses: dtolnay/rust-toolchain@master

View File

@@ -1,7 +0,0 @@
# Building Pac-Man
## GitHub Actions Workflow
1. Build workflow produces executables & WASM files for all platforms
2. Uploaded as artifacts
3. Deployment workflow downloads artifacts and uploads to GitHub Pages

View File

@@ -41,7 +41,8 @@ rev = "2024.05.24" # release 2024.05.24 # to check for a new one, check https://
[package.metadata.vcpkg.target]
x86_64-pc-windows-msvc = { triplet = "x64-windows-static-md" }
stable-x86_64-unknown-linux-gnu = { triplet = "x86_64-unknown-linux-gnu" }
x86_64-unknown-linux-gnu = { triplet = "x64-linux" }
# x86_64-apple-darwin = { triplet = "x64-osx-release" }
[target.'cfg(target_os = "emscripten")'.dependencies]
libc = "0.2.16"

View File

@@ -1,35 +0,0 @@
# Implementation
A document detailing the implementation the project from rendering, to game logic, to build systems.
## Rendering
1. Map
- May require procedural text generation later on (cacheable?)
2. Pacman
3. Ghosts
- Requires colors
4. Items
5. Interface
- Requires fonts
## Grid System
1. How does the grid system work?
The grid is 28 x 36 (although, the map texture is 28 x 37), and each cell is 24x24 (pixels).
Many of the walls in the map texture only occupy a portion of the cell, so some items are able to render across multiple cells.
24x24 assets include pellets, the energizer, and the map itself ()
2. What constraints must be enforced on Ghosts and PacMan?
3. How do movement transitions work?
All entities store a precise position, and a direction. This position is only used for animation, rendering, and collision purposes. Otherwise, a separate 'cell position' (which is 24 times less precise, owing to the fact that it is based on the entity's position within the grid).
When an entity is transitioning between cells, movement directions are acknowledged, but won't take effect until the next cell has been entered completely.
4. Between transitions, how does collision detection work?
It appears the original implementation used cell-level detection.
I worry this may be prone to division errors. Make sure to use rounding (50% >=).