Skip to content
Projects
05 / 06 Team of 6PvP web RPG · real time

Monster Battle

A real-time PvP web RPG: both players choose at once and the server resolves the turn over WebSocket.

Real recording
0:00 / 0:00

A real local battle, uncut: two browsers fight over WebSocket. Accounts and teams are demo data; the creatures come from PokéAPI and belong to Nintendo, Game Freak and The Pokémon Company.

What it is

A PvP web RPG: build a team of 3 creatures, find a rival by ELO and fight 1 on 1 in real time, with chat, items and a leaderboard. A school project for the Secure Application Development course.

My contribution

  1. 01Real-time combat engine: both players choose at once and the server orders the turn by priority and speed.
  2. 02React battle UI with per-type visual effects.
  3. 03In-battle items and an inventory with sprites.
  4. 04JWT and Argon2 authentication, throttling and server-side validation.

Built with

  • Django 5
  • Django REST Framework
  • Django Channels
  • Daphne (ASGI)
  • WebSockets
  • MySQL 8
  • SimpleJWT
  • Argon2
  • React 19
  • TypeScript
  • Framer Motion
  • Tailwind CSS 4
  • Vite
  • uv

Gallery

  • 01Bubble is ×2 against fire: Charmander faints and Mareep comes in by forced switch
  • 02Picking a move: each one’s power and speed (#77 and #81)
  • 03The rival swapped to Gastly: it shows at once, before you choose
  • 04Super Potion as a free action: it heals without using up the turn
  • 05ELO matchmaking: the screen is mine; the queue is the team’s
  • 06Inventory with item sprites (demo quantities)
  • 07Leaderboard after the battle: GaelCB +14 and RivalUTEZ −14 (the rest is demo data)
  • 08End by surrender: the server awards the win and updates ELO