image

2D Metaverse – Immersive Browser-Based Virtual World

Overview

The 2D Metaverse is an immersive virtual environment accessible directly via web browsers. It blends real-time communication, avatar-driven exploration, and spatial collaboration into one seamless experience. Designed to feel like a "virtual office" or "hangout space," users can move around rooms, talk with others via video calls, and experience a persistent shared environment.


šŸ›  Technologies Used

  • Frontend: React, Next.js, TailwindCSS, Framer Motion
  • Backend: WebSocket, Prisma, PostgreSQL
  • Dev Tools: VSCode, Figma, Chrome DevTools, GitHub

šŸš€ Live Demo

šŸ”— Live Project
šŸ’» GitHub Repo


✨ Key Features

  • 🧭 Real-time avatar-based navigation on a 2D/3D interactive map
  • šŸ’¬ Personalized virtual spaces with chat and proximity-based video calls
  • šŸŽ„ One-on-one and group video calls between users in real-time
  • šŸ—ļø Modular scene architecture that supports dynamic content injection
  • šŸ•¹ļø Realtime state tracking for user position and interaction
  • šŸ” Reusable component design for efficient expansion and scene creation

šŸ–¼ļø Visuals








🧩 Project Architecture

šŸ–„ Frontend

  • Built using Next.js and React for fast rendering and SPA-like behavior
  • Integrated with Framer Motion for smooth avatar and environment animations
  • Responsive layout with TailwindCSS

šŸ”Œ Backend

  • Real-time interactions powered by WebSocket
  • User and session management handled with PostgreSQL + Prisma
  • Video/audio communication via WebRTC integration (peer-to-peer)

🧠 Challenges Tackled

  • 🧮 Optimizing performance for complex interactive maps with many avatars
  • šŸ”„ Synchronizing movement and real-time interaction for all users
  • šŸ“ž Implementing WebRTC in a modular avatar-driven environment
  • 🧰 Maintaining responsiveness for both desktop and mobile layouts
  • 🌐 Cross-browser compatibility across Chrome, Safari, and Firefox

ā³ Project Duration

šŸ“… Feb 2024 – Apr 2024
šŸ‘Øā€šŸ’» Role: Full Stack Developer


šŸ’” Learning Outcomes

  • Building real-time collaborative environments with WebSocket
  • Managing distributed UI states across users in shared virtual spaces
  • Implementing dynamic video/audio calling logic into React
  • Designing flexible backend schemas with Prisma + PostgreSQL

šŸ“‚ Folder Structure (Simplified)

2d-metaverse/
ā”œā”€ā”€ components/       # Reusable UI components (Avatar, Map, Controls)
ā”œā”€ā”€ pages/            # Next.js routes and views
ā”œā”€ā”€ public/           # Static assets and map images
ā”œā”€ā”€ lib/              # WebSocket and video call logic
ā”œā”€ā”€ prisma/           # DB schema and queries
ā”œā”€ā”€ styles/           # Tailwind and global styles
└── utils/            # Helpers for avatar logic, media, and map data

Built with love by Sameer Rao