Mario Game in JavaScript

Chathurika Dhananjani
2 min readJun 18, 2021

History of Mario Game

Mario game was created by Nintendo Entertainment System(NES) in 1985.In this game mario is a character that brings you forward. Many Super Mario video games are on non-Nintendo platforms. There are twenty-one similar games and one cross-series game that may or may not be included as part of the series.

How I created

I created this mario series by JavaScript using Kaboom.js library. this is my first gaming experience in JavaScript.

https://kaboomjs.com/ website helps me to create that Game. It has kaboom environment on replit.com & it is totally free website that able to develop simple games on it. It has ability to draw the things that you hope to insert in the game as well as it provides guidelines that how to use kaboom.js to creates games fast. I invite to use that and get an amazing gaming experience on this.

I created this on visual Studio Code ide with the help of HTML & CSS.

1stly I had to link the kaboom.js to my HTML file by using following code.

<script src=”https://kaboomjs.com/lib/0.5.1/kaboom.js"></script>

After that I created another file with the extension .js. I coded in that JavaScript file.

I created Kaboom environment in my JavaScript file using following code.

kaboom({

global: true,

fullscreen:true,

scale: 1,

debug: true,

clearColor: [0, 0, 0, 1],

})

After I loaded my sprites to the project. Then I gave symbols for them and I mapped the levels by using them in an array. So that is able to create levels easily. This is a 5 leveled game series created by me. Then I explained about the functions that should in here and how to play that like instructions by coding such as what should happen when Mario collides with other. This is amazing experience. Following github link provides all the codes and images. I invite you to try this and enjoy it. No prerequired gaming knowledge & all the guidelines are provided on https://kaboomjs.com/ website.

How it look likes

screenshots of game

--

--

Chathurika Dhananjani

i'm a Software Engineering undergraduate student in University of Kelaniya. i'm trying to write best things for you as in my best