Naval units, new demo mode features
Posted by Oleksandr on March 3, 2019
March 2019 development update (v5) introduces naval units, improved world generator with support for multiple continents and islands, AI logic to support naval exploration and combat, and some new features in the demo mode (when observing AI players).
Naval units
- Trireme: First available ship, can only move near the coast (in shallow waters). Carries 2 units.
- Caravel: Can go into the deep ocean. Carries 2 units.
- Frigate: First ship capable of bombarding coastal tiles. Carries 3 units.
- Ironclad: Combat-focused unit for establishing maritime supremacy. Can bombard. Does not carry units.
- Transport: Specialized on ferrying land units. Can not attack. Carries 4 units.
- Cruiser: Fastest ship available (4 moves per turn). No bombard. Does not carry units.
- Battleship: Toughest ship with heavy weapons. Can bombard. Does not carry units.
Bombarding works like a siege attack and does collateral damage to all units and the city on a tile. Unlike the siege attack, it does not require one turn of preparation.
Ships can move into coastal cities. This means that you can build a canal city linking two bodies of water together.
World generator can now produce multiple continents and islands, and ensures quality of player start locations by scoring each tile for quality of the area nearby, and then selecting start locations only from the top 25% of them.
AI logic to support naval units and multiple continents
The AI implementation had to learn a lot of new things to deal with the fact that there is now more than one landmass, and that units have to be carried by a ship to get across.
The major new thing is that now it parses the world into zones (either water or land), and manages exploration, expansion, and warfare separately for each zone.
When a land unit wants to get to a different landmass, it invokes the pathfinder to build a path which would get it there if the unit was capable of moving on water tiles. Then it checks which water zone did that path cross, and request a transport within that zone. If there is a transport available, it gets assigned to the job, otherwise the transport request will prompt coastal cities to construct it. The transport will then try to pick multiple passengers and unload them at a closest viable location on the target landmass.
New features in the demo mode
You can now speed up animations (up to 8x) by pressing the "fast forward" button in the bottom right corner. The button cycles between these presets: 1x (with all the normal animations and delays), 2x, 4x and 8x.
"Switch perspective" button in the bottom left corner above the unit context panel can now be used to observe the game from the perspective of another player (the one you have selected currently).
All important changes since v4 release (May 2018)
- Added naval units.
- Transports: certain ships can carry land units.
- Bombard: certain ships can bombard enemy targets on coastal tiles.
- World generator can now generate multiple continents/islands with a specific target of total landmass in the world.
- Quality of player start locations is now ensured (enough land with good workable tiles around).
- AI now has awareness of continents and oceans (separate zones of land/water mass), and can plan its strategies accordingly.
- AI can use transports to carry units from one landmass to another.
- In the demo mode you can now speed up animations (up to 8x) and switch perspective (observe another player).
- Better camera behavior when bringing into view locations at the edge of the world.
- Implemented a CPU profiler to help diagnose performance issues.
- Added debug commands to modify the world to speed up iteration times during development.
- Minor website and blog improvements, in particular bot spam prevention.