Multiplayer Bomberman-style game built without Canvas or WebGL, powered by a custom framework and WebSockets.
- Mohamed El-Fihry
- Oussama Benali
- Omar Ait Benhammou
- Ibrahim El Harraq
Bomberman DOM is a real-time multiplayer browser game inspired by the classic Bomberman.
The game supports 2โ4 players connected through WebSockets, battling until only one survives.
It is built entirely using our custom framework from the mini-framework project.
No Canvas. No WebGL. No external frontend frameworks.
Performance was a core requirement:
- 60 FPS minimum
- No frame drops
- Proper
requestAnimationFrameusage - Performance measurement and optimization
bomberman-dom/
โ
โโโ backend/ โ WebSocket server (Node.js)
โโโ frontend/ โ Game client (DOM-based rendering)
โโโ mini-framework/ โ Custom framework used by the game
- 2โ4 players
- 3 lives each
- Last player alive wins
-
Fixed visible map
-
Two block types:
- ๐ฒ Indestructible walls (static)
- ๐ฆ Destructible blocks (randomly generated)
-
Safe spawn zones in the four corners
- ๐ฃ Bombs โ Increase simultaneous bombs
- ๐ฅ Flames โ Increase explosion range
- โก Speed โ Increase movement speed
-
Real-time multiplayer using WebSockets
-
Built-in chat system
-
Nickname system before joining
-
Waiting room with player counter
-
Auto-start rules:
- If 4 players join โ 10 second countdown starts
- If 2โ3 players join and 20 seconds pass โ 10 second countdown starts
requestAnimationFrameused correctly- Game loop optimized for 60 FPS
- Signals used for reactive real-time game updates
- Diffing used during login & waiting screens
- Minimal DOM updates during gameplay
- Efficient state synchronization
- Vanilla JavaScript
- Custom framework
- DOM rendering (no Canvas)
- Signals-based reactivity
- Node.js
- WebSockets (
ws)
cd backend
npm install
node app.jsOpen frontend/index.html in your browser
(or serve it using a simple local server)
Example:
cd frontend
npx serve .- Enter nickname
- Join waiting room
- Countdown starts
- Game begins
- Last survivor wins
- requestAnimationFrame
- Event loop
- FPS measurement
- Multiplayer synchronization
- WebSockets
- Performance optimization
- Real-time state management
A lightweight JavaScript framework implementing DOM abstraction, routing, state management, event handling, signals, and diffing.
- Mohamed El-Fihry
- Oussama Benali
- Omar Ait Benhammou
- Ibrahim El Harraq
This project is a custom-built JavaScript framework created from scratch.
The goal was to understand how modern frameworks work internally by implementing:
- DOM abstraction
- Routing system
- State management
- Custom event system
- Signals (reactivity)
- Diffing (Virtual DOM strategy)
No React, Vue, Angular, or external libraries were used.
The DOM is represented as JavaScript objects:
{
tag: "div",
attrs: { class: "container" },
children: []
}This allows:
- Programmatic DOM creation
- Easier manipulation
- Efficient updates via diffing
- A virtual representation of the DOM is created
- Differences are calculated
- Only changed elements are updated
- Minimizes unnecessary re-renders
Used heavily in:
- Login page
- Waiting room
- Static UI parts
Signals provide reactive state updates:
- State changes automatically update UI
- Optimized for real-time performance
- Used in the Bomberman game loop
Signals were chosen for gameplay because:
- Faster updates
- Less overhead than full diffing
- Better performance at 60 FPS
- URL synchronized with application state
- Simple client-side routing
- State preserved across pages
- Centralized global state
- Accessible across components
- Updates propagate automatically
Developers interact with events through a custom API.
Internally:
-
addEventListeneris used -
Externally:
- Clean abstraction
- Framework-controlled event system
A full TodoMVC application was built using the framework to validate:
- State handling
- Routing
- Events
- DOM updates
- Diffing behavior
All required HTML structure, IDs, and classes are present.
mini-framework/
โโโ src/
โโโ core/
โ โโโ dom.js
โ โโโ events.js
โ โโโ router.js
โ โโโ signal.js
โ โโโ state.js
โโโ mini-framework-z01.js
Include the framework script:
<script src="mini-framework-z01.js"></script>Create elements using the framework API:
createElement("div", { class: "box" }, [])Attach events:
on("click", handler)Manage state:
setState({ count: 1 })- Inversion of control
- Virtual DOM & diffing
- Signals & reactivity
- Routing
- State synchronization
- Event abstraction
- Framework architecture
Instead of just using a framework, this project focuses on understanding:
- How frameworks control application flow
- How rendering optimization works
- How reactivity is implemented internally
- How multiplayer games require efficient state updates