CivJS: A JavaScript 4X Game (2015)(github.com)
github.com
CivJS: A JavaScript 4X Game (2015)
https://github.com/Venerons/CivJS
44 comments
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
Screenshot: https://cdn.pbrd.co/images/HBqxLGp.png
It's basically Civilization 0.1
I came here to mention freeciv-web. Isn't that exactly what CivJS is trying to do?
The real question is whether the game will accurately reproduce Gandhi's bugged behavior[0] causing him to be super aggressive, or if the JS version will "fix" it.
[0]https://kotaku.com/why-gandhi-is-such-an-asshole-in-civiliza...
[0]https://kotaku.com/why-gandhi-is-such-an-asshole-in-civiliza...
It was only a bug in civ1, iirc, in the other ones they put it in intentionally.
This repo hasn't been updated in 3 years. Why did it get popular today?
People upvote just by reading the titles (in general, not just here).
I wonder how the front page rankings would differ if Hacker News (secretly?) only counted upvotes if the user actually clicked the article link (or at least loaded the comments thread and read for X minutes) before voting.
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:
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
See also a more full working open source civ game, FreeCiv
http://www.freeciv.org/
Please include a link in the repo to somewhere people can play it without having to figure out how it wants to be hosted.
i think its 10% complete, tested
its just 10% completed, tested
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
"I think it would be a very good idea"
- Gandhi, possibly
Today I learned that Gandhi destroys the world because of an integer overflow!
"In the earlier Civs, leaders are given a set of attributes that dictate their behavior. One such attribute is a number scale associated with aggressiveness. Gandhi was given the lowest number possible, a rating of 1. However, when a civilization adopted democracy, it granted a civilization -2 to opponent aggression levels. This sent Gandhi’s rating of 1 into the negative, which swung it back around to 255 — the highest possible rating available, and thus, the infamous warmonger Gandhi was born." [1]
[1] https://www.geek.com/games/why-gandhi-is-always-a-warmongeri...
"In the earlier Civs, leaders are given a set of attributes that dictate their behavior. One such attribute is a number scale associated with aggressiveness. Gandhi was given the lowest number possible, a rating of 1. However, when a civilization adopted democracy, it granted a civilization -2 to opponent aggression levels. This sent Gandhi’s rating of 1 into the negative, which swung it back around to 255 — the highest possible rating available, and thus, the infamous warmonger Gandhi was born." [1]
[1] https://www.geek.com/games/why-gandhi-is-always-a-warmongeri...
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.
I'll own up now and admit that I had no idea Gandhi had history in Civ (I'm not a gamer)
My quip was accidentally genius!
My quip was accidentally genius!
There's another layer to your accidental genius. Gandhi could be very aggressive in civ due to a bug https://kotaku.com/why-gandhi-is-such-an-asshole-in-civiliza...
His opinion is backed by NUCLEAR WEAPONS!
At least it’s not Civ2:MGE
“What do you think of...”
We have decided to rid the world of your worthless civilization. Prepare for WAR!
- Gandhi, every damn time
“What do you think of...”
We have decided to rid the world of your worthless civilization. Prepare for WAR!
- Gandhi, every damn time
the global peace index: peaceful, peacefuller, peacefullest, complete and utter nuclear annihilation
this, at least, shouldn't be a problem in relatively civilized js.
this, at least, shouldn't be a problem in relatively civilized js.
That might end in the Typescript era.
Gah! You beat me to it:) Well played.
At the end of a turn, the only thing that happens is that units are healed (gold, science, production aren't implemented yet):
https://github.com/Venerons/CivJS/blob/master/js/game.js#L17...
There's no AI or anything like that implemented just yet.