Skip to content
HTML5 + TypeScript
TypeScript Other
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
audio
graphics/spritesheets
src
.gitignore
LICENSE
Makefile
README.md
index.html
package-lock.json
package.json
tsconfig.json
tslint.json
webpack.config.js

README.md

Retro 2D Game Engine (in TypeScript)

Live demo:

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

screenshot

Run it locally:

1. Step

Run:

make

2. Step

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

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:

                    ---------------------
                  / ----------            \
                 v v           \           \
Loading ---> Main Menu ---> Playing ---> Paused
                                ^         /
                                 \       /
                                   -----
You can’t perform that action at this time.