How vuonggiakayn98/bangbang_offline works
BangBang HTML5 is a locally hosted tank-combat game with a browser client, Python server, and SQLite persistence. The main path is player login and lobby selection, room/mode entry, server-simulated combat, then browser presentation and saved progress. Separate branches cover PvE and competitive modes, accounts and inventory, and the local web-buff tool. The README documents the play and buff workflows; edges from sampled source are limited to relationships shown by excerpts or the source index.
Main entry points: sixcube_server.py Game sockets · battle_runtime.py Battle runtime · app.js Game UI · app.py HTTP server
Components 19
Browser game
- Game UI
www/html5/app.js - Battle view
www/html5/battle_view.js - Game connection
www/html5/m81337_connection.js
Game server
- HTTP server
server/app.py - Game sockets
server/sixcube_server.py
Combat runtime
- Battle entry
server/battle_entry.py - Battle runtime
server/battle_runtime.py - Combat rules
server/base_mode.py - Combat geometry
server/combat_geometry.py - Bot strategy
server/bot_ai.py - Mode rules
server/occupy_rules.py - PvE modes
server/pve_catalog.py
Accounts and items
- Authentication
server/auth_store.py - Characters
server/characters.py - SQLite persistence
server/storage.py
Local web buff
- Buff service
server/admin_buff.py - Buff web UI
www/admin/buff/admin.js - Account tools
www/admin/buff/accounts.js
Other components
- Player
Connections 20
- Player → Game UI: plays in
- Game UI → Game connection: creates
www/html5/app.js - Game UI → Battle view: creates
www/html5/app.js - Player → HTTP server: opens locally
- HTTP server → Game sockets: starts
server/app.py - Game connection → Game sockets: connects to
- Game sockets → Battle entry: dispatches battle entry
server/sixcube_server.py - Game sockets → Battle runtime: dispatches combat
server/sixcube_server.py - Battle entry → PvE modes: selects modes
server/battle_entry.py - Battle entry → Mode rules: uses mode rules
server/battle_entry.py - Battle runtime → Combat rules: uses
server/battle_runtime.py - Battle runtime → Combat geometry: uses
server/battle_runtime.py - Battle runtime → Bot strategy: updates bots
server/battle_runtime.py - Game sockets → Authentication: uses login
server/sixcube_server.py - Authentication → SQLite persistence: reads and writes
server/auth_store.py - Characters → SQLite persistence: persists character data
server/characters.py - HTTP server → Buff service: routes requests
server/app.py - Player → Buff web UI: manages locally
- Buff web UI → Account tools: uses account tools
- Buff web UI → Buff service: sends items by mail