Skip to content

blairjordan/canals

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿšค Canals

Canals is a boat simulation game which allows players to explore different canals, complete challenges, and enjoy the scenery of the waterways.

Screenshot

๐Ÿ’ป Technology Stack

โœจ Features

  • ๐Ÿ”ง Boat Customization: Customize your boat with decorations and accessories
  • โฌ† Boat Upgrades: Upgrade your boat to improve its performance
  • ๐Ÿ“ฆ Deliveries: Deliver goods to earn rewards
  • ๐ŸŽฃ Fishing: Catch fish to earn rewards
  • โ›ฝ Fuel: Refuel your boat at pumps
  • ๐ŸŒ Multiplayer: Collaborate and interact with other players
  • ๐Ÿ—บ Expanding Regions: While currently focusing on European / Dutch-style canals, the game has plans to expand to different regions in the future.
  • ๐Ÿ”“ Locks: Operate locks to navigate through different water levels

๐Ÿ’ป Deployed Version

A deployed version of the game is available at canals.boats

Specify a playerId as a query parameter to log in as a specific player. (e.g., https://canals.boats/?playerId=1)

User IDs 1-4 are available for testing.

๐Ÿ’พ Installation

To install and set up the Canals, follow the instructions below for the server and client components:

Prerequisites

Server

  1. Create the Docker container for PostgreSQL: npm run db:init
  2. Start the server by running: npm run start

This will launch the server and make it accessible for the client.

You can access the GraphQL playground at http://localhost:3000/graphql to explore the API.

Client

  1. Navigate to the client directory: cd client
  2. Install the client dependencies: npm run install
  3. Start the client development server: npm run dev --port=3001

This command will compile the client code and launch a development server.

๐Ÿ› Enabling Debugging

Update the following settings in the client/.env.local file:

  • NEXT_PUBLIC_DEBUG_MARKERS (boolean): Display animated markers. Markers are color-coded by marker type.
  • NEXT_PUBLIC_DEBUG_AREAS (boolean): Display game grid, and highglight player's current area

๐ŸŽ›๏ธ Configuring Transloadit

To enable file uploads in the game, you'll need to set up an account with Transloadit.

Update the following settings in the client/.env.local file:

  • NEXT_PUBLIC_TRANSLOADIT_KEY (string): Transloadit authentication key
  • NEXT_PUBLIC_TRANSLOADIT_TEMPLATE_ID (string): The Transloadit template ID

Callbacks

Once you've set up your Transloadit template, you'll need to configure the callback URL to point to your local development server.

I use the following ngrok command to expose my local development server to the internet:

ngrok http -hostname=canals.ngrok.app -region=au 3000

In my assembly, I set the notify_url to point to the ngrok URL with the /transloadit_callback path appended to it. For example:

{
  "steps": {
    ... steps
  },
  "notify_url": "https://canals.ngrok.app/transloadit_callback"
}

๐ŸŽฎ Usage

Once both the server and client are set up, you can access the Canals by opening a web browser and navigating to the provided URL (e.g., http://localhost:3001).

๐Ÿ•น Controls

The game can be played using the following controls:

  • WASD: Move the boat
  • F: Fish
  • E: Interact with markers or objects
  • I: Inventory
  • C: Upload new flag (requires flag item)
  • Esc: Cancel current action

๐ŸŽจ Art Style

The target art style is medium-to-low poly art style with ghibli-like trees, aiming to capture the charm and ambiance found in various canal locations worldwide.

๐Ÿค Contributing

Contributions to the Canals project are welcome! If you'd like to contribute, you can follow these steps:

  • ๐Ÿด Fork the repository and create a new branch for your changes.
  • ๐Ÿ› ๏ธ Make your modifications, addressing the issue or feature you're working on.
  • ๐Ÿš€ Commit your changes and push them to your forked repository.
  • ๐Ÿ”€ Open a pull request (PR) to submit your changes.

You can also browse the existing issues and PRs to contribute to ongoing discussions or offer your assistance.

๐Ÿ“ข Suggestions

If you have any feedback, suggestions, or need help related to Canals, please feel free to open an issue in this repository.

About

๐Ÿ›ฅ Multiplayer canal boat game

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published