GithubHelp home page GithubHelp logo

dennsya / catan Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bigomega/catan

0.0 0.0 0.0 53.45 MB

Free to play multiplayer catan style board game

Home Page: https://catan-qvig.onrender.com/

License: MIT License

Shell 0.08% JavaScript 61.92% CSS 35.63% HTML 2.37%

catan's Introduction

Catan

Free to play multiplayer catan style board game

Install & Run

npm i
npm start

The server will be reachable at localhost:3000. You're now ready to play the game…

I have an .nvmrc pointing to node version v20.10. Please use at least v18 and above…

Future Ideas

  • Browser Notifications
  • Optimization (memory1, speed, colors)
  • Join random games
    • Private & public games
  • Watch games
  • Custom map builder
  • Rethink ports
    • multiple in single Sea tile
    • disallow connected edges of land being added as ports
  • Introducing 8 player maps
  • Social login (w pic and/or just a name/id)
  • Discord help (for talking)
  • Seafarers expansion (fairly easy one)
  • Trade negotiations

MapKey

Rules

  • The map is decoded from left-to-right and top-to-bottom.
  • Each row is seperated by a - or + representing its first-tile relationship to the first-tile of the previous row. - makes it bottom-left and + for bottom-right.
    <row> -<row>
    +<row>
    -  <row>
    
  • There can by any amount of \s(space) and \n(newline) inbetween the rows and tiles. They are ignored by .trim().
  • Each Tile is separated by a .(dot)
    <Tile> .<Tile> .   <Tile>
    
  • A Resource tile is represented by its key and Number next to each other. <TileKey><Number>
  • A Sea tile (represented by S) can optionally have one trade. S(<Trade>)?
  • A Trade is represented by its edge TradeEdge (of the Sea tile it's on), type TradeType and a number TradeRatio covered by ()(round braces) and split by _(underscore).
    (<TradeEdge>_<TradeType><TradeRatio>)
    
  • Surrounding your land with the sea is not necessary but recommended to get the beautiful sea shores.
  • The robber will be placed in the last desert found during decoding.

Keys

const TileKey = { G: 'Grassland', J: 'Jungle', C: 'Clay Pit', M: 'Mountain', F: 'Fields', S: 'Sea', D: 'Desert' }

const Number = [2, 3, 4, 5, 6, 8, 9, 10, 11, 12]

const tradeEdge = {
              tl: 'top_left',     tr: 'top_right',
  l: 'left',                                        r: 'right',
              bl: 'bottom_left',  br: 'bottom_right',
}

const tradeTyp = { '*': 'All', S: 'Sheep', L: 'Lumber', B: 'Brick', O: 'Ore', W: 'Wheat' }

const tradeRatio = [2, 3]

Example

This configuration…

const config = {
  mapkey: `
                        S  .S(bl_O2)    .S(br_O2)    .S
                      -S .M8         .D          .M8   .S
                    -S .G9    .S           .S       .G9  .S
                  -S .F10 .S         .S          .S    .F10.S
                -S  .S .C11   .S           .S       .C12 .S  .S
              -S  .S .S   .C2        .S          .C3   .S  .S  .S
        -S(r_L2).J6.J5 .J4    .S           .S       .J4  .J5 .J6 .S(l_L2)
              +S  .S .S   .S         .S          .S    .S  .S  .S
  `
}
// Same as writing…
config.mapkey = `S.S(bl_O2).S(br_O2).S-S.M8.D.M8.S-S.G9.S.S.G9.S-S.F10.S.S.S.F10.S-S.S.C11.S.S.C12.S.S-S.S.S.C2.S.C3.S.S.S-S(r_L2).J6.J5.J4.S.S.J4.J5.J6.S(l_L2)+S.S.S.S.S.S.S.S.S`

Renders the map… Screenshot 2024-02-04 at 11 46 20 copy

Frameworks

Major

Minor Libraries

Status

In Progress

Feb '24
  • Alert history
  • Quit game
  • Login & waiting room UI rework
  • End Game
Jan '24
  • Accessibility (Zoom, Fullscreen, Sound, Shortcuts)
  • Opponents UI
  • Shuffler
  • Longest Road & Largest Army
  • Animations (DC, Cost, Build, Dice, Hand)
  • Dev Card Actions
  • Trade
  • Keyboard Shortcuts
  • Client Refactor
  • Robber
  • Basic Turn Actions
  • Refactor server-side Game.js
  • Page refresh state persistance
  • Render Hand
  • Distribute resource
  • Place second house & road
  • Place first house & road
Dec '23
  • Alert & Notification Messaging
  • Timer System
Nov '23
  • Sound Collection
  • Waiting Room
Jun '23
  • Socket IO setup
  • Render Corners and Edges
  • Render Board
  • Image and Sprite Collection & Edit
  • Login Page
  • Simple Server
  • Decoding the map from key

Bugs

  • Road into the Sea

Feedback

  • Initial build - show the built house
  • Resource animation after dice animation
  • Music reminder
  • Can play DC after dice, update text
  • Trade denied/accepted message
  • Remember player name
  • Timer focus when few seconds left
  • Game end, new game link
  • Login splash image quick load
  • larger screen number fix

Footnotes

  1. https://www.ditdot.hr/en/causes-of-memory-leaks-in-javascript-and-how-to-avoid-them

catan's People

Contributors

bigomega avatar dependabot[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.