Une bibliothèque pour faire des jeux réseaux sur fxCG calculators
| casio/apps | ||
| docs | ||
| fxcgNET | ||
| pc | ||
| python | ||
| .gitignore | ||
| CMakeLists.txt | ||
| LISEZMOI.md | ||
| README.md | ||
GameNet
A USB multiplayer gaming framework for Casio fx-CG50 calculators.
[Casio 1]──┐
[Casio 2]──┤ USB ┌──[PC relay A]──┐
[Casio 3]──┘ └──[PC relay B]──┴──WebSocket──▶ [Python broker]
Multiple calculators connect to one or more PCs via USB. The PC acts as timing master and game-state aggregator. An optional central Python broker enables internet/LAN play across multiple PCs.
Features
- Phase 1 — 1 Casio ↔ 1 PC over USB
- Phase 2 — N Casios ↔ 1 PC (multi-device relay)
- Phase 3 — N PCs ↔ Internet (WebSocket broker, global player IDs)
- fxcgNET library — reusable protocol + transport layer (Casio C + PC C + Python)
- GridMove — reference demo game (movement on a shared grid)
Quick Start
Prerequisites
- fxSDK + gint (Casio toolchain)
- libfxlink + libusb-1.0 (USB communication)
- CMake ≥ 3.15 + Ninja
- Python 3.9+ with
websockets(internet mode only)
See docs/INSTALL.md for full installation instructions.
Build & Run (Local Mode)
# Build PC relay
cd build-pc && ninja
# Build Casio addin
cd casio/apps/grid-move && fxsdk build-cg && fxsdk install
# Connect Casio via USB, then:
./build-pc/pc/relay-grid/gamenet-relay-grid
# Launch GridMove on the calculator → game starts
Internet Mode
# On the host machine (or VPS):
pip install websockets
python3 python/relay_gridmove.py --port 8765
# On each PC with Casios:
GAMENET_SERVER=ws://host:8765 ./build-pc/pc/relay-grid/gamenet-relay-grid
Repository Layout
fxcgNET/
├── include/fxcgNET/ ← Public headers (protocol, transport, server, bridge)
└── src/ ← Library implementations (Casio C + PC C)
casio/apps/
├── grid-move/ ← GridMove Casio addin (reference game)
└── snake/ ← Snake Battle (older demo)
pc/
└── relay-grid/ ← PC relay daemon (local + internet mode)
python/
├── fxcgnet_server.py ← WebSocket broker framework
└── relay_gridmove.py ← GridMove internet server
docs/ ← Full documentation
Documentation
| Document | Contents |
|---|---|
| docs/INSTALL.md | Prerequisites, build, installation |
| docs/architecture.md | System design and dataflow |
| docs/API.md | Complete fxcgNET API reference |
| docs/HOW_TO_USE_NIVEAU1.md | Level 1: local play (casio_app.h + server.h) |
| docs/HOW_TO_USE_INTERNET.md | Level 3: internet play (bridge.h + Python) |
| docs/NEW_GAME.md | How to create a new game |
| docs/TROUBLESHOOTING.md | Common issues |
License
See individual source files for license information.