Introduction
In the last update pirate ships were given a new lease of life. Telescopes were added so that pirates could chase down cargo ships at greater range. Sea battle functionality was developed to allow pirate ships to attack other ships and steal their cargo. This resulted in lots of damaged ships littering the map!
This contribution redresses the balance a little:
- Safe harbours have been added around forts. The fort cannons prevent pirate ships from approaching the fort too closely and give cargo ships some map tiles onto which to escape.
- Damaged ships can limp back to these safe harbours (using oar power) and undergo repairs, becoming good as new!
- Pirate ships also receive a home harbour and will return there if they become damaged.
In addition, the board arrangement has also been changed a little in an attempt to improve gameplay.
Phases 2 (Resources, Goods, Building, and Trade Contracts) and 3 (Conflicts) of Archipelago development are now well underway.
For a full view of the current state of the game development see my github-hosted page.
https://miniature-tiger.github.io/archipelago/
Please note that the game is not yet complete - you can see current progress and test functionality but you will have to wait a little longer to play!
Background details of the project can be found at the end of this contribution post.
Repository
The repository for Archipelago can be found here:
https://github.com/miniature-tiger/archipelago
New Features covered by this Contribution
Addition of safe harbour functionality
Harbours have been added around forts. These harbours cannot be entered by pirate ships due to the fort cannons, allowing cargo ships to dock, deliver goods, hide, or be repaired in safety. Pirate ships now have to box around Kingdom fort areas and will ignore any docked ships rather than waiting for them to exit.
The harbours are shown on the map as filled tiles in a slightly darker sepia shade. Some examples are below:
The code changes for the above new feature can be found here:
https://github.com/miniature-tiger/archipelago/pull/56/files
The change required:
- A new method to find safe harbour spaces around forts and then to add them to the boardArray.
- A new method to draw safe harbours on the map.
- Updates to movement.js so that pirate ships can no longer enter safe harbours (which also means they do not target cargo ships in harbours for attack).
- Updates to the logic in pirate.js so that pirate ships no longer use their telescopes to find ships in harbours - docked cargo ships are thus ignored.
Repair of team cargo ships in harbours
If a cargo ship loses a sea battle its mast and sails are damaged and it must be rowed back to a harbour for repairs. This change added the harbour arrival and repair functionality.
The repair takes place in stages with each stage lasting a full turn:
Damaged cargo ship approaching harbour:
Addition of scaffold
Repair of mast
Repair of sails
And away!
This change also reduced the mobility of damaged ships to two tiles in all directions - given the loss of the mast and sails, wind power is no longer an option.
The code changes for the above features can be found here:
https://github.com/miniature-tiger/archipelago/pull/57
The main change required were:
- The addition of a graphics method for step-wise repair of cargo ships in harbours (removal of oars, add scaffolding, add back mast and sail).
- A new method to handle the damaged ship arrival in the harbour including turning the ship to face the fort
- A method to check for cargo ships to repair at start of each turn and to upgrade their repair stage
- Integration of the harbour arrival into the game logic
- Change to movement.js to reduce cargo ship movements to 2 tiles in all directions for damaged ships
Pirate harbours and repair
That just leaves the repair of pirate ships. Pirate ships can also be damaged in sea battles. If this happens they row their way back to their home harbour and undergo repair.
The pirate home harbours were added on the space where they commence the game. The coordinates of this tile were added to the relevant pirate ship piece in boardArray so that the piece knows where to return to once damaged. The repair progress is the same as for cargo ships.
The code changes for the above features can be found here:
https://github.com/miniature-tiger/archipelago/pull/58
The main changes were:
- Addition of homeRow and homeCol to all Transport pieces so pirate ships know where to get repaired.
- Update of activateTiles in movement.js so that separate search range and maximum look range can be passed. This allows pirate ships to find a route to their home tile which may be a long way away.
- Addition of pirate logic to harbourRepairArrival, harbourRepair, and drawHarbours.
- Update of pirate.js logic to handle new logic priority for damaged ships.
Proof of Work Carried Out
This is the full url to my github account:
https://github.com/miniature-tiger
That is all for this update. If you have any queries please drop them in the comments or contact me on discord.
Details of the Archipelago Project
What is the Project About?
Archipelago is a new project that I have been working on. The aim is to develop a seafaring and trading turn-based strategy game. Players will guide their ships around the islands, searching for goods to aid construction of ships and their bases, trading with the Kingdom settlements and avoiding hazards like pirates and whirlpools.
Technology Stack
The project is a browser based game:
- Mechanics: Javascript
- Visuals: HTML and CSS initially but now moved across to Canvas and SVG.
Roadmap
Phase 1 - the first main goal of getting ships on the board and moving at different speeds under the influence of the compass is complete.
The graphics overhaul is also now complete.
Work is now ongoing on Phase 2 which is resource discovery, goods production, building and the trade contracts that underlie the game.
Work has also begun on adding pirates and conflicts.
Phase 1 - Board and ship movement: COMPLETE!!!
- Board set up - COMPLETE
- Basic ship creation: functionality and graphics - COMPLETE
- Manual ship movement and board updating - COMPLETE
- Basic compass creation: functionality and graphics - COMPLETE
- Turn based activity of ship movement - COMPLETE
- Logic of length of longer moves around obstacles - COMPLETE
- Chaining together transitions to allow graphics of longer moves - COMPLETE
- Separation of board layers (Canvas base layer, Canvas activation layer overlay, SVG piece overlays) - COMPLETE
Phase 2 - Resources, Goods, Building and Trade Contracts
Resources
- Add Resource tiles (forest, ironworks, flax, gold etc) - in progress: forest, ironworks, quarry, plantation added
- Discovery of resource tiles - COMPLETE
- Claiming of resource tiles - COMPLETE
- Dashboard of player pieces - COMPLETE
Goods
- Creation of new goods each turn - COMPLETE
- Loading, unloading and transportation of goods - COMPLETE
- Dashboard of goods pieces - COMPLETE
- Goods icons - COMPLETE
- Variable quantity of goods to be loaded / unloaded - COMPLETE
Contracts for delivery:
- Semi-random (equitable) generation of trade delivery contracts - COMPLETE
- Creation of trade settlements - COMPLETE
- Dashboard for contracts - COMPLETE
- Mechanics for contract sign-up - COMPLETE
- Mechanics for contract delivery - COMPLETE
- Island naming: for describing location of trading settlements - COMPLETE
- Graphics of trade routes - COMPLETE
- Continuance of contracts over time
- Breaking of contracts due to interference
Building (On hold - decide if necessary once contracts implemented)
- Recipes, time to implement, graphics etc
Scoring:
- Work out scoring mechanism (linked to contracts)
- Add score dashboard
Phase 3 - Conflicts
Pirates
- Add pirate ships - COMPLETE
- Automate pirate ship movements (basic movement with wind and search for cargo ships) - COMPLETE
- Search - telescope range of 5 tiles for stronger search for ships - COMPLETE
- Consider separate cargo and war ships for teams
Forts
- Add fort icons - COMPLETE
- Create safe harbour from pirate ships - COMPLETE
Conflicts
- Attack - Develop conflict method between ships - COMPLETE
- Stealing of cargo - COMPLETE
- Limping back to harbour - COMPLETE
- Ship repair - COMPLETE
Phase 4 - Game Management and Settings
Settings
- Settings pop up box created - COMPLETE
- Options added - In progress - game speed added
- Local options (player name etc)
- Game saving and replay
Phase 5 - Central trading centre
- Develop central market allowing players without resources to trade and fulfill contracts
Phase 6 - One player version development
Artificial Intelligence levels for computer players
Phase 7 - Rules, roll-out, documentation, testing etc
Contact / Contribute
You can get in touch with me on discord if you would like to contribute.
You can find the current state of the game here:
https://miniature-tiger.github.io/archipelago/
The repository for the project is here:
https://github.com/miniature-tiger/archipelago
Have fun!