Add README, bundle phaser.min.js, fix asset paths to be self-contained

This commit is contained in:
grovedruid
2026-07-04 17:52:45 +02:00
parent 5fff58884f
commit 3e6c496d62
3 changed files with 81 additions and 1 deletions
+79
View File
@@ -0,0 +1,79 @@
# FSYS Agent — Platformer
Help the Collector from Australia collect cards from the clouds in Kenya!
Jump and run through procedurally generated cloud platforms, collect scattered cards, and survive the deadly spikes.
## Play
<https://jr.fsysgame.org>
## Tech Stack
- **Phaser 3** — HTML5 game framework (renderer: Canvas/WebGL)
- **Vanilla JS** — no bundler, no framework, no transpiler; plain ES5-style JS loaded via `<script>` tags
- **DOM Touch Events** — multi-touch joystick + jump for mobile controls (native `TouchEvent` API)
- **CSS Orientation Lock** — rotate-to-landscape overlay with `@media (orientation: portrait) and (pointer: coarse)`
- **No build step** — open `index.html` in a browser or serve any static file server
## Features
- Procedural cloud platform generation with difficulty scaling
- 60 unique cards to collect, each with custom thumbnail art
- Double jump with particle burst effect
- 360° analog joystick (left side) + tap-to-jump (right side) for mobile
- Keyboard support: arrow keys / WASD + Space / Up
- Automatic landscape rotation prompt on mobile
- Fullscreen button on touch devices (auto-fullscreen on first tap)
- Social preview cards (Open Graph / Twitter Card)
## Structure
```
index.html — game entry point
phaser.min.js — Phaser 3 library
preview.png — social preview image (1728×1080)
src/
main.js — Phaser config & game init
scenes/
Boot.js — boot / splash scene
Preloader.js — asset loading with progress bar
TitleScreen.js — title screen
Game.js — main gameplay scene
GameOver.js — game over screen
public/
images/
cloud.png
jump_pad.png
fsys_platform_bg.png
cards/thumbs/ — 60 card thumbnails (56×76)
assets/
sprites/ — player & environment sprites
tiles/ — platform/obstacle tiles
sounds/ — sound effects (OGG)
```
## Controls
| Input | Action |
|-----------|---------------------|
| Arrow/WASD | Move left/right |
| Space / Up | Jump (double jump) |
| Left stick | Move (mobile) |
| Right tap | Jump (mobile) |
## Development
Serve the `game/` directory with any static file server:
```bash
python3 -m http.server 8080
# or
npx serve .
```
No build step, no npm install, no config needed.
## License
FSYS Game — Alliance of Bioversity International and CIAT / CGIAR
+1 -1
View File
@@ -30,7 +30,7 @@
#game-container { display: none; }
}
</style>
<script src="../example/phaser.min.js"></script>
<script src="phaser.min.js"></script>
</head>
<body>
<div id="rotate-warning">
+1
View File
File diff suppressed because one or more lines are too long