'Shipgame' built with Lamdera

Hello folks,

Here’s a game I’ve been building with Elm and Lamdera. I call it Shipgame but it’s really an implementation of Ship, Captain, Crew, a simple dice gambling game. Don’t expect any deep strategy or fancy graphics but I found it some fun to play with friends!

To get started visit https://shipgame.lamdera.app/, click Create Game, then Start Game (optional: invite friends using the join code). Your goal is to roll into the most valuable ship you can. To make a complete ship you need your Captain, First Mate, and Quartermaster (i.e. roll a 6, 5, and 4 in that order), with the sum of the two remaining dice (your crew) being the overall score of the ship. A ship without its Captain, First Mate, or Quartermaster is Incomplete and worth 0. But I’m really most excited for yall to read and if you’re in the mood critique my Elm/Lamdera patterns.

Demo Note it works on full-width and mobile-width browsers.
Github code

I created this game mainly as an exercise for myself to cover some areas I hadn’t done in a side project before:

  • Writing game logic, isolated from the UI and networking. Mostly encapsulated in ShipGame.elm and Dice.elm
  • Writing netcode that accommodates players joining a lobby using a randomly generated join code, seeing each other, and automatically reconnecting if they close the tab then reopen it. Mostly encapsulated in Backend.elm and Lobby.elm.
  • Using Tailwind and Daisy UI with proper theming (e.g. not hardcoding any colors). Check out the Theme button in the top right to see it in action.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.