Best Open Source HTML5 and JavaScript Games

51 Best Open Source HTML5 and JavaScript Games 2019

1K+Shares

Online games provides a great means of entertainment in your free time. But have you ever wondered how your favorite online games are created? May be you would love to develop your own games and share it with your friends and family but don’t know how to get started?

In this article I have carefully organized a list of best open source HTML5 and JavaScript games. As the source code of these games is publicly available so it allows you to get an understanding about the actual procedure behind creating such games.

The best thing about these open source HTML5 and JavaScript games is that you can easily download their source code in your computer, modify it according to your needs, run it using the web browser and even re-distribute it however you like.

PixelDefense

PixelDefense

PixelDefense is one of the most beautiful and perfectly designed example of open source HTML5 and JavaScript games. It is based on the tower defense game genre. In this game you have to place the towers in the specified places to prevent the incoming monsters from entering your homeland. You will be pleased to hear that the source code of this outstanding game is freely available for download from the Github repository. It will be a great opportunity for you to understand the mechanics of online game development if you are familiar with the basics of HTML5 and JavaScript.

Live DemoDownload


Pocket Island

Pocket Island

Pocket Island is an incredible browser based game that makes use of the flexibility provided by HTML5 and JavaScript. It has a really advanced UI design which comes with an attractive storyline. The game revolves around a wish list of king which consists of several tasks, you have to fulfill his wishes in order to win the game.

Live DemoDownload


2048

2048

2048 is a clone of popular Play Store game 1024. Its source code is written in HTML5, CSS3 and JavaScript. If you are familiar with these languages then I would suggest you to contribute in this stunning game and display your skills to the whole world. This game is licensed under the well-known MIT License.

Live DemoDownload


HexGL

HexGL

HexGL stands out from the rest of open source HTML5 and JavaScript games when it comes to the cutting edge graphics for the game design. This futuristic racing game has an unbelievable user interface that makes it look like we are playing an offline video game on a desktop computer. It uses HTML5 and JavaScript for rendering the game environment. This open source project is developed and maintained by Thibaut Despoulain with the help of some contributors.

Live DemoDownload


Mimstris

Mimstris

Mimstris is a cool online puzzle game that you will definitely enjoy playing in your free time. In this game you have to quickly arrange the falling blocks of different shapes to fill the horizontal line similar to the video game Tetris. It is created using HTML5 and some JavaScript frameworks such as React and Redux. I bet you will fall in love with this game.

Live DemoDownload


Tower Building Game

Tower Building Game

Tower Building Game makes you feel joyful. Yes, that’s true because the game is designed in such a way that we want to play it again and again. It is similar to the award-winning Tower Bloxx Deluxe game where your task is to drop the blocks on top of each other and make your way towards the skies. Its structure is created using the new canvas element of HTML5 language while the logic is written in ES6 (an outstanding update to the JavaScript language).

Live DemoDownload


BrowserQuest

BrowserQuest

BrowserQuest is an open source massively multiplayer online game, which is an experiment conducted by Little Workshop for Mozilla. It is based on an adventure genre where your task is to explore the world. You will face several enemies on the way so stay calm and defeat them. You may even discover gifts which will help you stay strong and focus in achieving your goals. The game is built using HTML5 and JavaScript which proves the flexibility of these languages.

Live DemoDownload


mk.js

mk.js

mk.js resembles in concept with one of the most popular video game series Tekken. The fighting game comes in three types “Basic”, “Multiplayer” and “Network”. Its basic structure is created in HTML5, styling is done using CSS3 while the game logic is written in JavaScript. If you are a great fan of fighting games then you will love to read its code and I hope you will be able to write something better in future.

Live DemoDownload


3D Hartwig chess set

3D Hartwig chess set

3D Hartwig chess set is one of the most interesting example of open source HTML5 and JavaScript games. As it has one of the most appealing user interface and provides an amazing user experience. It is created using HTML5, CSS3 and JavaScript. Note that its source code is available under MIT License.

Live DemoDownload


Astray

Astray

Astray is no doubt an amazing example of best open source HTML5 and JavaScript games. This game really stands out from the rest of crowd as it showcases the ability of what WebGL can do in a web browser. It uses the Three.js and Box2dWeb libraries to create an advanced 3D user interface. The developer does not believe in the licenses and allows you to use it however you like.

Live DemoDownload


Clumsy Bird

Clumsy Bird

Clumsy Bird is a clone of “Flappy Bird” game and it makes use of the open source and lightweight HTML5 game engine MelonJS. The game works by you controlling a flying character and the mission is to successfully pass it from in-between the incoming walls without hitting them.

Live DemoDownload


Hextris

Hextris

Hextris is an awesome puzzle game that is according to its developer inspired by the famous game Tetris. The game steadily increases its pace as it progresses which makes it very addictive. It makes use of the HTML5 canvas to render the game with the help of JavaScript and style it using CSS3.

Live DemoDownload


Last Colony

Last Colony

Last Colony belongs to a real time strategy (RTS) game genre which is a unique example of open source HTML5 and JavaScript games. It comes with single player and multiplayer modes. In single player campaign mode the game has a scripted storyline where your task is to build economy and defeat your enemies. The game has a variety of buildings, aircrafts and vehicles which creates an excitement in its users. The interesting thing about this game is that it’s codebase is also written in HTML5, CSS3 and JavaScript.

Live DemoDownload


Javascript Pseudo 3D Racer

Javascript Pseudo 3D Racer

Javascript Pseudo 3D Racer is similar in concept to the OutRun video game. As the name suggests it is developed using HTML5 and JavaScript. The game evolves incrementally in 4 versions and you can even check its step by step progress through the Github repository. According to its developer the game is more suitable for modern web browsers. He also stated that the source code is not structured well as the game is only meant to demonstrate the basics of pseudo-3d racing game.

Live DemoDownload


Pacman-canvas

Pacman-canvas

Pacman-canvas is completely re-written from scratch in HTML5 and JavaScript. In Pacman-canvas you have to control a character using arrow keys on keyboard and collect the items placed in a maze while protecting yourself from enemy units. You will be promoted to the next level after you have successfully picked up all the items.

Live DemoDownload


Canvas Tetris

Canvas Tetris

Canvas Tetris is a really simple illustration of Tetris game which is written in HTML5 and JavaScript to give beginner developers a basic understanding of 2D game concepts. The developer has mentioned that he created this game in just 45 minutes. So, if you are familiar with the basics of HTML5, CSS3 and JavaScript then I would definitely suggest you to read its source code and enhance your game development skills.

Live DemoDownload


Ancient Beast

Ancient Beast

Ancient Beast is an amazing browser-based multiplayer game that utilizes the flexibility provided by HTML5 and JavaScript. This game is a strategy game based on players turns and is played online against other players. This game features a wide variety of creatures that a player can acquire as they play along and then players can put them to use in order to defeat your opponents. The version of this game available now is 0.3 which was developed using HTML and JavaScript with required socket plugins.

Live DemoDownload


OpHog

OpHog

OpHog is one of the most interesting and engaging tower defense game developed using HTML5 and JavaScript. The game lets you place defending units in order to defeat the enemy boss of each level while defending your portals. The developers have used HammerJS for touch gestures in the game and JQuery UI for the UI.

Live DemoDownload


Flexbox Froggy

Flexbox Froggy

Flexbox Froggy is the game developed. This game allows you to enter CSS styles in order to move the frog and reach the bottom where the pond is situated. The game is developed simply using HTML5, JavaScript, CSS styles and some images.

Live DemoDownload


Grid Garden

Grid Garden

Grid garden is the game similar to Flexbox Froggy and published by the same developer. Grid Garden is a game that helps players to learn about Grid CSS property. The developer makes use of animate.css and JQuery to design and develop this simple yet creative game.

Live DemoDownload


Quantum Game

Quantum Game

Quantum Game is a simple and creative browser-based puzzle game that makes use of terminologies from quantum mechanics in the game. The game contains photon sources to emit photon particles, rocks which act as an obstacle, mirror to deflect the photon particle and photon detector which receives the photon particle. The trick is to arrange the mirror in such a way that photon particle emitted from the photon source should reach the photon detector evading the rocks. This game is developed using simple HTML5 layout and JavaScript with CSS and sound plugins.

Live DemoDownload


Radius Raid

Radius Raid

Radius Raid is an amazing and engaging space-themed game developed using HTML5 animations with JavaScript. It is a shooting game where players need to shoot at relentless enemies and destroy them before the enemy ships destroy you. This game consists of different types of enemies, amazing background designs with old-fashioned sound effects, and locally stored player’s statistics which will keep the players engaged in the game for a long time.

Live DemoDownload


React Simon Says

React Simon Says

As the name says, React Simon Says is the game that was developed using React JavaScript framework with Redux functionality. This game basically contains 4 colored blocks which light up in specific order. After the blocks light up, players have to click the blocks in the same order as they light up in order to gain a point. The develop makes use of React-redux project with some CSS styled components in order to develop this simple game.

Live DemoDownload


React-2048-game

React-2048-game

React-2048-game is the complete re-implementation of an addictive mobile game named “2048” that everyone must have played. As the name suggests, this game was developed using best practices of React JavaScript framework with redux including HTML5 and JavaScript game codes. This game provides users with arrow buttons to move the number blocks. The players have to move the number blocks in such a way that it combines and adds up to other blocks in order to reach 2048 score.

Live DemoDownload


SpaceInvaders

SpaceInvaders

SpaceInvaders is an incredible space-themed shooting game developed using HTML5 and JavaScript code. This game is actually a remake of space invader phaser game. The developer makes use of Require.js in order to make the code for this game more manageable and structured using JavaScript modules.

Live DemoDownload


BreakLock

BreakLock

BreakLock is an interesting example of HTML5 game. This game is a hybrid combination of Mastermind and Android lock game making use of android pattern locks as game component. You need to connect the dots in order to match the lock pattern and win. This game makes use of Webpack and progressive web app solutions in order to provide beautiful and mind-boggling game.

Live DemoDownload


Circus Charly html5 tribute in phaser

Circus Charly html5 tribute in phaser

Circus Charly is the simple and addictive game developed using HTML5 and JavaScript as an honor to the phaser game. This game features a track with fire rings and player as a circus lion who has to jump through the fire ring and cover the considerable distance to score higher. As the level progresses, fire rings become smaller and the game animation becomes faster.

Live DemoDownload


ClashJS

ClashJS

ClashJS is an interesting and creative AI-based game build using HTML5 as an interface and JavaScript as logic. This is an AI battle game featuring fighter jets where the participants code their AI in order to make them fight. It is a great opportunity to understand how AI works with JavaScript. The game is freely available on GitHub with all the details stating the mechanics of this incredible AI game.

Live DemoDownload


Dental Defender: Saga of the Candy Horde

Dental Defender: Saga of the Candy Horde

Dental Defender is one of the most interesting HTML5 tower defense game. It is a hybrid combination of tower defense and shooting game. This game is created using HTML5 for UI, CSS3 for styling while the game logic is written in JavaScript. This game has the concept similar to tower defense a player has to defend teeth from being eaten by germs. A player can move around the teeth and shoot the germs in order to kill them. This game is very interesting and you will surely like it a lot.

Live DemoDownload


diablo-js

diablo-js

Diablo-js is one of the best HTML5 and JavaScript game that you can find and play right now. It is developed using as minimal code base as possible with html5 canvas and JavaScript. The UI and visuals in this game are incredible where HTML5 animation and JavaScript logic has been put into optimal use. The game basically revolves around a fighter who can move around the map using mouse clicks and killing the enemies which appear. This game might be your best chance to learn about HTML5 to its fullest.

Live DemoDownload


DUCK HUNT JS

DUCK HUNT JS

Duck Hunt game is a very interesting and engaging game that everyone might have played during the reign of video games. In this game, we basically shoot the ducks which fly from the grass using a joystick but in this case, we use mouse clicks to knock down the flying ducks. This game is implemented using HTML5 and JavaScript. The developer has used PixiJS as a rendering engine and Green Sock Animations for animation purpose.

Live DemoDownload


emoji-minesweeper

emoji-minesweeper

We all know about the minesweeper game that is available in windows games inventory. Well, this Emoji-minesweeper game is re-interpretation of minesweeper game using HTML5 and JavaScript. The only difference is that we place emojis as a marker to spot the bomb position instead of flags. You use left click to open a spot, right-click to mark a spot as a bomb. I am sure that this game will be as interesting as the traditional one we used to play.

Live DemoDownload


HTML5 tower defense

HTML5 tower defense

HTML5 tower defense is another interesting tower defense game which is implemented using HTML5 and JavaScript. In this game, we drag our defensive cannons to the layout map and place it in such a way that the enemies appearing from the whole doesn’t reach our hole. The game also contains statistical data that updates dynamically as the game progresses.

Live DemoDownload


Infinite Mario in HTML5 JavaScript

Infinite Mario in HTML5 JavaScript

This Infinite Mario game is a clone of original Infinite Mario, coded in JavaScript for web browsers using HTML5 for UI/UX. This game features a good example of using Canvas and Audio elements. You will be able to learn a lot about Canvas and Audio elements going through the source code of this game available freely in GitHub.

Live DemoDownload


Tap Tap Adventure

Tap Tap Adventure

Live DemoDownload


The original TETRIS game simulator

The original TETRIS game simulator

The Tetris game is an interesting and creative simulation of the original 1984 version of TETRIS game. The developer makes use of HTML5 and JavaScript to implement this game for browsers. The game is it completely text based where every frame of the game animation is rendered into a string of text with 25 rows of 80 chars.

Live DemoDownload


Tic Tac Toe

Tic Tac Toe

Tic Tac Toe is one of the most simple and addictive available out there. This game is developed using HTML5, JavaScript and CSS for some styling. The developer has made use of Google fonts to make this game more visually appealing. This game is an exact replica of tic tac toe that we play in real life using pen and paper. Here, we basically use mouse clicks to place circle and cross in the layout interface.

Live DemoDownload


TooAngel Artificial intelligence for screeps

TooAngel Artificial intelligence for screeps

TooAngel game is an incredible screeps game build incorporating Artificial Intelligence along with HTML5 and JavaScript for interface and logic. Screeps basically means “scripting creeps”. This game is an open-source sandbox game for coders, where the core mechanics is to program your units’ AI. You control your colony by writing JavaScript code. This may be a great opportunity for you to learn AI scripts using JavaScript.

Live DemoDownload


towerdefense

towerdefense

towerdefense is a simple tower defense game implemented using p5.JS. You can also make and edit custom maps using this map editor. The game code is freely available in Github along with the controls to play this game.

Live DemoDownload


Turrets

Turrets

Live DemoDownload


Typer

Typer

Live DemoDownload


Web Tower Defense

Web Tower Defense

Live DemoDownload


Alien Invasion

Alien Invasion

Live DemoDownload


Basketball GM

Basketball GM

Live DemoDownload


Canvas Tower Defense Game

Canvas Tower Defense Game

Live DemoDownload


canvas-td

canvas-td

Live DemoDownload


homemade tower defense game

homemade tower defense game

Live DemoDownload


Sleeping Beauty

Sleeping Beauty

Live DemoDownload


Space Company

Space Company

Live DemoDownload


SwiftCODE

SwiftCODE

Live DemoDownload


Tower Defense

Tower Defense

Live DemoDownload

1K+Shares

39 Replies to “51 Best Open Source HTML5 and JavaScript Games 2019”

          1. I’ve found the error in HexGL game. Below are the details of error and a quick fix.

            Note:- First of all you need to open it using localhost (e.g. XAMPP) otherwise the links of files will be broken and hence it will not work.

            Error Details:-

            1- If you see Error 500 then simply remove the .htaccess file from main folder of this game.

            2- You will see below error in your browser console:-

            Audio.js:140 Uncaught TypeError: panner.setVelocity is not a function
            at Object.bkcore.Audio.setListenerVelocity (Audio.js:140)
            at bkcore.hexgl.ShipControls.update (ShipControls.js:542)
            at Object.ctx.manager.add.components [as render] (Cityscape.js:484)
            at bkcore.threejs.RenderManager.renderCurrent (RenderManager.js:120)
            at bkcore.hexgl.HexGL.update (HexGL.js:137)
            at raf (HexGL.js:102)
            at bkcore.hexgl.HexGL.start (HexGL.js:106)
            at bkcore.threejs.Loader.onLoad [as loadCallback] (launch.js:33)
            at bkcore.threejs.Loader.updateState (Loader.js:119)
            at Loader.js:245

            This error occurs because panner.setVelocity function is removed.

            Here’s a quick fix:-

            1- Open “\bkcore\Audio.js” file in any text editor.
            2- On line number 140, you will see this code:-

            panner.setVelocity(vec.x, vec.y, vec.z);

            simply comment this line by adding double slash // before code. For example:-

            //panner.setVelocity(vec.x, vec.y, vec.z);

            Now this game will work.

          2. Mimstris game makes use of Yarn dependency manager. So you need to install it as well as you need to install Node.js because it is required for Yarn to work.

            1- Download node.js from here: https://nodejs.org/en/
            2- Download Yarn from here: https://yarnpkg.com/en/

            After that you need to get the dependencies by executing the following command in your command prompt (i.e. CMD). Note: you must run this command from the folder in which you have the game files.

            yarn install

            Now you have to build the game using below command:-

            yarn run build

            After that you can run the game by opening /dist/index.html file in your browser.

          3. Astray game is not working because the links to files are broken.

            Here’s a quick fix:-
            1- Open “index.html” file from your game folder in any text editor.
            2- Now on line number 26 to 28 you will see below code:

            ironTexture = THREE.ImageUtils.loadTexture(‘/ball.png’),
            planeTexture = THREE.ImageUtils.loadTexture(‘/concrete.png’),
            brickTexture = THREE.ImageUtils.loadTexture(‘/brick.png’),

            You just need to removed the slash that is added just before the file name from all 3 lines.

            For example:-

            ironTexture = THREE.ImageUtils.loadTexture(‘ball.png’),
            planeTexture = THREE.ImageUtils.loadTexture(‘concrete.png’),
            brickTexture = THREE.ImageUtils.loadTexture(‘brick.png’),

            Note:- You must open this game using localhost (i.e. XAMPP).

  1. Good day! This is my first visit to your blog!
    We are a group of volunteers and starting a new initiative in a
    community in the same niche. Your blog provided us beneficial information to work on. You have done a marvellous job!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.