PraxisMapper Cost Estimates
Running an online game can be expensive, especially a location based one that requires data covering the entire planet. One of the issues with trying to make a location-based game is that most of the expected costs are extremely opaque, hidden behind levels of demand and derivatives of actual statistics, or entirely hidden from sight. Planning on starting up a new game with cloud services feels like handing other companies blank checks and hoping they don't charge more than you have to give them. We're going to do some math here to figure out where to start on this.
The Old Competition
Google Playable Locations, which is deprecated as of this writing and terminating entirely at the end of 2022, had a pricing setup based on Total Monthly Daily Active Users. This not only required 2 definitions to be worked out, it also had 3 tiers of actual values billed to you, one of which was "Call us to find out." Finally, there was a discount pre-applied, so the first $200 of the bill was removed.
Converting their definition to actual numbers, you were charged a cent per unique user in a day until you hit 1.5 million DAU, when you started getting a 20% volume discount over that count. 1 cent per player each day. 4 active, daily players would cost you $1.20 each month. That's a whole lot easier to understand. Obfuscating costs like that is pretty terrible.
So that means that a $200.00 discount covered 20,000 people over 30 days, or an average of 666 unique users per day. Once you were spending $15,000.00 on this service for 50,000 daily players, the cost for additional players got slightly cheaper.
Also, the quiet cost was that you were tied to Google, who is known for terminating services fairly arbitrarily. That's happened here, as with so many other Google offerings. If you were a Google Playable Locations user, consider PraxisMapper as a self-hosted alternative.
PraxisMapper (on AWS)
So what about the cost of running PraxisMapper yourself? PraxisMapper scales down well, but let's start with some estimates at the global level. Processing a full set of global OSM .pbf files will result in approximately 300GB of database storage. On AWS RDS, that's $69 a month to store the geography data.
Maptiles are stored in the same database in PraxisMapper. With default settings, these average out to 3.1kb each, including metadata on them. This works out to $0.23 per month for every 322,000 map tiles for gameplay. PraxisMaper uses 8-digits PlusCode cells as map tiles, so you would need 10,368,000,000 total tiles to draw the entire world, using up slightly over 32TB of storage space for $7500 a month ($91,200 per year including the geography data). This means that running PraxisMapper yourself on a global scale for maptiles and gameplay locations is cheaper than Google Playable Locations at 25,000 players per day, halfway before they started offering a discount on user count. Pokemon Go has approximately 800,000 active daily players in the USA alone, for comparison.
(Practically speaking, you'll likely run your game for a smaller, non-global area, which proportionally reduces that cost. Even only cutting out the 2/3rds of the world that's ocean cover means looking at closer to 10TB and $2350 per month for a global scale single instance, which shifts the break-even point to 10,500 daily players)
Now, let's scale down. Looking at a representative US county, PraxisMapper would need 130MB of storage for geography data, and 250MB for Map Tiles. This covers 1,200 square miles for gameplay and tiles in under 1 GB. This is $0.23 per month, or $2.76 yearly. You could fit this entire database into RAM on a T2.small instance (costing about 12.50 a month, or $150 a year at on-demand pricing levels). Against Google Playable Locations, this becomes cheaper at 700 daily players, only 40 players past the credit Google gave out.)
Data transfer rates are hard to predict, but we will overshoot reasonable targets for this estimate. At AWS prices, outbound data is $.09 per GB, which would let you send the entirety of this county-sized database 100 times over for $9 a month ($108 yearly).
If we extrapolate on this county estimate, where 1200 square miles costs $2.76 a year for storage, we can guess what bigger areas would cost for storing map tiles and geography data:
- United Kingdom: $214 per year
- United States: $8,700 per year
- Europe: $9,000 per year
- Asia: $39,500 per year
- Global: $451,000 per year (Which is dramatically higher than the $91,200 per year that we already calculated, so all of these estimates are likely to be quite a bit over the actual cost.)
These areas would also require a more powerful server, which increases yearly cost as well.
Summary
If you run 1 webserver and 1 database instance equal in computing power, a county-sized game powered by PraxisMapper will cost under $400 a year in storage, data transfer, and computing power to run. That covers any number of players, and any number of requests, without artificial caps or limits. Squeezing everything onto a single VM for a small player count will cut that down to around $250 or less. A game that runs as an event for a weekend would cost a trivial amount of money to host the servers for during gameplay, and some extra for setup and testing.
A globally scoped game would cost $91,200 in database storage costs alone each year, and computing or data transfer costs would vary widely depending on your needs and usage.
This price estimate could be decreased farther using reserved instances and optimizing storage, or could scale up to cover larger gameplay areas pretty easily without getting close to the global costs estimated earlier. Or you could host it on an alternative cloud provider, or your own servers that don't have a monthly cost attached to them. A county-sized game could be run from a Raspberry Pi 4 in RAM, though no benchmarks on how well it can perform on that hardware have been completed yet.