mirror of
https://github.com/Xevion/Pac-Man.git
synced 2025-12-06 01:15:42 -06:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 00c99dc05f | |||
| 1e12940445 | |||
| dc3c4a7580 | |||
| 434b62b036 |
9
.github/workflows/build.yaml
vendored
9
.github/workflows/build.yaml
vendored
@@ -11,6 +11,8 @@ env:
|
||||
jobs:
|
||||
build:
|
||||
name: Build (${{ matrix.target }})
|
||||
env:
|
||||
VCPKG_SYSTEM_LIBRARIES: "OFF"
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
@@ -52,14 +54,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 +83,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
|
||||
|
||||
7
BUILD.md
7
BUILD.md
@@ -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
|
||||
@@ -41,7 +41,7 @@ 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 = "x86_64-unknown-linux-gnu" }
|
||||
|
||||
[target.'cfg(target_os = "emscripten")'.dependencies]
|
||||
libc = "0.2.16"
|
||||
|
||||
@@ -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% >=).
|
||||
Reference in New Issue
Block a user