A few weeks ago, I announced that I would be stepping back from things I was doing online (Understand the Bible and The Bible Uncancelled) as I needed to focus more on the needs of my family, and in particular finding work to enable my wife to dedicate her time to home schooling. I said there:
My wife’s current contract runs until the end of the year, and we have decided that the best thing to do is for me to start looking for work over the summer so hopefully everything will work out in terms of timing. I used to work as a software developer (which I first trained in), which I think may be my best chance of getting a job, although I will explore all avenues there.
Given that I haven’t worked as a software developer in some years, I thought it would be good to work on a fairly substantial project to (a) ensure that my skills were ‘up to speed’; (b) familiarise myself with modern tools and workflows; (c) have something to put on my CV and show to a potential employer.
For a long time now I’ve had the idea that creating a Monopoly game would be a fun and interesting project to do: Monopoly is a classic game, it’s one a lot of people are familiar with — the fact that there are a bazillion versions of it still around today speaks volumes. I also have fond memories of playing it as a kid with my parents.
Also, I had confidence in the tools I had been using for Church with UTB and felt that they would be more than adequate to scale up to a larger project.
Anyway, I am pleased to say that I am now ready to unveil the fruit of my efforts. If you want to check it out right anyway you can do so via the button below; if you’d like some more information then do keep reading!
How close it it to the original?
I have tried to be faithful to the original Monopoly rules. As I was researching for the game I realised that many people unknowingly play with house rules. I did this when I was younger – we used to decide whether to buy a property or not when landing on it, and if it wasn’t bought move on. However, the official rules state that if the property is not bought, it should go to auction. These are the rules I have implemented in the game.
There are a couple of places I have knowingly deviated from the official rules:
- You cannot trade ‘Get out of Jail Free’ cards. Although the game does permit this, it seems to me that this has always been rather pointless: anyone can leave jail by paying £50 bail, which isn’t a huge amount of money relative to the rents you pay in the game. Also, being in jail in the later stages of the game can be a positive advantage – it’s actually better not to leave!
- The original game has a limited number of houses and hotels available. I appreciate this does lead to strategies e.g. buying up houses so they are not available for other people. However, I have chosen not to implement any limit on houses or hotels.
Apart from these things, the game follows the rules as closely as I was able to make it.
How to play
Playing on one screen
When you open the game you should be shown a screen like this one:

Simply choose names for the players, and check the ‘Computer’ box if you want the player to be controlled by the computer.
If you click the ‘Add Player’ button at the bottom, you can add more players up to a total of six. (In my experience, 4 is about the sweet spot for a game.)
You can choose which game board you use — i.e. British or American — and there is even an editor for you to make your own.
If you’re looking for a quicker game, check the ‘Distribute properties randomly’ box, and all properties will be distributed at random between the players.
Playing on multiple screens
If you select the ‘Network Game’ tab you will see the following screen:

The options are similar, except for the ‘connection details’ section at the bottom. Each player should have a unique ID. This can be copied and sent over to a friend who can paste that ID into the ‘connect to’ box. (If you click the ‘copy’ button, you should be able to share a URL which will fill in that field automatically. Unless you are using Firefox, where it will just copy the ID to the clipboard.)
You can have multiple people connected to one game, up to a maximum of six. If someone does reconnect, then can reload the page and then reconnect to the ID of someone who is still in the game, and the game should resume where it left off.
Limitations and Issues
There are a few limitations of the game which I am aware of:
- The game does not work well on mobile. I appreciate that the majority of web traffic these days is on mobile, and making a game which doesn’t work well on mobile is a no-no, but monopoly is a complex game and I couldn’t find a way of making the interface fit a mobile screen well. Unless you want to use a magnifying glass, it would be much better to play on a device with a bigger screen.
- I have tried to make the computer player as good as possible, to make sensible decisions and so on. However, making a decent computer player – especially for a game as complex as monopoly – is not easy, and I’m sure it could be improved.
- The network games are not as reliable as one might want them to be. I think this is mostly down to limitations in the underlying technology: peer-to-peer communication in browsers is still a relatively new technology and hopefully will mature as time goes on.
- The Board Editor doesn’t let you edit everything, i.e. you can’t change the location of the stations / utilities, you can’t change the rents, etc. I may change this in the future but I think most people want custom boards to be changing the colours and property names, rather than all the monetary values (which would be a big job!)
Technology used
The technologies the game is built on are relatively new; I don’t think that a game like this would have been possible five years ago. I chose to use:
- TypeScript / JavaScript. I like TypeScript – I’ve been using JavaScript since I was a teenager (it was actually the first programming language I learned). However, TypeScript feels like the update that JavaScript needed, even if it is occasionally frustrating.
- Web Components / Lit Framework. I have been using the Lit Framework for a couple of years now (for Church with UTB) and I really like it. It’s everything a framework should be: powerful enough to help, but unobtrusive enough for you to just get on with what you want to get on with. I also really like Web Components – it’s such a powerful idea for the web, to create reusable components which have their own logic and presentation code.
- WebRTC / PeerJS. WebRTC is a relatively new technology which enables browsers to establish peer-to-peer connections. It enables things like video calling from within a browser, although you can use it — as I have here — for more basic data connections. It’s a great technology although I have found it’s not entirely problem-free at the moment! PeerJS is a library which enables you to make use of the technology without all the boilerplate.
Check out the Code
The source code is available on GitHub.
Disclaimer
Obviously I do not own the rights to Monopoly, this game has been created as a personal challenge and project for the reasons stated above and is not intended to be marketed or sold as a professional product. It is provided on an “as-is” basis and of course I will comply with any copyright claims if that is judged to be necessary. It is licensed under the BSD License, which says:
“THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.”

Leave a Reply