elct9620 / build-game-with-react-prototype

Inspired by https://steina.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build Game with React Prototype

This project is inspired by https://steina.vercel.app which tries to build a game with React.js.

Library

  • Next.js
  • React Game Engine

Architecture

Components

To create shared property to GameObject, for example the Transform will extend x, y, width and height to allow resize or move it.

Entities

The GameObject instance, it should refactor as a Factory to generate entity.

Systems

The "React Game Engine" is based on ECS architecture, the System will control GameObject to move or trigger event.

Limitation

Currently, the scene switch based on next/router and not smooth, it may extend GameEngine component and use #swap function to replace entities with asynchronize loading assets support.

About

Inspired by https://steina.vercel.app


Languages

Language:JavaScript 81.0%Language:CSS 19.0%