I made a Java map game thing
I made a Java map game thing
(Note: feel free to use the peertube instance, that would be cool 🥺)
I made a Map game in Java. There is no gameplay though so you just kinda look at it go.
Each pixel is a province on zoom level 1, and its color depends on the map mode and if it is in bounds (inside the actual map and not above or below).
The map is randomly generated, and each province has its own height, temperature and moisture value. The color of the province is calculated using these values.
Also, the map loops horizontally seamlessly since the height, temperature and moisture values are taken from the surface of a cylinder (without the top and bottom surfaces) instead of just a rectangle.
On map generation states (I call them that instead of countries to future-proof for civil wars, since for example Taiwan is not its own country but a participant in the civil war of a country) are created one per land province, and they attempt to expand their borders by taking bordering land from one of their neighbours every fixed frame (they don't all do it every fixed frame, only a bunch that are randomly selected).
Mapmode 2 is the borders mapmode, provinces are colored using their state's color if they border a state that is not their holder.
Mapmode 3 just colors every land province to its holder's color.
I hope you find it interesting, it is really fun to make this kind of stuff! 😊