Megalopolis is a free-to-play strategy empire-building browser game written in JavaScript. Players develop and maintain their settlement from initial village to a fully grown metropolis, influencing and conquering the neighbouring settlements.

There is no set goal, game is played on an infinite-round basis and there is a server component planned. The focus of the game is to manufacture and trade resources in order to raise the level of your city.


  • Over 80 types of buildings, each intertwined in the chain of production.
  • Custom climate zones, each with specific buildings.
  • Global market, player can trade goods with other settlements.
  • Army! Navy! Soldiers! Ships!
  • Fame system that allows your city to level up via trades, conquests and special buildings.
  • Prestige system that affects diplomacy.
  • Each city in the game world (AI or player) is linked via an influence system that needs to be maintained for diplomacy to work.
  • Random events that can change your diplomacy status with the other cities, give you coins or random resources.
  • Espionage, influence cities, destroy buildings, sabotage.
  • Ranking screen, where cities get ranked according to their status in the world.
  • Declare war, propose alliances and pacts, ask other settlements to join your city, propose cease fire.
  • Churches and religions.
  • Heroes, unique classes and items, attributes.
  • Server component (for now no actual data is saved externally, only in your browser’s localStorage).
  • Jailer component that assures game data integrity (no cheating).
  • Any player interaction since no data is transmitted to the server component.
  • Artificial Intelligence (AI) for computer-controlled cities.


On this server

Play Megalopolis!

On your computer


In development, Megalopolis is using several assets that are copyrighted by Bluebyte, so I cannot redistribute them with the game. In the future, the game will have a brand new set of graphics but for now those will be enough for testing. You can find a link to the said assets here (extract the contents of the file into your distribution/images/ directory).

Choose an archive file from below, download and uncompress it. Point your browser to distribution/index.html, you don’t need a game server to play.


v0.5 (January 17, 2022)

  • No major code changes, re-implemented the build pipeline with the latest gulp, removed multiple leftover files and images (GitHub repo is no longer available).
  • Renamed the directories since we're way past DOS 11.3 times and it looks more informative now.
  • The aim is for the next version to be 1.0 because the game is pretty polished as it is and is definitely playable.

Download ZIP archive, 22.3MB

Browse the source code.

v0.4 (December 21, 2020)

  • Implemented the new world map using Perlin noise and two internal maps (elevation and moisture) to create a really unique world.
  • Rewrote most of the code in ES6.
  • Battlegrounds, epic fighting ensues.
  • Tavern, heroes, items.
  • Academy and researching.
  • Settlement AI module (not implemented yet).
  • Debugging window and cheats (useful for testing).
  • Second version of the User Interface.

Not available for download anymore.

v0.3 (June 11, 2019)

  • Migrated to the new settlement background.
  • Re-licensed the code as GPLv3.
  • Church, religions and faith.
  • Embassy, espionage, spies.
  • Caravans.
  • Random world events.
  • Jailer module for game integrity checking (not implemented yet).
  • General encryption, useless for now at this stage, only save-game encryption remains.

Not available for download anymore.

v0.2 (April 30, 2017)

  • New CryptoJS dependency for future save-game encryption or server communication.
  • War system, alliances, camp, castle, shipyard, ships, armies.
  • First version of the User Interface with windows and panels.

Not available for download anymore.

v0.1 (January 20, 2017)

  • Initial release, it's more of a proof-of-concept than a real game.

Not available for download anymore.


Megalopolis is written by sizeof(cat) and released under the GPLv3.

This program is free software: you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation, either version 3 of the License, or (at your option) any later

This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with
this program. If not, see <>.



The music/track1.mp3 song is named Glandula Pinealis by Shantifax.


Click on the thumbnails for larger images.