krajzeg / compact-conflict Goto Github PK
View Code? Open in Web Editor NEWA minuscule Risk-based strategy game for JS13k 2014.
License: Other
A minuscule Risk-based strategy game for JS13k 2014.
License: Other
If you configure the game to have all AI players, then while they are playing, interrupt it by clicking the start new game button in the lower right, then you get:
Uncaught TypeError: Cannot set property 'innerHTML' of null
I think I found another one.
I believe that
var invincibility = upgradeLevel(state, fromOwner, FIRE);
should be
var invincibility = upgradeLevel(state, toOwner, FIRE);
because the invincibility value is for the guy being attacked.
If invincibility >0 and they lose the roll, then it says "Protected by fire!".
@krajzeg, I noticed what is probably a bug on this line:
var better = (!node.b) || (maximizingNode && (child.v > node.v)) || ((!maximizingNode) && (child.v < node));
I think it should be
var better = (!node.b) || (maximizingNode && (child.v > node.v)) || ((!maximizingNode) && (child.v < node.v));
Overall, this is an awesome game and I really enjoy playing it! That being said, there is a bug with income calculation that affects gameplay.
Toward the end of the game, the last AI parks its troops at a temple, meaning that its troop count is included in the income calculation. It never moves its troops, meaning that it gets stuck in a [use troops to generate income] --> [use income to buy troops] --> [use troops to generate income] --> [...] positive feedback loop. After a few iterations of this, the AI is able to generate a stupid amount of money each turn and grow its army to an unrealistic size.
This affects gameplay because the AI army quickly becomes too large to defeat. If the player figures out how the AI is generating so much money, the player can grow their army the same way and eventually defeat the AI. (I had to look at your code to figure out what was going on.) Otherwise, the AI could either overrun the player or just be unbeatable. Every time the player mobilizes their troops away from a temple to attack the AI, they are putting themselves at a disadvantage (the troops are not at the temple, and are therefore not included in income calculations). Here's what my gameplay looks like now:
I'm not quite sure how to fix it, but I'd start at line 1982. Keep up the good work!
Hi, guys! Maybe multiplayer version?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.