Skip to content

bytestrix/2DChampion

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

51 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

2D Champion Banner

๐ŸŽฎ 2D Champion

Open Source 2D Gaming Platform - Play, Compete, and Create Together!

License: GPL v3 Contributions Welcome

Welcome to 2D Champion - a community-driven platform where gamers play, compete on global leaderboards, and developers collaborate to build amazing 2D games!

๐ŸŒ Live Platform: 2d-champion.vercel.app

โœจ Features

  • ๐ŸŽฏ Play Free Games - Enjoy a growing collection of 2D games, all free and open source
  • ๐Ÿ† Global Leaderboards - Compete with players worldwide and climb the ranks
  • ๐Ÿ‘ฅ User Profiles - Track your scores, achievements, and contributions
  • ๐Ÿ”ง Open Source - All game code is public and available for contribution
  • ๐Ÿ“ฑ Responsive Design - Play on desktop, tablet, or mobile
  • ๐Ÿ” Secure Authentication - Powered by Supabase with row-level security

๐ŸŽฎ Available Games

Game Description Play Count
Highway Hero Dodge traffic and survive as long as you can! ๐Ÿš—
Pixel Python Classic snake game with a modern twist ๐Ÿ

More games coming soon! Contribute yours

๐Ÿš€ Quick Start

Play Games

  1. Visit the platform (or run locally)
  2. Browse available games
  3. Click "Play" and start gaming!
  4. Sign up to save your high scores

Run Locally

# Clone the repository
git clone https://github.com/bytestrix/2DChampion.git
cd 2DChampion

# Install dependencies for the web platform
cd web
npm install

# Set up environment variables
cp .env.example .env.local
# Edit .env.local with your Supabase credentials

# Run the development server
npm run dev

# Open http://localhost:3000

Set Up Database

  1. Create a Supabase project
  2. Run the SQL schema in the Supabase SQL Editor:
    # The schema file is located at:
    supabase/schema.sql
  3. Copy your Supabase credentials to .env.local

๐Ÿ“ Project Structure

2DChampion/
โ”œโ”€โ”€ web/                      # Next.js web application
โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”‚   โ”œโ”€โ”€ app/             # App router pages
โ”‚   โ”‚   โ”œโ”€โ”€ components/      # Reusable components
โ”‚   โ”‚   โ”œโ”€โ”€ lib/             # Supabase client & utilities
โ”‚   โ”‚   โ””โ”€โ”€ types/           # TypeScript types
โ”‚   โ””โ”€โ”€ public/              # Static assets
โ”œโ”€โ”€ games/                    # Game source files
โ”‚   โ”œโ”€โ”€ highway-hero/        # Highway Hero game
โ”‚   โ”œโ”€โ”€ pixel-python/        # Pixel Python game
โ”‚   โ””โ”€โ”€ [your-game]/         # Add your game here!
โ”œโ”€โ”€ docs/                     # Documentation site (coming soon)
โ””โ”€โ”€ supabase/                 # Database schemas & migrations
    โ””โ”€โ”€ schema.sql           # Database schema

๐Ÿ› ๏ธ Tech Stack

Frontend

  • Framework: Next.js 16 (App Router)
  • Language: TypeScript
  • Styling: Tailwind CSS + Custom CSS
  • Icons: Lucide React
  • Hosting: Vercel (recommended)

Backend

  • Database: Supabase (PostgreSQL)
  • Authentication: Supabase Auth
  • Storage: Supabase Storage (for game assets)
  • Real-time: Supabase Realtime (for leaderboards)

Games

  • Technologies: Next.js (React), Tailwind CSS, TypeScript, Supabase
  • Canvas API for game rendering
  • No heavy game frameworks - keep games lightweight!

๐Ÿค Contributing

We welcome contributions from developers of all skill levels! Here's how you can help:

Contributing a Game

Important: Contributors don't need database access! Follow this simple workflow:

  1. Propose Your Idea - Create a GitHub Issue describing your game
  2. Fork the Repository - Clone and create your game component
  3. Build Your Game - Develop in a new subfolder: games/your-game-name/YourGame.tsx
    • Use the existing game components as templates
    • Implement scoring, controls, and game logic
    • Test locally (game works without database connection)
  4. Create a PR - Submit with:
    • Game component code
    • Thumbnail image (512x512 PNG)
    • Instructions on how to play
    • Any special dependencies
  5. Maintainers Handle Backend - We'll register your game in the database and deploy

You DON'T need:

  • โŒ Supabase credentials
  • โŒ Database access
  • โŒ Deployment permissions

Maintainers will:

  • โœ… Review and test your game
  • โœ… Register it in the platform
  • โœ… Handle database setup
  • โœ… Deploy to production

See SECURITY.md for more details on the separation between contributors and maintainers.

Contributing to the Platform

  • ๐Ÿ› Report bugs
  • ๐Ÿ’ก Suggest features
  • ๐ŸŽจ Improve UI/UX
  • ๐Ÿ“– Write documentation
  • ๐Ÿงช Add tests

๐Ÿ“– Documentation

๐Ÿ”’ Security & Privacy

  • All sensitive credentials are kept in environment variables (never committed)
  • Row Level Security (RLS) protects user data
  • Supabase's anon key is safe for frontend use
  • Authentication handled securely by Supabase Auth

๐ŸŒŸ Community

  • โญ Star this repo if you like the project!
  • ๐Ÿ› Report bugs via GitHub Issues
  • ๐Ÿ’ฌ Discussions on GitHub Discussions
  • ๐Ÿ“ข Follow updates on Twitter (coming soon!)

๐Ÿ“œ License

This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.

What This Means

  • โœ… You can use this code for free
  • โœ… You can modify and distribute it
  • โœ… You can use it commercially
  • โš ๏ธ You must open source any modifications
  • โš ๏ธ You must use the same GPL-3.0 license

๐Ÿ™ Acknowledgments

๐Ÿ—บ๏ธ Roadmap

  • Core platform with authentication
  • Game listing and playing
  • Leaderboard system
  • User profiles with stats
  • Game rating and reviews`
  • Achievements and badges
  • Multi-player support
  • Game tournaments
  • Mobile app (React Native)

๐Ÿ“ง Contact

Have questions or suggestions? Reach out!


Made with ๐Ÿ’œ by the 2D Champion community

Play games. Break records. Build together. ๐ŸŽฎโœจ

About

Welcome to the 2DChampion Game Development Repository! This is a public repository where developers can contribute to the development of 2D games that will be featured on the 2DChampion website.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors