Skip to content

GregTheProgramator/web-game-engine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Web Game Engine 🎮

A full-featured, web-based 3D game engine with a Unity-like interface.

Features ✨

  • 3D Scene Editor - Hierarchical scene management with visual gizmos
  • Inspector Panel - Real-time component and property editing
  • Physics Engine - Built-in physics simulation with Cannon.js
  • Lighting System - Directional, point, and ambient lights
  • Asset Management - Project and asset browser
  • Console - Integrated console for debugging
  • Play/Pause/Stop - Full playback controls
  • Dark Theme UI - Professional dark interface inspired by Unity

Getting Started

Installation

npm install

Development

npm run dev

This starts the development server at http://localhost:3000

Build

npm run build

Produces optimized build in the dist/ folder.

Architecture

Core Components

  • GameEngine - Main engine controller
  • Scene - Scene management and rendering
  • GameObject - Base class for all scene objects
  • Physics - Physics simulation and raycasting
  • UIManager - UI event handling and panel management

Usage

Creating Game Objects Programmatically

import GameObject from './engine/GameObject';

const cube = new GameObject('MyCube');
cube.transform.position.set(0, 1, 0);
engine.addGameObject(cube);

Accessing the Engine

The engine and UI manager are available in the console as window.engine and window.uiManager.

// In browser console
engine.play();
engine.pause();
engine.stop();

Project Structure

src/
├── engine/          # Core engine systems
│   ├── GameEngine.ts
│   ├── GameObject.ts
│   ├── Scene.ts
│   └── Physics.ts
├── ui/              # UI management
│   └── UIManager.ts
└── styles/          # CSS styling
    └── main.css

Technologies

  • Three.js - 3D graphics rendering
  • Cannon.js - Physics simulation
  • TypeScript - Type-safe development
  • Vite - Fast build tool and dev server

Roadmap 🗺

  • Scriptable components (C#/JavaScript)
  • Advanced lighting and post-processing
  • Particle system editor
  • Terrain editor
  • Animation system
  • Prefab system
  • Project save/load functionality
  • Multiplayer support (WebSockets)
  • VR/AR support
  • Asset store integration

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors