Coder Social home page Coder Social logo

terraforming-mars / terraforming-mars Goto Github PK

View Code? Open in Web Editor NEW
679.0 11.0 315.0 71.16 MB

Terraforming Mars Boardgame

License: GNU General Public License v3.0

TypeScript 85.60% HTML 0.10% JavaScript 0.14% Dockerfile 0.02% Less 5.15% Vue 8.98% Shell 0.01%

terraforming-mars's Introduction

This is an open-source online implementation of the great board game Terraforming mars. It is not affiliated with FryxGames, Asmodee Digital or Steam in any way.

Note: This project has no affiliation with "Rebalanced Mars", whose authors have refused to open-source their code. We believe this is both a violation of our GPL3 license, and also of the spirit of collaboration that this project tries to foster. Note that any new features you see on this repo made available on that server are without our permission.

Buy The Board Game

The board game is great and this repository highly recommends purchasing it for personal use.

⬤ I want to join the community!

Join us over on Discord!.

⬤ I want to play!

There's a instance available at https://terraforming-mars.herokuapp.com/. It's generally reliable, but read more below.

There's also this excellent YouTube playlist focused on tutorials custom for this app.

NOTE: This site is restarted daily. A multiplayer game will remain available for 15 days, after which it will be flushed from the database. Unfinished solo games are flushed after one day. We continue to make stability and scalability improvements in step with growth and popularity, but to make sure your game remains, we highly recommended to host your own web server.

⬤ I want to learn how to play

There are far too many good tutorials online. Here are the rulebooks, though.

⬤ I want to run a copy of the server locally

Check out our Local setup wiki page

Honestly, it's really simple.

⬤ I want to run a copy of the server on Heroku

Check out our Heroku setup wiki page

(As of 2022-11-28, Heroku no longer has a free tier. However, it is still our recommended way to deploy, as they're the clearest instructions.)

⬤ I want to run a copy of the server on Docker

Check out our Docker setup wiki page

(Warning, this is not aggressively supported, though some people are on the Discord.)

⬤ I want to run a copy on a YunoHost server

Install Terraforming Mars with YunoHost

The code for the Yunohost Terraforming-Mars package is in this GitHub repo

(Warning, this is not specifically supported.)

⬤ I want to report a bug or feature request

Add it to our issues tab.

⬤ I want to contribute to development

See contribution guide and local development setup.

⬤ I want to win!

Me too, pal. Me too.

✨ Contributors ✨

Thanks goes to these wonderful people:

Brian Folts: All the things
Vincent Moreau: Venus, Prelude, Hellas & Elysium, Colonies, Turmoil
alrusdi: Front End, internationalization
Simeon Simeonov: UX, cards and Colonies design
Pierre Hilbert: Turmoil and helps with the things
nwai90: Community and Political Agendas fan-made expansions, and helps with the things
Pocc: He did that one thing one time
Robert Konigsberg: Fan expansions: Ares, The Moon, Pathfinders, Underworld. Prelude 2. Infrastructure cleanup, code reviews, two opinions too many.
chosta: Front end and back end

Lynesth: Help with the things

푸른이(derornos): 한국어화 옮긴이(Korean translator)
메일(email): [email protected] / 카카오톡(KakaoTalk, Messenger): link

Borbarad: Translation

d-little: CEOs

LICENSE

GPLv3

Russian Prototype font: https://fonts-online.ru/fonts/prototype-rus-daymarius (copyright 2001, free for personal use) Polish Prototype font: https://www.gry-planszowe.pl/viewtopic.php?p=1489006#p1489006 (copyright 2001, free for personal use)

terraforming-mars's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

terraforming-mars's Issues

Drafting option

Drafting option is currently missing and would be a great addition to the game.
Below is a extract from rule book:

Draft variant:
If more interaction is desired, the Draft variant
may be used. During the Research phase the players draft 4
cards to buy from instead of just drawing 4 to buy from:
Each player first gets 4 cards and chooses one to
draft, putting it aside and passing the rest to the next player.
Then you have 3 cards; set aside 1 of them and pass the rest
to the left. Then set aside 1 of the 2 you receive, pass the last
card, and finally receive your last card.
Then examine the 4 cards you’ve set aside (drafted)
and choose which to buy (3 M€ each) and which to discard.
Drafting is not used during the first generation
since the first Research phase is skipped (see setup). Cards
are passed clockwise during even-numbered generations
and counter-clockwise during odd-numbered generations.
This variant allows players to affect which cards
other players get access to, and increases your ability to
pursue a certain strategy, or predict which parameter will
rise first.
The Draft Variant adds some extra game time and
is not recommended for players new to Terraforming Mars.

No special tile displayed on the board

I forgot to implement this when i did the board rework. Will fix it asap. Need this issue to reference it in branch name and commit messages... Can i please about write permissions to main repository?

1 bug and 1 nice to have feature

In a 2 player game, 1 player did not have the 4 card selection to pick at begining of generation 2 (the other player got it)

This is not a bug but inventor's guild only display card title, it would be great to see full card description in order to make the choice easier.

End game results score error

I played a 2 player game, each only created a forest.

Here is the score breakdown, there is 1 in city column and 0 in Greenery column, should be the opposite

Player Corporation TR Milestones Awards Greenery City VP Total
yjyj Teractor 21 0 0 0 1 0 22
kkk Thorgate 21 0 0 0 1 0 22

Can go negative titanium with WATER IMPORT FROM EUROPA

A check on titanium amout in stock is missing, that can lead to negative titanium amounts.

Would it be possible to modify SelectHowToPay to have built-in checks for resource availability (MC, steel, titanium, heat...)

Show errors to user

Any input error is displayed to the user with a generic error message. The server has a helpful error message which should get displayed to the user so they know what to correct.

Universal endpoint for assets and styles cleanup

It's getting necessary to make a webpack task to build styles.css from a bunch of smaller files in src/css directory. It should help us to have less merging conflicts and better separate modules.

What do you think?

Also it is boring to add new item to pngs variable each time we want to use new image. Can i do universal endpoint to serve all the assets (including favicon, styles.css and everything from assets directory)?

Some game issues

Hello Brian,

I just found your Terraforming Mars implementation on github and I gave it a try with a friend of mine.

We ran into a couple of issues that made the game unplayable unfortunately...

First on is a error when we click on the other player name to check the projects cards he has played and his status (see error log bellow)
The other one is that it is not possible to use steel to pay for a project with Building tag.
Thanks a lot for doing this and sharing it, it is great !

Cheers,
Vincent

[Vue warn]: Property or method "getEventCards" is not defined on the instance but referenced during render. Make sure that this property is reactive, either in the data option, or for class-based components, by initializing the property. See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.

found in

--->


warn @ vue.esm.js:629
vue.esm.js:629 [Vue warn]: Error in render: "TypeError: getEventCards is not a function"

found in

--->


warn @ vue.esm.js:629
vue.esm.js:1896 TypeError: getEventCards is not a function
at Proxy.eval (eval at createFunction (vue.esm.js:NaN), :3:471)
at VueComponent.Vue._render (vue.esm.js:3545)
at VueComponent.updateComponent (vue.esm.js:4063)
at Watcher.get (vue.esm.js:4476)
at Watcher.run (vue.esm.js:4551)
at flushSchedulerQueue (vue.esm.js:4307)
at Array.eval (vue.esm.js:1988)
at flushCallbacks (vue.esm.js:1914)
logError @ vue.esm.js:1896

Resign-Button

Hi,

I'd like to see a button that allows a player to resign a game and effectively drop it.

Cheers

Game is struck after playing some cards

During solo play, I tried to play MOHOLE AREA or LAVA FLOWS, the game moved to "Not your turn to take any actions" state. There is no error message in the console.

land claim not working

I played land claim card. It was payed and played but no marker was put on the board, and I did not got placement bonus (should have got 6 MC as the tile was adjacent to 3 oceans)

Game struck

dabewi and I were having a 2 player game, with prelude extension.
During first generation, both of us were able to play our prelude cards and 2 project cards each.

Then we both have
"Not your turn to take any actions" message at the bottom of the page.

I'm not sure if it's prelude related or not, will try another 2 player game without prelude when I have some time.

EDIT : I did another 2 player game without prelude, got the same issue during generation 4.

Cards requirements control code review

We need to carefully review all the cards requirements control code.
There are plenty of cases which can put the game into unplayable state.

Example:
If you play an "Aerobraked Ammonia Asteroid" card and there no card to put Microbes on - game will block with no options to recover.

It seems to be a long work, due to requirement to fix tests and write a lot of new.
But we really need to start it.

Auto refresh

Would it be possible to add a refresh mechanism to the game page so there is no need to press F5 ?

Can't pay by both titanium and steel for card

SpaceElevator card has both steel and space tags, so i should be able to pay for it by any combination of steel, titanium and megacredits. I tried to pay 3 titanium 3 steel and 12 and got an error: "Did not spend enough to pay for card"

Turn should not end if one action was done

As per the rule book :

You can choose to take 1 or 2 actions on your
turn. If you take no action at all (pass), you are out of
the round and may not take any anymore actions this
generation. When everyone has passed, the action phase
ends.

Bug when playing the Insulation card

When playing the Insulation card, when I select an amount of heat production to lose and hit "Save" absolutely nothing happens. I have tried selecting different values to decrease heat production, but none of the available choices works.

Card data:
Insulation Costs 2. Decrease your heat production any number of steps and increase your mega credit production the same number of steps Better insulation means lower energy spending

I figure it would be easier for you to see the state of the game upon playing and paying for Insulation:
https://terraforming-mars.herokuapp.com/game?id=a7c09da40aeb
https://terraforming-mars.herokuapp.com/player?id=9e0c7cd228ec

Wrong card name

10 Mining Industries should be Io Mining Industries (as the name of one of Jupiter's moon)

Player home visual fixes

  1. Make bonus icons on the Mars map to not block a tiles placement
  2. Better positions for "Phobos space haven" and "Ganymede colony" captions on the Mars map
  3. Reasonable margins after each block on player home to look better

Setup of solo game sometimes attempts to put a tile on an occupied tile.

The setupSolo function is placing a space on an occupied tile occasionally. Every few unit test runs the following runtime error is observed.

     Error: Selected space is occupied
      at Game.addTile (dist/src/Game.js:509:19)
      at Game.addCityTile (dist/src/Game.js:602:14)
      at Game.setupSolo (dist/src/Game.js:708:14)
      at new Game (dist/src/Game.js:42:18)
      at Context.<anonymous> (dist/tests/cards/prelude/Vitor.spec.js:23:20)

I ran into this as well when setting up a game to play solo locally.

Save/load support

Game object needs serialization/deserialization support.
As result we will have:

  1. Better bug reporting (with full current game state)
  2. Chance to recover game after server failure/reload
  3. Game replays in the feature (series of game states + text log of user's all actions)
  4. Undo action
  5. Easy to reproduce edge cases for manual testing

No check for steel or titanium amounts

The game does not check the steel or titanium amount sent by player. I was able to pay with more steel that I had in stock and it resulted with a negative steel amount.

It's possible to place more than 9 ocean tiles

My case was like this:
In solo mode i placed a 8 oceans, then i played Lake Marineris. It lead me to the strange situation where i was need to do multiple clicks by different locations to make UI updated. As result I got 10 of 9 oceans.

Science tags on prelude cards don't count

Hi,

I tried to play Gene Repair that requires 3 science tags. I have two science tags on project cards and one science tag on a prelud card. Unfortunately the program doesn't allow to play Gene Repair although I have enough money and there are no other requirements.

I think the method getTagCount (line 185 in Player.ts) only considers project cards and corporation cards as valid.

Screenshot: https://abload.de/img/errorh8kpl.png

Cheers

Some issues with prelude extension

Hi,

first of all: Thumbs up for the project!

Today I started a game with a colleague with prelude extension activated. There were some issues:

  1. When I'm able to choose which action I want to perform there is no option to play a prelude card. Apparently I can play prelude cards via the option "play project card". An option to eplicitly play prelude cards would be nice.
  2. When I try to play a project card before I've played my prelude cards, the browser gives me an "input" error. It would be nicer if the game would actually tell me what is wrong with playing the project card first
  3. After I played my prelude cards my opponent was forced to build his city (he played Tharsis) before he even played his prelude cards - which is not how it works (prelude cards have to be played first). After that he played his first prelude card and passed. Now it was my turn but I couldn't play a project card (presumably because my opponent hadn't played all of his prelude cards) BUT i could play the standard project aquafier, which was weird.

If you have the possibility to look into the game (we played it on your test server), it was apehead vs. DartVader.

Greetings!

Not able to steal from opponent

Hi,

during one of the test games with @vincentneko I experienced the following behaviour:

I played Sabotage and wanted to steal 7 megacredits from my opponent. Though he had 15 megacredits to that time I wasn't able to steal anything from him (or from myself, I tried that too). Regardless what amount of what ressource I chose, the game gave me the same error message:

https://abload.de/img/erroraekp3.png

Cheers.

Helion not working as intended

In a game with Helion, I have a stock of 13 heat, and 3 MC.
Game does not let me play a card (with no requirements) that costs 13 MC.

Also, standard projects text is strange:

Pay for a standard project
Select how to pay for power plant
Select how to pay for asteroid
Select all
Select all
Select all
Play project card

Wrong lose conditions for solo game

I've set constants to:
MAX_OXYGEN_LEVEL: number = 0;
MAX_OCEAN_TILES: number = 0;
MAX_TEMPERATURE: number = -26;

When I increase temperature 2 steps, game is ending but with the "Sorry, you lose."

I'm expected to win here since I've achieved terraforming before generation 14.

Multiplayer end game is bugged

It was the first time I was able to reach end game in multiplayer.
I was playing with a friend, it was a real blast !!!

Some feedback about it:

  • I played most part of the game on mobile
  • We texted one another to say "your turn", so even before auto refresh, I guess browser notifications should be #1 improvement item on the list.

In the end, the game never finished and carry on with a list of things we can do even if we have passed.

Our MC keep increasing just like generations were continuing.

Here is a screenshot that might help...

endgame

I've set up a game server on openshift. This one will not stop after a 20 min period of inactivity, so if you want to set up a "long play game", please let me know so we can play a game together !

Browser notifications

It would be great if the game could push a browser notification when it's our turn to play in a multiplayer game

Better board

We are decided to rework current board. Our goals are:

  1. Better look like this https://alrusdi.ru/static/mars_board_wip.png
  2. Make it easier to find named locations (like.: Tharsis Tholus and Noctis City etc)
  3. Better board tiles
  4. Better highlight of target hexagon when mouse over it
  5. Better icons with wider cross browser support
  6. Better player markers (tile ownership cubes)
  7. Good extensibility to be able to support Hellas & Elysium expansion boards

Space Station doesn't reduce costs

The card Space Station should reduce the amount of money you have to spend to buy a card with a space tag by 2. Sadly it doesn't reduce the costs.

How to Reproduce:

  1. Buy Space Station
  2. Play any other card with a space symbol

Cheer

Do not ask user to select space for ocean if its placement is impossible

If all 9 oceans is already on Mars we sholdn't ask user to select space to place an ocean.

How to reproduce:

Case 1

  1. Add 9 oceans
  2. Play Comet card
    => You will see Select space dialog with no result

Case 2

  1. Add 8 oceans
  2. Set temperature to 2
  3. Play Lake Marineris
    => You will see two Select space dialogs, but really needed only first one

Exaple of how to fix is in "Giant Ice Asteroid" card

Cards to check:
Imported Hydrogen
Black Polar Dust
Lake Marineris
Towing a Comet
Ice Asteroid
Artificial Lake
Subterranean Reservoir
Large Convoy
Convoy From Europa
Ice Cap Melting
Flooding
Permafrost Extraction

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.