Hacker News new | ask | show | jobs
by dajomu 2850 days ago
If you have the latest npm installed you can clone it and run `npx serve`.
1 comments

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.
// 6. @self: stop laughing // TODO
That sounds like an awesome game - do you have any interesting links for how to structure TBS games? It's something I've always played around with but never feel I managed to get a decent design