Archipelago - All things Goods

Phase 2 of Archipelago development (Resources, Goods, Building, and Trade Contracts) is now well underway. The last two contributions completed the functionality for discovery and claiming of resources bringing this area largely to a close.

This contribution moves on to looking at goods. Each resource tile held by a player will produce goods; for example a Quarry resource tile will produce Stone. Goods will play a key role in the game, allowing players to fulfil the trade contracts that underlie winning.

The development of the goods functionality required their creation, loading, unloading, and transportation. These functionalities are all covered by this contribution.

In addition a status dashboard has been added to the left hand sidebar to keep track of a player's resources and their associated goods, as well as monitoring the goods in storage or under transportation.



Screen Shot 2018-04-21 at 15.14.35.png

For a full view of the current state of the game 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.


New Features covered by this Contribution


Addition of status dashboard to left hand sidebar

There was a Resource status dashboard implemented prior to the graphics overhaul from CSS to Canvas and SVG. The first part of this update required a reworking and re-implementation of this functionality. In particular it was necessary to:

  • Change to SVG icons from the old CSS tiles.
  • Update so that the dashboard showed each team position rather than being focused permanently on a single player.
  • Update the pieces creation method so that particular items were passed as parameters rather than searched in boardArray.

The second part of the dashboard update added goods to the dashboard for each resource, settlement or cargo ship. This commit also implemented the creation of goods at the start of each player turn. This required:

  • Adding goods and stock keys to boardArray so each piece now carries information on the goods they are carrying or storing.
  • Updating allocateArray so that the initial pieces allocated to teams have goods and stock information and the code is cleaner.
  • Updating drawStock to collate goods information from loops through boardArray and adding this information to the dashboard.
  • Adding a new method (newTurnGoods) to add production of one cycle of goods to resource piece totals at the start of each turn.
  • Adding goodsTotals array and methods to collect all goods information at any point in time.

A screenshot of the dashboard in-play can be seen here:



Screen Shot 2018-04-21 at 15.13.38.png

Resource and goods dashboard for Blue Team

The code changes for the two parts of this update can be found here:
https://github.com/miniature-tiger/archipelago/pull/38/files

and here:
https://github.com/miniature-tiger/archipelago/pull/39/files


Goods - creation, loading, unloading, and transportation

This main part of this contribution focused on goods. Functionality was built as follows:

  • Ships can pick up goods from Resource tiles and forts
  • Ships can deposit goods to Resource tiles and forts
  • Activation of tiles (red box) to show only those pick up / deposits of goods that are permitted
  • The dashboard was updated to show goods in transit
  • The game move logic was updated to insert the new move types into the game flow

The screenshots below show a ship picking up goods and the dashboard updating after this loading:



Screen Shot 2018-04-21 at 15.44.03.png

Ship in pre-loading of wood


Screen Shot 2018-04-21 at 15.45.05.png
Screen Shot 2018-04-21 at 15.46.38.png

Dashboard pre and post loading of wood showing goods moving from Forest to Cargo Ship

The code for the design changes is covered here:
https://github.com/miniature-tiger/archipelago/pull/40

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 central market and each other, 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 and ironworks 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
  • Variable quantity of goods to be loaded / unloaded

Contracts for delivery:

  • Semi-random (equitable) generation of trade delivery contracts
  • Creation of trade settlements - COMPLETE
  • Dashboard for contracts
  • Mechanics for contract sign-up
  • Mechanics for contract delivery
  • Graphics of trade routes
  • Island naming: for describing location of trading settlements

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
  • Telescope range of 4 tiles for stronger search for ships
  • Consider separate cargo and war ships for teams

Forts

  • Add fort icons - COMPLETE
  • Create safe harbour from pirate ships

Conflicts

  • Develop conflict method between ships
  • Stealing of cargo
  • Limping back to port
Phase 4 - Central trading centre
  • Develop central market allowing players without resources to trade and fulfill contracts
Phase 5 - Rules, roll-out, documentation, testing etc
  • TBDeveloped

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!



Posted on Utopian.io - Rewarding Open Source Contributors

H2
H3
H4
3 columns
2 columns
1 column
12 Comments