monica_b1998@programming.dev to Programming@programming.devEnglish · 5 months ago"Goldmine" - an idle game in 200 lines of pure JavaScriptslicker.meexternal-linkmessage-square14fedilinkarrow-up143arrow-down10cross-posted to: programming@programming.dev
arrow-up143arrow-down1external-link"Goldmine" - an idle game in 200 lines of pure JavaScriptslicker.memonica_b1998@programming.dev to Programming@programming.devEnglish · 5 months agomessage-square14fedilinkcross-posted to: programming@programming.dev
minus-squarev9CYKjLeia10dZpz88iU@programming.devlinkfedilinkarrow-up15·5 months ago 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())));
minus-squarekey@lemmy.keychat.orglinkfedilinkEnglisharrow-up11arrow-down1·5 months agoIt takes like 5 minutes to beat…
minus-squarev9CYKjLeia10dZpz88iU@programming.devlinkfedilinkarrow-up13·5 months agobut do you have zombie mode? zombie mode spritesheetImg.src="https://i.imgur.com/Frt8JKU.png"
minus-squaremonica_b1998@programming.devOPlinkfedilinkarrow-up12·5 months agoi’m relieved to see that zombies are willing to perform the same slave labor as humans :-)
minus-squareMrLLM@ani.sociallinkfedilinkEnglisharrow-up4·edit-24 months ago 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 :)
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())));
It takes like 5 minutes to beat…
but do you have zombie mode?
zombie mode
spritesheetImg.src="https://i.imgur.com/Frt8JKU.png"
i’m relieved to see that zombies are willing to perform the same slave labor as humans :-)
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
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 :)
thanks!