Social Hazard is a real-time multiplayer Android party game built with Java and XML, backed by a self-hosted Java server running on a VPS. The project focuses on polished mobile UX, room-code multiplayer, and fast WebSocket-based game state sync.
Social Hazard is designed as a full-stack multiplayer game project rather than a UI-only prototype. Players create or join private rooms, sync live match state over WebSockets, and move through a server-authoritative multiplayer flow from lobby to gameplay to results. The app uses original branding, original content, and a polished dark interface for live play.
- Real-time multiplayer with short room codes
- WebSocket-based live state sync between Android client and Java backend
- Server-authoritative room, round, and score flow
- Create room, join room, ready-up, start match, and leave room flows
- Reconnect-aware session handling
- Hidden solo demo mode for screenshots and offline preview
- Original branding and original game content
- Polished dark UI built with Java fragments and XML layouts
- Android app: Java
- UI: XML layouts, Material components, ViewBinding
- Architecture: ViewModel, LiveData, repository-based screen state flow
- Networking: OkHttp WebSocket client
- Backend: Java
- Deployment: self-hosted VPS
The project is split into two main parts:
app/: Android clientserver/: Java backend
On the Android side, fragments handle UI, view models own screen state, and the repository coordinates multiplayer events, local persistence, demo mode, and socket updates. On the backend side, the server owns room lifecycle, match progression, and synchronized multiplayer state, then pushes updates back to clients over WebSockets.
- A player creates a room or joins an existing room using a room code.
- The Android app connects to the backend and establishes the player session.
- The backend manages lobby state, ready status, and match start conditions.
- Once the game starts, gameplay state is synchronized in real time over WebSockets.
- The backend remains authoritative for rounds, judging, scoring, and results.
- Clients react to live updates and render the current match state.
Place screenshots here once ready:
- Install and run on an emulator or Android device.
- Start playing
The backend is self-hosted on a VPS and serves as the authoritative multiplayer server. It handles room creation, player sessions, live game progression, and WebSocket synchronization. In production, the backend is deployed behind a public domain and exposed through secure WebSocket and HTTP endpoints.
- Persistent storage for rooms, sessions, and match history
- Player accounts and identity management
- Match analytics and admin tooling
- Expanded content packs and game modes
- Improved reconnect recovery and fault tolerance
- Play Store-ready release pipeline
I built this mainly now to distribute the game around my university and play along with my friends. Not just a boring game but something with indeliable twists, funny and something worth bonding over friends with. I wanted a real multiplayer product, not just a local demo or game that runs locally so I made in online by running the backend through my VPS I also was figuring out how to make real use of my website and it seems the best way is by marketing my game and this product there
getting live multiplayer sync working reliably(turns out it is not as easy as I thought, getting it to reliably work took the soul out of me) wiring WebSocket backend and deployment turning separate pieces into one downloadable product
deployment matters as much as coding presentation changes how a project is perceived backend/API consistency and release packaging were way harder than I expect





