Most games on Glaze Games reach you through a publisher network. A studio builds the game, a distributor hosts it, and we frame the distributor’s copy on our page. That model is why there are tens of thousands of titles to choose from, and it works well. It also means every one of those games loads someone else’s code from someone else’s server, often with that network’s own loading screen and advert in front of it.
This month we added a different kind of game: five open-source titles that we host ourselves, from our own servers, with no third-party loader in front of them. This post is about those five — what each one is, who made it, and what “open source” actually lets us do with it.
#What “open source” means for a game
An open-source game is one whose author has published the full source code under a licence that lets other people use, copy and share it. The licence is the important part. Code on a public website is not automatically free to reuse; without a licence, the author keeps every right, and copying it is just copying. With one, the author has told everyone in writing what they may do.
Four of our five games use the MIT licence, one of the most permissive there is. In plain terms it says: you may use, copy, modify and distribute this software, including commercially, as long as you keep the original copyright notice and licence text with it. The fifth, Astray, goes further: its author released it into the public domain with the Unlicense, which asks for nothing at all.
We keep the conditions anyway, and then some. Each game’s folder on our server holds the author’s original licence file, unchanged. Every game shows a small credit strip at the bottom naming the project, the author and the licence, with a link to the original repository. And the game page itself carries the author’s name with a link to their code. A licence that asks for attribution is the floor; making sure you can actually see who wrote the thing you are enjoying is the point.
#Why we host these ourselves
Self-hosting changes three things you can feel. First, speed: the game is served from the same place as the page around it, so there is no extra connection to a distributor and no network loading screen to sit through. Second, no pre-roll: publisher networks often put their own advert in front of a game before it starts, and a self-hosted game has no one else’s advert to show. Third, reliability: when a game lives on our servers, it cannot disappear because a distributor reorganised its catalogue or changed an embed address, which happens more often than you would think.
We wrote more about how we think about adverts and games in why we don’t put ads inside games. The short version is that the game itself should be the thing that loads first.
#The five games
#Alien Invaders — by Dave Kerr
Alien Invaders is a fixed-screen arcade shooter. A formation of aliens marches from side to side, stepping down every time it reaches an edge, and you slide a cannon along the bottom picking them off. Each level brings the formation back faster, with more bombs falling, and the fewer aliens remain the quicker the survivors move. It is the oldest idea in arcade games and it still works because the pressure builds without you noticing.
Dave Kerr wrote it as a small, readable JavaScript project, and it plays with the keyboard or by touch: drag to move and tap to fire on a phone or tablet. It is MIT licensed.
#Asteroid Belt — by Doug McInnes
Asteroid Belt is a vector-style space shooter. Your ship floats in a field of drifting rocks, and you rotate, thrust and fire to break each asteroid into smaller, faster fragments. The screen wraps at the edges and your ship keeps its momentum, so the real skill is short bursts of thrust followed by patience, not holding the key down. We render it as white vector lines on black, the look this style of game is known for.
Doug McInnes published it in 2010, early in the life of the HTML5 canvas, and it still reads as a clear, compact example of how a browser game is put together. It needs a keyboard and is MIT licensed.
#Astray — by Rye Terrell
Astray is a 3D maze. You roll a heavy metal ball through a brick labyrinth lit from above, and because the ball runs on a real physics engine it carries momentum around corners and bounces off walls. Find the exit and the next maze is bigger. There is no timer and no enemy, which makes it one of the calmest games on the site: a good five-minute break rather than a test of reflexes.
Rye Terrell built it with Three.js for the graphics and Box2D for the physics, and released it into the public domain. It needs a keyboard; the arrow keys roll the ball, and so do H, J, K and L if your hands already live there.
#Block Drop — by Jake Gordon
Block Drop is the falling-block puzzle stripped to its essentials: shapes made of four squares fall into a narrow well, you slide and rotate them into place, and every row you complete disappears. The next piece is always shown, and the game speeds up as you clear rows. It ends when the stack reaches the top.
Jake Gordon wrote it as a teaching example: the whole game is a single, well-commented page that you can read from top to bottom. If you want to get better at it, we wrote up the habits that keep you alive longer in falling-block puzzles. It needs a keyboard and is MIT licensed.
#Four in a Row — by Bryan Braun
Four in a Row is the two-player strategy game for one screen. You take turns dropping discs into seven columns, each disc falls to the lowest free space, and the first player to line up four of their own in any direction wins. There is no computer opponent, deliberately: it is a game for two people sharing a laptop or passing a phone back and forth.
Bryan Braun built it to be accessible, including arrow-key navigation of the board. It works with a mouse or by tapping, and it is MIT licensed. There is more depth here than the rules suggest, which is why we wrote a full guide to winning at Four in a Row.
#What we changed, and what we did not
The licences allow modification, and we made a handful of small fixes so the games behave well inside our player. Astray loaded its textures from the wrong folder once it no longer sat at the root of a website, and its canvas could scroll sideways while you steered, so we fixed both. Asteroid Belt threw an error in modern browsers that block sound until you interact with a page, so we made that harmless. Block Drop showed a developer frame-rate meter and could hide the bottom of its well on tall screens, so we removed one and fixed the other.
Every change is marked in the code with a comment explaining why. We did not change how any game plays, and we did not rename the authors’ work to pass it off as ours. We did give some games descriptive titles rather than borrowing well-known trademarked names, because the names of famous arcade and board games belong to the companies that own them, not to the open-source projects that were inspired by them.
#Want to play more like these?
If the retro feel is what you like, the classic games category and the arcade category are the natural next stop. If you prefer slow thinking to fast reflexes, try the puzzle category or a quick round of 2048. And if you are sharing a screen with someone, our best two-player browser games has more games like Four in a Row.
We will add more open-source games as we find ones that meet the same bar: a clear licence, genuinely fun, and good enough to stand next to everything else on the site.
Frequently asked questions
- Are these open-source games really free?
- Yes. They are free to play on Glaze Games with no account and no download, and their licences — MIT for four of them, public domain for Astray — allow anyone to use and share the code, as long as the MIT copyright notice stays with it.
- Can I get the source code?
- Yes. Each game page and the credit strip inside each game link to the original repository, where the full source code is published by its author.
- Why do some of these games work only on a computer?
- Asteroid Belt, Astray and Block Drop were written for a keyboard and have no touch controls, so on a phone we show a note instead of a game you cannot control. Alien Invaders and Four in a Row work by touch.
- Do self-hosted games show adverts?
- There is no advert from a game network in front of them, because we host them ourselves. The Glaze Games page around the game may show its normal adverts, which is how the site stays free.

