Skip to content
/ mario Public
forked from reruns/mario

A javascript clone of Super Mario Bros. for the NES

License

Notifications You must be signed in to change notification settings

swilcox3/mario

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

92 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Let's hack Mario!

This is forked from https://github.com/reruns/mario, who did all the hard work of actually emulating Mario in Javascript. I've made some minor modifications to make it easier to tweak the code and play with the values.

Setup

  • Click the Green "Code" button at the top right, select "Download ZIP".
  • Drag the downloaded .zip into your Documents folder and extract it.
  • OPTIONAL: Install Visual Studio Code. This will get you a nice code editor that'll make things easier for you. If you're on a Chromebook, you probably can't do this.

Run the game

Double click on index.html in your mario folder you extracted earlier. A browser tab will pop up, and you'll be playing Mario in your web browser!

Hack it

  • OPTIONAL: If you installed Visual Studio Code, start it up, click File->Open Folder..., then select the mario folder.
  • Open js/constants.js. Change the values of the variables in there, then refresh the Mario page in your browser. Mario will start at the beginning of the level, with new characteristics depending on what you changed.

I just see a blue square! What do I do?

This means you typed something wrong. Open up the console to see what the error is (Press Shift + Ctrl + J in Chrome). If you don't know how to open the console, Google "Developer console for [your browser]" to find instructions to open it. Remember, real programmers Google everything.
The error will show up in red. If you don't know what the mistake you made was, Google the error! Go look at the file you edited last.

How does the game work?

If you're looking to actually start understanding what the game is doing, start with js/game.js. That's the file that initializes the game and starts the game loop. Good luck!

About

A javascript clone of Super Mario Bros. for the NES

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 96.8%
  • HTML 2.8%
  • CSS 0.4%