Browser games do not have to be a throwaway time-waster. A good one teaches you something about physics, probability, pathfinding or game feel, and you can play it in two seconds with no download. This post is five of our own games that we built or polished recently, and the first one has just had its biggest update yet.
Every game below is a live, playable embed you can try right here in the article. Each is plain HTML, CSS and JavaScript on one canvas, with no engine and no image files, so you can read it, copy it, share it, or extend it into your own version. There is a section at the end on exactly how to do that.
A tip for the embeds: click inside a game once so it gets keyboard focus, then play. On a phone, the games use touch controls and the page will not scroll while your finger is on the playfield.
1. Pocket Artillery: our flagship tank duel, now with 22 weapons

Two tanks, a hill between them, and a guess at angle and power. Pocket Artillery is a reimagined game, inspired by the classic Pocket Tanks, rebuilt from scratch with its own look, its own weapons and its own code. Drag back on the field like a slingshot to aim, pick a weapon, and fire. Play Pocket Artillery on its own page.
What is new in this update
- Ten shots each and 22 weapons. Every match deals a shuffled hand of ten from the pool, and each weapon can be fired once, so choosing what to skip is gone and every pick matters.
- Weapons that are fun to throw. A Firework that bursts into ten coloured sparks, Popcorn that pops four times along the ground, a Mole that burrows towards the enemy, a Snowball that grows as it rolls, a Black Hole that swallows a crater, and a Boomerang that curves back. Every weapon has its own drawn sprite and icon.
- Blasts that match the weapon. Fireballs with embers, shockwave rings and a white flash for the Mini Nuke, radial lightning for the Zapper, rainbow streaks for fireworks and ice spikes for the Snowball.
- Choose your weapons. On the start menu pick Random weapons, or open the picker and choose up to ten. Both tanks get the same hand.
- Choose your terrain. Meadow, Desert, Snow or Night, or Random. The Daily map stays fixed so everyone gets the same one.
- Friendly fire. A blast that reaches your own tank costs you points, and your score can go below zero. Aim carefully.
- A living sky and field. Birds on harder levels, a propeller plane you can shoot down (it crashes in a fireball and scores 100 if it lands on the enemy tank), and a deer, camel or polar bear that wanders in to watch the battle. Blasts can kill it, and it comes back later.
How it works. The ground is a single array, ground[x], holding the surface height of every pixel column. A blast lowers the columns inside a circle, a Dirt Ball raises them, and collision is just one lookup. The CPU does not cheat: on its turn it tests about 1,300 angle and power pairs through a copy of the physics, keeps the one that lands closest, then adds a human-sized error that depends on the level.
Make it yours: add a weapon by adding one entry to the POOL array (name, radius, points, colour), then give it a sprite and a blast style. Swap the tanks for your mascot, rename the weapons for a brand campaign, or add a campaign of maps with rising CPU levels.
2. Space Blaster: a Galaga-style shooter in one canvas

Alien formations fly in along curved paths, sway in place, and then break off a few at a time to dive-bomb your ship. Every fifth wave brings a mothership boss with its own attack patterns, and falling power-ups give you double shots, a spread, rapid fire or a shield. Play Space Blaster and see the code.
How it works. Each alien has a slot in a drifting formation and follows a quadratic Bézier curve from off-screen to that slot, staggered so the formation streams in. The aliens are pixel art drawn to small off-screen canvases, so there are no image files at all. Dragging a finger moves the ship and turns on auto-fire, so it plays well on a phone.
Make it yours: change the alien sprites, tune the wave table, or add a new power-up. A combo multiplier up to x4 is already there to build a scoring system on.
3. Sky Hopper: an endless climber with a real physics rule

The hopper never stops bouncing, so you only steer left and right. That makes it learnable in a second. The challenge comes from the world, which is generated as you climb: platforms get narrower, sliding ones get faster, some crumble, springs launch you high, and past about 130 metres birds and spiked orbs drift through the gaps. Play Sky Hopper.
How it works. The simulation runs on a fixed 1/60-second step, and the landing test only fires while you are falling and only when your feet were above a platform last step. That one rule is why you can jump up through platforms and still land on them coming down. The generator keeps every gap smaller than the bounce height, so the game is always winnable.
Make it yours: add a new platform type, change the gravity and bounce numbers for a floaty moon version, or re-skin the sky biomes for your brand.
4. Switchyard: flip the junctions, route the trains

Coloured trains roll out of tunnels on the left and run to the right along branching tracks. Each station on the right has a colour, and you flip the junctions so every train reaches the matching station. Three misses end the run. There are 20 levels, tunnels that hide trains, crossing tracks that can crash, and a Daily Route with a streak. Play Switchyard.
How it works. Each level is a small object of numbers, and a generator turns it into a track network by splitting the stations into a random binary tree, where every split is a junction. Tracks are Bézier curves with arc-length lookup tables, so trains move at an even speed round the bends. It is a great example of building a level from data instead of drawing it by hand.
Make it yours: add levels by adding rows to the LEVELS array, change the colours, or theme the yard as a canal system or a factory floor.
5. Mini Sudoku: a full 6×6 puzzle with a generator that checks itself

Every row, column and 3×2 box must hold the digits 1 to 6 exactly once. It is a complete game, not a demo: 24 levels in four tiers, a Daily Puzzle with a streak, three lives, pencil notes, undo, stars, and hints that explain their own logic in words. Play Mini Sudoku.
How it works. A puzzle starts from a full grid built with randomised backtracking, then digits are removed one at a time. After each removal a solver counts solutions and puts the digit back if a second one appears, so every puzzle has exactly one answer. A separate logic solver grades the difficulty.
Make it yours: change the grid size, make a kids version with pictures instead of numbers, or tune the tiers for your audience.
Copy it, share it, make it your own
These are not locked-away demos. Every game is written to be read, changed and reused, and each one has a game page with the full code.
- Play it first. Playing and embedding the games is free for everyone. Open any game page from the links above.
- Copy or export the code. The game page has the HTML, CSS and JavaScript in editable tabs, and exports to React, Vue or Angular. Code copying, exporting and forking are unlocked for supporters on Patreon ($1 a month), which also keeps every other tool and template on the site free.
- Change something small. Swap a colour, rename a weapon, edit the
LEVELSorPOOLarray, or change one number such as gravity. Then check the result in the live preview. - Add your own twist. A new weapon, a new platform type, a new level pack, or your own characters. The games are small enough to read in one sitting.
- Share it. Most games have a Share result button that makes a picture card of your score for WhatsApp, X or Facebook, and you can embed a game on your own page with the same iframe used in this post.
Want to see them all? Browse the full Games collection, or start with the flagship: Pocket Artillery. If you build your own version of any of these, I would love to see it.
Pocket Artillery is a reimagined game inspired by the classic Pocket Tanks. It is an original build with its own code, art and weapons.
Discover more from WebDevPuneet
Subscribe to get the latest posts sent to your email.




