Archipelago - First Project Milestone Complete!

My first major milestone was achieved this weekend for Archipelago - the seafaring and trading turn-based strategy game that I have been working on.

I added a major logic update to piece movement, allowing ships to move intelligently around islands and other obstacles. This update also included capturing the path the move made across the board.

I then followed this up by chaining together the transformations for each step along this path so that ships now move smoothly and intelligently across the board with different move ranges according to wind direction. Like this!


phase 1 complete.gif

This means that Phase 1 is now COMPLETE!


For a full view of the current state of the game see my github-hosted page:
https://miniature-tiger.github.io/archipelago/

Background details of the project and a list of previous updates can be found at the end of this contribution post.


New Features covered by this Contribution


Major logic update to piece movement

Previously ships could move within a certain range, dependent on the wind direction but irrespective of any obstacles. To allow for obstacles I introduced an iterative step-based approach which breaks down a move into single steps, checks the validity of each step and assigns a cost to the step based on the wind direction.

Since more than one path can lead to the same destination a check was introduced that overwrote any non-optimal paths with the lower cost path.


Screen Shot 2018-03-23 at 21.36.58.png


Different ranges can be calibrated (within the code) both by maximum move distance and level of influence of wind direction.

Here is an example for maximum 3 tile range movement under the impact of SW wind. Only one tile movement can be made against the wind.


Screen Shot 2018-03-23 at 21.39.45.png


Here is the same example for NW wind but with movement restricted by having to move against the wind around the island so that a much smaller range of movement is available.


The update also included capturing the path of the move across the board; a necessary step for chaining a series of transformations together. Sample output can be seen here:

Screen Shot 2018-03-24 at 09.02.13.png


The piece movement update is covered by the following commit:
https://github.com/miniature-tiger/archipelago/pull/20/commits/c305d2b9025896701f7593ce4eabc8fa8c684242

It is almost all javascript logic in the movement.js file under the "Method to activate tiles to which a ship can move" heading.


Movement transitions chained together based on calculated path.

The second update chained together the transformations for each step along the path to the chosen destination tile so that ships now move smoothly and intelligently across the board. The approach used was to aggregate the size of the transitions and apply the cumulated impacts in a loop interspersed with delays to give the stepwise board-game style movement seen.


phase 1 complete.gif

The transitions update is covered by the following commit:
https://github.com/miniature-tiger/archipelago/pull/21/commits/04cfbfd744607bf4c58202cf5f6204f39be62e6d

Again it is almost all javascript logic in the movement.js file under the "Method to activate tiles to which a ship can move" heading.


This completes Phase 1 of the project. On to phase 2 shortly!

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 will be revisited later once I'm happy with the basic gameplay

Previous Updates

Roadmap

For the short term roadmap the first main goal of getting ships on the board and moving at different speeds under the influence of the compass is COMPLETE!

Work has already begun on the second stage which is land squares and goods discovery and delivery contracts including the player dashboards.

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
  • Refactoring to allow CSS transitions layer above "refresh" layer - may not now be necessary - for consideration in future.
Phase 2
Land Squares and Resources:
  • Dashboard of player pieces and resources - COMPLETE
  • Resource tiles (forest, iron, flax, gold etc) - in progress: forest and ironworks added
  • Summaries of produce and populations and functioning for each Resource
Contracts for delivery:
  • Semi-random (equitable) generation of trade delivery contracts
  • Creation of trade settlements
  • Dashboard for contracts
  • Mechanics for contract sign-up
  • Mechanics for contract delivery
The long term roadmap is still to be fully fleshed out but includes:
  • Building: (recipes, times etc)
  • Islands (naming: for describing location ot pieces, trading settlements)
  • Central trading centre:
  • Conflicts:
  • Pirates:
  • Scoring:

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
9 Comments