A modern, extensible web platform for hosting and playing both 2D and 3D games built with Next.js, React, and TypeScript.
- Responsive Design: Works on desktop and mobile devices
- Game Library: Browse and search available games
- Multiple Game Types: Support for both 2D and 3D games
- Expandable Architecture: Easily add new games to the platform
- Modern Tech Stack: Next.js, React, TypeScript, Three.js, and more
The platform currently includes two demo games:
- 3D Cube Runner: A 3D game built with Three.js and React Three Fiber
- 2D Platformer: A classic platformer built with Canvas API
- Next.js: React framework for server-side rendering
- TypeScript: Type-safe JavaScript
- Tailwind CSS: Utility-first CSS framework
- Three.js: 3D graphics library
- React Three Fiber: React renderer for Three.js
- Zustand: Lightweight state management
- Node.js 18.0.0 or later
- npm or yarn
-
Clone the repository
git clone https://github.com/yourusername/games-platform.git cd games-platform
-
Install dependencies
npm install # or yarn install
-
Run the development server
npm run dev # or yarn dev
-
Open http://localhost:3000 in your browser
To add a new game to the platform:
- Create a new directory in
app/games/your-game-name/
- Implement your game component in
app/games/your-game-name/YourGameComponent.tsx
- Create a page for your game in
app/games/your-game-name/page.tsx
- Add your game metadata to the game store in
app/stores/gameStore.ts
{
id: '3',
title: 'Your Game Name',
description: 'Short description of your game',
thumbnail: '/games/your-game-thumb.jpg',
path: '/games/your-game-name',
categories: ['2D', 'Puzzle'], // or whatever categories fit
isNew: true, // Optional flag to show "NEW" badge
}
This project is licensed under the MIT License - see the LICENSE file for details.