Live data from Hacker News

CivJS: A JavaScript 4X Game (2015)

github.com

11–20 of 45 posts

Re: CivJS: A JavaScript 4X Game (2015)

#13
post #4
post #2

Looks like it's just the code, but no noticeable way to play. Is it hosted somewhere?

If you have the latest npm installed you can clone it and run `npx serve`.

I looked over the code for it, because earlier this year I was trying to make a turn based game that merged the gameplay of Imperialism II with the production tree depth of Factorio while having unique little sim like creature with traits that could be bred and inherited and so anytime I can learn something about how to structure code for TBS I'm pretty interested.

Anyhow: it looks pretty incomplete for example here is the GAME.playTurn() function:

    GAME.playTurn = function () {
      // 0. AUTOSAVE
      // TODO

      // 1. START OF TURN
      // TODO

      // 2. TRADE
      // TODO

      // 3. CITY MANAGEMENT
      // TODO

      // 4. MOVEMENT
      // TODO

      // 5. RESEARCH
      // TODO
    };
So I am not sure that `npx serve` will work and do anything meaningful, or if maybe the logic is in different file / branch.

Re: CivJS: A JavaScript 4X Game (2015)

#16
post #4

Earlier quoted context omitted.

If you have the latest npm installed you can clone it and run `npx serve`.

I looked over the code for it, because earlier this year I was trying to make a turn based game that merged the gameplay of Imperialism II with the production tree depth of Factorio while having unique little sim like creature with traits that could be bred and inherited and so anytime I can learn something about how to structure code for TBS I'm pretty interested. Anyhow: it looks pretty incomplete for example here…

// 6. @self: stop laughing // TODO

Re: CivJS: A JavaScript 4X Game (2015)

#17
post #7

About time, all the Javascript I've ever seen has been completely uncivilized.

"What do you think of JavaScript Civilisation?" "I think it would be a very good idea" - Gandhi, possibly

My opinion is that this is best Civ-themed HackerNews comment ever written so far and I would gladly argument it by saying the quoting Gandhi as an ironically peaceful opinionist is very ironic indeed. ICBM.

Re: CivJS: A JavaScript 4X Game (2015)

#19

There is also https://www.isotrident.com which is based on Freeciv-web https://github.com/freeciv/freeciv-web

This one we are discussing is simply a 4X JavaScript game. It has almost nothing to do with the actual Civilization game.

Screenshot: https://cdn.pbrd.co/images/HBqxLGp.png

Re: CivJS: A JavaScript 4X Game (2015)

#20

There is also https://www.isotrident.com which is based on Freeciv-web https://github.com/freeciv/freeciv-web

This one we are discussing is simply a 4X JavaScript game. It has almost nothing to do with the actual Civilization game. Screenshot: https://cdn.pbrd.co/images/HBqxLGp.png

It's basically Civilization 0.1
Post reply on HN