Skip to content

A software-rendered Mode 7 demo using JavaScript and the HTML5 Canvas API

Notifications You must be signed in to change notification settings

HugoSmits86/js-mode7

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Overview

This project is a software-rendered Mode 7 demo using JavaScript and the HTML5 Canvas API. Inspired by classic 16-bit games like Super Mario Kart and F-Zero, Mode 7 was a revolutionary SNES graphics mode that simulated 3D perspective on a 2D plane. This demo replicates that effect, using mathematical transformations and trigonometry to achieve real-time floor rendering and sprite animation, complete with camera movement and rotation, all drawn directly on a canvas.

Notes

The demo renders two horizontal pixels at a time. If you wish to modify this, remember to update the can.width / 4 sections accordingly. Adjusting the horizon and scale factor allows you to change the perspective for different visual effects.

Live demo

A live demo is available at https://www.hugosmits.nl/mode7.

Assets

The texture and sprite are sourced from the intro of the SNES game Demon’s Crest. The texture has been converted into a texture array and a palette array to optimize drawing performance.

Screenshot

Screenshot of demo in action

About

A software-rendered Mode 7 demo using JavaScript and the HTML5 Canvas API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published