Skip to content

DimiTech/retro-2d-game-engine

Repository files navigation

Retro 2D Game Engine (in TypeScript)

Engine design philosophy:

1. Use Integer values for rendering on the screen

In order to retain the pixelated, retro look - the engine forces working with Integers when calculating the data necessary for rendering.

2. Important features & debug information can be toggled in config.json

Live demo:

https://dimitech.io/retro-2d-game-engine-demo/

Run it locally:

1. Step

Run:

make

2. Step

Serve the root directory and open index.html in your browser

make serve

Check for TypeScript validity:

TS compilation should run without errors:

npx tsc -p tsconfig.json

Color palette:

(Heretic) https://zdoom.org/wiki/Palette

Attribution:

Sound FX

Graphics

Controls

Keyboard

W, A, S, D - movement Mouse/Trackpad - Aiming / Shooting

Gamepad

NOTICE: Keyboard/Mouse will not work while using a Gamepad. Unplug the gamepad in order to keep using the Keyboard/Mouse.

Left analog stick - Movement Right analog stick - Aiming R1 - Shoot

Inspired by Red Faction 2 controls.

Game State Machine

Overview of game states and possible transitions:

                     -------------
                   /               \
                  / ----------      Paused
                 v v           \   /
Loading ---> Main Menu ---> Playing ---> Level Cleared ---> Victory
                             /  ^         /
                            v    \       /
                     Game Over     -----

About

HTML5 + TypeScript

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages