"Goldmine" - an idle game in 200 lines of pure JavaScript
"Goldmine" - an idle game in 200 lines of pure JavaScript
There's a weird bug where you can get four workers per shaft. The 'hire worker' button at the end of the shaft disappears after you hire your third worker, but if you click where the button was, you will get a fourth worker for free.
15 0 Replythanks for letting me know! i'll have to fix it when i get a chance.
8 0 ReplyI found the problem - there should be no "=" in this part of line 222: shaft.workers.length <= shaft.max_workers
i'll update it on the website tomorrow. thanks for catching that! Somehow I hadn't tested clicking an invisible button...
3 0 Reply
cheat codes for console
Infinite wealth
score = 100_000_000_000;
Open all shafts
shaftsOpen = 10;
Add 1 worker to all shafts
Array(shaftsOpen).fill(0).map((_, i) => (shafts[i].workers.push(new Worker())));
15 0 ReplyIt takes like 5 minutes to beat...
11 0 Replybut do you have zombie mode?
zombie mode
spritesheetImg.src="https://i.imgur.com/Frt8JKU.png"
13 0 Reply
More cheat codes for console
Instant travel speed for the lift
lift.y = 0; lift.speed = 30;
Allow up to 100 workers on the first floor
shafts[0].max_workers = 100;
Allow up to 10 workers per shaft
for (let i = 1; i < max_shafts; i++) shafts[i].max_workers = 10;
Despawn all workers
shafts.forEach((shaft) => { shaft.workers = []; });
Accelerate the game x10 (this might be more power hungry)
Array.from(Array(10)).forEach(() => animate());
Get paid $10 for hiring a worker (you pay $5 and receive $10)
shafts.forEach((shaft) => shaft.workers.push = function () { score += 10; return Array.prototype.push.apply(this, arguments); });
Cool game OP :)
4 0 Replythanks!
1 0 Reply
I put 3000 workers in each shaft and now it lags. pls fix
11 0 Replyi see on the screenshot you have a lot of cash, maybe buy a faster processor? ;-)
12 0 Reply
There's a bug! You can click buttons once after they disappear.
9 0 ReplyI did it!
6 0 Replycongrats!
4 0 Reply