Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

README.md

Games

A comprehensive collection of game development projects demonstrating various game engines, frameworks, and platforms, built with AI-assisted development tools.

Overview

This directory contains game projects built with popular game engines (Unity, Godot, Unreal Engine) and web/desktop frameworks (Phaser.js, Pygame, LÖVE). Each project showcases game development patterns, physics systems, graphics rendering, and player interaction mechanics.

Projects

1. Web Games (web-games/)

Browser-based games using HTML5 Canvas and JavaScript game engines.

Projects:

  • snake-game - Classic snake game with Phaser.js
  • space-shooter - Top-down space shooter
  • breakout-game - Brick breaker arcade game
  • flappy-bird - Side-scrolling endless runner

Key Features:

  • HTML5 Canvas rendering
  • WebGL acceleration
  • Browser compatibility
  • Touch and keyboard controls
  • Score tracking and leaderboards
  • Sprite animations
  • Collision detection
  • Particle effects

Technologies:

  • Phaser.js - HTML5 game framework
  • PixiJS - 2D rendering engine
  • Three.js - 3D graphics library
  • Babylon.js - 3D game engine
  • Matter.js - 2D physics engine
  • Howler.js - Audio library

2. Mobile Games (mobile-games/)

Mobile games for iOS and Android platforms.

Projects:

  • Casual puzzle games
  • Endless runners
  • Match-3 games
  • Physics-based games

Key Features:

  • Touch controls and gestures
  • Accelerometer integration
  • In-app purchases
  • Advertisement integration
  • Cloud save functionality
  • Social features
  • Achievement systems
  • Leaderboards

Technologies:

  • Unity with mobile export
  • Godot mobile builds
  • React Native games
  • Flutter Flame engine

3. Desktop Games (desktop-games/)

Native desktop games for Windows, macOS, and Linux.

Projects:

  • pong-pygame - Classic Pong game with Pygame
  • snake-pygame - Snake game in Python
  • breakout-love2d - Breakout game with LÖVE
  • sokoban-electron - Puzzle game with Electron

Key Features:

  • Native performance
  • Keyboard and mouse controls
  • Gamepad support
  • Save/load game states
  • Settings configuration
  • Fullscreen mode
  • Cross-platform compatibility

Technologies:

  • Pygame - Python game library
  • LÖVE - Lua game framework
  • Electron - Cross-platform desktop apps
  • SDL - Simple DirectMedia Layer
  • MonoGame - C# game framework
  • Godot - Game engine with desktop export

4. Game Engines (game-engines/)

Professional game development using major game engines.

Projects:

  • unity-platformer-2d - 2D platformer with Unity
  • godot-dodge-game - Dodge game with Godot
  • godot-roguelike-2d - Roguelike dungeon crawler
  • unreal-fps-3d - First-person shooter with Unreal Engine

Key Features:

  • Professional-grade graphics
  • Advanced physics systems
  • Complex AI behaviors
  • Visual scripting
  • Asset management
  • Animation systems
  • Lighting and shadows
  • Post-processing effects
  • Multiplayer networking

Unity Projects

  • C# scripting
  • 2D and 3D capabilities
  • Asset store integration
  • Cross-platform deployment
  • Physics engine
  • Animation system
  • UI toolkit

Godot Projects

  • GDScript/C#/C++ support
  • Open-source engine
  • Scene system
  • Node-based architecture
  • Built-in animation
  • Shader language
  • Lightweight builds

Unreal Engine Projects

  • Blueprint visual scripting
  • C++ programming
  • Photorealistic graphics
  • Advanced materials
  • Nanite geometry
  • Lumen lighting
  • MetaHuman integration

Technology Stack

Game Engines

Unity

  • Unity Editor - Game development environment
  • C# - Primary scripting language
  • Unity Asset Store - Pre-made assets
  • Unity ML-Agents - Machine learning integration
  • Unity Netcode - Multiplayer networking
  • TextMesh Pro - Advanced text rendering
  • Cinemachine - Camera systems
  • Shader Graph - Visual shader creation

Godot

  • Godot Engine - Open-source game engine
  • GDScript - Python-like scripting
  • VisualScript - Node-based scripting
  • C#/.NET - Alternative scripting
  • C++/GDNative - Native performance
  • 2D/3D Engines - Separate optimized engines
  • Animation System - Built-in animation tools
  • Godot Shading Language - Custom shaders

Unreal Engine

  • Unreal Editor - Development environment
  • Blueprint - Visual scripting system
  • C++ - Core programming language
  • Niagara - VFX system
  • Chaos - Physics simulation
  • MetaSounds - Audio engine
  • Sequencer - Cinematic tool
  • Marketplace - Asset marketplace

Web Game Frameworks

Phaser.js

  • WebGL/Canvas - Rendering options
  • Arcade Physics - Built-in physics
  • Sprite System - 2D graphics
  • Input Management - Keyboard, mouse, touch
  • Audio - Sound and music
  • Tilemaps - Map creation
  • Animations - Sprite animations
  • Plugins - Extensible architecture

Three.js

  • WebGL - 3D graphics
  • Scene Graph - Object hierarchy
  • Materials & Shaders - Visual effects
  • Lighting - Dynamic lights
  • Cameras - Perspective/orthographic
  • Loaders - 3D model formats
  • Post-processing - Visual effects
  • VR Support - WebXR integration

Desktop Game Libraries

Pygame

  • Python - Programming language
  • SDL - Multimedia library
  • Sprite Management - 2D graphics
  • Sound Mixer - Audio playback
  • Event System - Input handling
  • Draw Module - Primitive shapes
  • Transform - Scaling, rotation
  • Surface - Image handling

LÖVE (Love2D)

  • Lua - Scripting language
  • Graphics - 2D rendering
  • Audio - Sound system
  • Physics - Box2D integration
  • Filesystem - File I/O
  • Joystick - Gamepad support
  • Particle System - Effects
  • Cross-platform - Windows, macOS, Linux

Physics Engines

  • Box2D - 2D physics
  • Bullet Physics - 3D physics
  • Matter.js - Web-based 2D physics
  • Cannon.js - Web-based 3D physics
  • PhysX - NVIDIA physics engine
  • Havok - Professional physics

Graphics & Rendering

  • OpenGL - Graphics API
  • DirectX - Microsoft graphics API
  • Vulkan - Modern graphics API
  • Metal - Apple graphics API
  • WebGL - Browser 3D graphics
  • Shader Languages - GLSL, HLSL, Cg

Getting Started

Prerequisites

For Unity

# Download Unity Hub
# https://unity.com/download

# Install Unity Editor (recommended LTS version)
# Select platforms: Windows, macOS, Android, iOS, WebGL

# Visual Studio or Rider for C# development

For Godot

# Download Godot Engine
# https://godotengine.org/download

# Extract and run (no installation needed)
# Supports Windows, macOS, Linux

# Optional: VS Code with Godot extension

For Unreal Engine

# Install Epic Games Launcher
# https://www.unrealengine.com/download

# Install Unreal Engine (latest version)
# Visual Studio with C++ development tools
# Minimum 8GB RAM, 100GB+ storage recommended

For Web Games

# Node.js (v18 or higher)
node --version

# Package manager
npm install -g pnpm

For Pygame

# Python 3.8+
python --version

# Install Pygame
pip install pygame

For LÖVE

# Download LÖVE framework
# https://love2d.org/

# Install for your platform
# Run games with: love game_directory/

Installation

Unity Project

# Open Unity Hub
# Click "Open" and select project directory
# Unity will import and compile

# Or use command line
# /path/to/Unity -projectPath /path/to/project

Godot Project

# Open Godot Engine
# Click "Import" and select project.godot file
# Project opens automatically

# Or use command line
# godot -e project.godot

Unreal Engine Project

# Right-click .uproject file
# Select "Generate Visual Studio project files"
# Open .sln file in Visual Studio
# Build and run from Visual Studio

Web Game Project

cd games/web-games/<project-name>

# Install dependencies
pnpm install

# Start development server
pnpm dev

# Build for production
pnpm build

Pygame Project

cd games/desktop-games/<project-name>

# Install requirements
pip install -r requirements.txt

# Run game
python main.py

LÖVE Project

cd games/desktop-games/<project-name>

# Run with LÖVE
love .

# Or create executable
# Package contents into .love file

Common Patterns

1. Game Loop Pattern

// JavaScript (Phaser.js)
class GameScene extends Phaser.Scene {
  create() {
    // Initialize game objects
  }

  update(time, delta) {
    // Update game state each frame
    this.handleInput();
    this.updatePhysics(delta);
    this.checkCollisions();
  }
}

2. Entity Component System

// Unity C#
public class PlayerController : MonoBehaviour {
  [SerializeField] private float speed = 5f;
  private Rigidbody2D rb;

  void Start() {
    rb = GetComponent<Rigidbody2D>();
  }

  void Update() {
    float move = Input.GetAxis("Horizontal");
    rb.velocity = new Vector2(move * speed, rb.velocity.y);
  }
}

3. State Machine Pattern

# Godot GDScript
extends KinematicBody2D

enum State { IDLE, WALK, JUMP, FALL }
var current_state = State.IDLE

func _physics_process(delta):
  match current_state:
    State.IDLE:
      handle_idle()
    State.WALK:
      handle_walk()
    State.JUMP:
      handle_jump()
    State.FALL:
      handle_fall()

4. Object Pooling

# Pygame Python
class BulletPool:
  def __init__(self, size):
    self.pool = [Bullet() for _ in range(size)]
    self.available = self.pool.copy()

  def get_bullet(self):
    if self.available:
      bullet = self.available.pop()
      bullet.active = True
      return bullet
    return None

  def return_bullet(self, bullet):
    bullet.active = False
    self.available.append(bullet)

5. Collision Detection

-- LÖVE Lua
function checkCollision(a, b)
  return a.x < b.x + b.width and
         a.x + a.width > b.x and
         a.y < b.y + b.height and
         a.y + a.height > b.y
end

function love.update(dt)
  if checkCollision(player, enemy) then
    handleCollision()
  end
end

6. Scene Management

// Unity C#
using UnityEngine.SceneManagement;

public class GameManager : MonoBehaviour {
  public void LoadLevel(string sceneName) {
    SceneManager.LoadScene(sceneName);
  }

  public void RestartLevel() {
    SceneManager.LoadScene(SceneManager.GetActiveScene().name);
  }
}

7. Audio Management

// Phaser.js
class AudioManager {
  constructor(scene) {
    this.bgMusic = scene.sound.add('background', { loop: true });
    this.sfx = {
      jump: scene.sound.add('jump'),
      coin: scene.sound.add('coin'),
      hurt: scene.sound.add('hurt')
    };
  }

  playMusic() {
    this.bgMusic.play();
  }

  playSFX(name) {
    this.sfx[name].play();
  }
}

AI-Assisted Development

Recommended AI Tools

  1. GitHub Copilot

    • Game logic implementation
    • Boilerplate code generation
    • Algorithm suggestions
  2. Claude Code

    • Architecture design
    • Bug fixing
    • Performance optimization
  3. ChatGPT

    • Game design brainstorming
    • Level design ideas
    • Balancing suggestions
    • Shader code generation
  4. AI for Game Assets

    • Midjourney/DALL-E - Game art concepts
    • ElevenLabs - Voice acting
    • Suno/Udio - Game music

AI Development Workflow

  1. Concept Phase

    • AI brainstorming for game mechanics
    • Genre analysis and inspiration
    • Story and character development
  2. Design Phase

    • Level design suggestions
    • UI/UX layout ideas
    • Game balancing algorithms
  3. Development Phase

    • AI-assisted code generation
    • Physics implementation
    • AI behavior trees
  4. Polish Phase

    • Performance optimization
    • Bug identification
    • Shader effects

Best Practices

Game Design

  • Start with a clear core mechanic
  • Prototype early and iterate
  • Playtest frequently
  • Balance challenge and fun
  • Provide clear feedback to players
  • Design for your target platform

Performance

  • Optimize draw calls and batching
  • Use object pooling for frequent spawns
  • Implement level of detail (LOD)
  • Profile regularly to find bottlenecks
  • Minimize garbage collection
  • Use appropriate data structures

Code Quality

  • Follow SOLID principles
  • Use design patterns appropriately
  • Keep game loop efficient
  • Separate concerns (MVC pattern)
  • Write modular, reusable code
  • Comment complex algorithms

Asset Management

  • Organize assets in clear folder structure
  • Use appropriate texture sizes
  • Compress audio files
  • Optimize 3D models (polygon count)
  • Use texture atlases
  • Implement asset streaming

Player Experience

  • Smooth, responsive controls
  • Clear visual and audio feedback
  • Intuitive UI/UX
  • Proper difficulty curve
  • Save systems and checkpoints
  • Accessibility options

Testing

Unit Testing

# Unity
# Use Unity Test Framework
# Window > General > Test Runner

# Godot
# Use GUT (Godot Unit Testing)
# Run from editor or command line

Playtesting

  • Internal team testing
  • Alpha/beta testing
  • User feedback collection
  • Analytics integration
  • Bug tracking systems
  • Performance metrics

Publishing

Web Games

# Phaser.js - Deploy to web hosting
pnpm build
# Upload dist/ to hosting service

# itch.io, Newgrounds, Kongregate

Desktop Games

# Unity - Build executables
# File > Build Settings > Build

# Godot - Export project
# Project > Export > Add Preset

# Steam, itch.io, GOG

Mobile Games

# Unity/Godot - Build for mobile
# Configure for iOS/Android

# App Store / Google Play

Contributing

Contributions are welcome! Please see the main CONTRIBUTING.md for guidelines.

Adding a New Game

  1. Choose appropriate directory (web/mobile/desktop/engine)
  2. Implement core game loop
  3. Add comprehensive README with controls and instructions
  4. Include assets or asset sources
  5. Write tests if applicable
  6. Update this README

Resources

Documentation

Learning Resources

Assets & Tools

Communities

License

All projects in this directory are licensed under the MIT License - see the LICENSE file for details.

Asset licenses may vary - check individual project READMEs for details.

Related Directories


Note: All projects are for educational and demonstration purposes. Some games may use third-party assets - always check licensing before commercial use.

Last updated: 2025-12-31