Solutions for Idle Game. Sub-optimal and over-engineered.
Intro
Each script listing is ready to be copied and pasted into the files that the game provides.
Stage #1
for (let i = 0; i < 4; i++) { MoveForward(); }
Stage #2
/// internal funcs let commands = []; function AddStep(f, n) { commands.push({f: f, n: n}); } /// adding commands to queue AddStep(MoveForward, 6); AddStep(TurnRight, 1); AddStep(MoveForward, 6); AddStep(TurnRight, 1); AddStep(MoveForward, 4); /// execute queue for (let m = 0; m < commands.length; m++) { let command = commands[m]; for (let i = 0; i < command.n; i++) { command.f(); } }
Stage #3
/// internal funcs let commands = []; function AddStep(f, n) { commands.push({f: f, n: n}); } /// adding commands to queue AddStep(TurnRight, 3); AddStep(MoveForward, 2); AddStep(TurnRight, 3); AddStep(MoveForward, 4); AddStep(TurnRight, 3); AddStep(MoveForward, 4); AddStep(TurnRight, 1); AddStep(MoveForward, 2); AddStep(TurnRight, 1); AddStep(MoveForward, 9); /// execute queue for (let m = 0; m < commands.length; m++) { let command = commands[m]; for (let i = 0; i < command.n; i++) { command.f(); } }
Stage #4
/// internal funcs let commands = []; let loop = []; function AddStep(tgtArr, f, n) { tgtArr.push({f: f, n: n}); } /// adding commands to queue - getting into position AddStep(commands, TurnRight, 2); AddStep(commands, MoveForward, 2); ///loop - version without "+1 capacity" upgrade /* AddStep(loop, MoveForward, 8); AddStep(loop, TurnRight, 1); AddStep(loop, MoveForward, 2); AddStep(loop, TurnRight, 2); AddStep(loop, MoveForward, 5); AddStep(loop, TurnLeft, 1); AddStep(loop, MoveForward, 8); AddStep(loop, TurnLeft, 1); AddStep(loop, DoNothing, 4); AddStep(loop, MoveForward, 2); AddStep(loop, TurnRight, 2); AddStep(loop, MoveForward, 2); AddStep(loop, TurnRight, 2); AddStep(loop, MoveForward, 3); AddStep(loop, TurnLeft, 1); */ ///loop - simplified for "+1 capacity" upgrade AddStep(loop, MoveForward, 8); AddStep(loop, TurnRight, 1); AddStep(loop, MoveForward, 2); AddStep(loop, TurnRight, 2); AddStep(loop, MoveForward, 5); AddStep(loop, TurnLeft, 1); AddStep(loop, MoveForward, 8); AddStep(loop, TurnLeft, 1); AddStep(loop, DoNothing, 5); AddStep(loop, MoveForward, 3); AddStep(loop, TurnLeft, 1); /// execute queue for (let m = 0; m < commands.length; m++) { let command = commands[m]; for (let i = 0; i < command.n; i++) { command.f(); } } /// execute loop while(true){ for (let m = 0; m < loop.length; m++) { let command = loop[m]; for (let i = 0; i < command.n; i++) { command.f(); } } }
Stage #5
/// internal funcs function AddStep(tgtArr, f, n) { tgtArr.push({f: f, n: n}); } function Exec(queue){ for (let m = 0; m < queue.length; m++) { let command = queue[m]; for (let i = 0; i < command.n; i++) { command.f(); } } } /// defining queues let getInPos = []; AddStep(getInPos, MoveForward, 4); AddStep(getInPos, TurnLeft, 1); AddStep(getInPos, MoveForward, 1); AddStep(getInPos, TurnLeft, 2); let loop = []; AddStep(loop, MoveForward, 4); AddStep(loop, TurnRight, 1); AddStep(loop, MoveForward, 1); AddStep(loop, TurnLeft, 1); AddStep(loop, MoveForward, 1); AddStep(loop, TurnRight, 1); AddStep(loop, MoveForward, 9); AddStep(loop, TurnLeft, 1); AddStep(loop, MoveForward, 2); AddStep(loop, TurnLeft, 2); AddStep(loop, MoveForward, 7); AddStep(loop, TurnRight, 1); AddStep(loop, MoveForward, 2); AddStep(loop, TurnLeft, 1); AddStep(loop, MoveForward, 5); AddStep(loop, TurnRight, 1); AddStep(loop, MoveForward, 7); //jst abov e the 'mixer' AddStep(loop, TurnRight, 1); AddStep(loop, MoveForward, 1); AddStep(loop, TurnLeft, 1); AddStep(loop, MoveForward, 1); AddStep(loop, DoNothing, 6); let loopEnd1 = []; //init AddStep(loopEnd1, TurnRight, 1); AddStep(loopEnd1, MoveForward, 4); let loopEnd2 = []; //cash in AddStep(loopEnd2, MoveForward, 1); AddStep(loopEnd2, TurnLeft, 1); AddStep(loopEnd2, MoveForward, 3); AddStep(loopEnd2, TurnLeft, 1); AddStep(loopEnd2, MoveForward, 5); AddStep(loopEnd2, TurnLeft, 1); AddStep(loopEnd2, MoveForward, 7); AddStep(loopEnd2, TurnRight, 1); AddStep(loopEnd2, MoveForward, 2); AddStep(loopEnd2, TurnRight, 2); AddStep(loopEnd2, MoveForward, 6); AddStep(loopEnd2, TurnRight, 1); /// execute queue Exec(getInPos); /// execute loop Exec(loop); Exec(loopEnd1); while(true){ Exec(loop); Exec(loopEnd2); }
Stage #6
/// internal funcs function AddStep(tgtArr, f, n) { tgtArr.push({f: f, n: n}); } function Exec(queue){ for (let m = 0; m < queue.length; m++) { let command = queue[m]; for (let i = 0; i < command.n; i++) { command.f(); } } } /// wrappers function F(){ MoveForward(); } function R(){ TurnRight(); } function L(){ TurnLeft(); } function N(){ DoNothing() } /// defining queues let getInPos = []; AddStep(getInPos, R, 1); AddStep(getInPos, F, 3); AddStep(getInPos, R, 1); AddStep(getInPos, F, 5); //top left corner button AddStep(getInPos, R, 2); let loop = []; AddStep(loop, F, 7); AddStep(loop, R, 2); AddStep(loop, F, 2); AddStep(loop, R, 1); AddStep(loop, F, 5); AddStep(loop, R, 2); AddStep(loop, N, 6); AddStep(loop, F, 5); AddStep(loop, R, 1); AddStep(loop, F, 5); AddStep(loop, R, 2); /// execute queue Exec(getInPos); /// execute loop while(true){ Exec(loop); }
Worker2:
/// internal funcs function AddStep(tgtArr, f, n) { tgtArr.push({f: f, n: n}); } function Exec(queue){ for (let m = 0; m < queue.length; m++) { let command = queue[m]; for (let i = 0; i < command.n; i++) { command.f(); } } } /// wrappers function F(){ MoveForward(); } function R(){ TurnRight(); } function L(){ TurnLeft(); } function N(){ DoNothing() } /// defining queues let getInPos = []; AddStep(getInPos, F, 2); AddStep(getInPos, R, 1); AddStep(getInPos, F, 3); AddStep(getInPos, L, 1); //before the right part path AddStep(getInPos, N, 3); let loop = []; AddStep(loop, F, 3); AddStep(loop, L, 1); AddStep(loop, F, 5); AddStep(loop, L, 1); AddStep(loop, F, 6); AddStep(loop, L, 1); AddStep(loop, F, 8); AddStep(loop, L, 1); AddStep(loop, F, 1); AddStep(loop, N, 4); //cash in AddStep(loop, F, 2); AddStep(loop, L, 1); AddStep(loop, F, 3); AddStep(loop, R, 1); /// execute queue Exec(getInPos); /// execute loop while(true){ Exec(loop); }
Stage #7
/// internal funcs function AddStep(tgtArr, f, n) { tgtArr.push({f: f, n: n}); } function Exec(queue){ for (let m = 0; m < queue.length; m++) { let command = queue[m]; for (let i = 0; i < command.n; i++) { command.f(); } } } /// wrappers function F(){ MoveForward(); } function R(){ TurnRight(); } function L(){ TurnLeft(); } function N(){ DoNothing() } //ThrowItem function T(){ ThrowItem(0); } //ThrowAll function ThrowAll(){ let items = GetWorkerInventoryItems(); for (let i = 0; i < items.length; i++){ ThrowItem(0); } } function TA(){ ThrowAll(); } //WaitSync function WaitSync(){ while(!SyncWorkers()){ //N(); } } function W(){ WaitSync(); } /// defining queues let getInPos = []; let initToLB = []; AddStep(initToLB, F, 5); AddStep(initToLB, R, 1); AddStep(initToLB, F, 2); //left button AddStep(initToLB, R, 2); //looking right let LBToExchange = []; AddStep(LBToExchange, F, 8); AddStep(LBToExchange, R, 1); AddStep(LBToExchange, F, 2); AddStep(LBToExchange, L, 1); AddStep(LBToExchange, F, 1); AddStep(LBToExchange, R, 1); //below mixer, exchange point, looking down let Exchange = []; AddStep(Exchange, W, 1); AddStep(Exchange, TA, 1); AddStep(Exchange, W, 1); let loop = []; AddStep(loop, R, 1); AddStep(loop, F, 1); AddStep(loop, R, 1); AddStep(loop, F, 1); AddStep(loop, N, 5); //filling mixer AddStep(loop, F, 1); AddStep(loop, L, 1); AddStep(loop, F, 8); AddStep(loop, R, 2); AddStep(loop, F, 11); AddStep(loop, R, 1); AddStep(loop, F, 2); AddStep(loop, R, 1); AddStep(loop, F, 2); AddStep(loop, L, 1); //back to exchange point /// execute queue Exec(initToLB); Exec(LBToExchange); Exec(Exchange); /// execute loop while(true){ Exec(loop); Exec(Exchange); }
Worker2:
/// internal funcs function AddStep(tgtArr, f, n) { tgtArr.push({f: f, n: n}); } function Exec(queue){ for (let m = 0; m < queue.length; m++) { let command = queue[m]; for (let i = 0; i < command.n; i++) { command.f(); } } } /// wrappers function F(){ MoveForward(); } function R(){ TurnRight(); } function L(){ TurnLeft(); } function N(){ DoNothing() } //ThrowItem function T(){ ThrowItem(0); } //ThrowAll function ThrowAll(){ let items = GetWorkerInventoryItems(); for (let i = 0; i < items.length; i++){ ThrowItem(0); } } function TA(){ ThrowAll(); } //WaitSync function WaitSync(){ while(!SyncWorkers()){ //N(); } } function W(){ WaitSync(); } /// defining queues let initToEntrance = []; AddStep(initToEntrance, R, 1); AddStep(initToEntrance, F, 2); AddStep(initToEntrance, N, 5); //before entrance let Exchange = []; AddStep(Exchange, W, 1); AddStep(Exchange, TA, 1); AddStep(Exchange, W, 1); let entranceToExchange = []; AddStep(entranceToExchange, F, 2); AddStep(entranceToExchange, L, 1); AddStep(entranceToExchange, F, 2); AddStep(entranceToExchange, R, 1); AddStep(entranceToExchange, F, 3); AddStep(entranceToExchange, R, 1); AddStep(entranceToExchange, F, 6); AddStep(entranceToExchange, R, 1); AddStep(entranceToExchange, F, 2); AddStep(entranceToExchange, L, 1); AddStep(entranceToExchange, F, 1); //exchange point let ExchangeToEntrance = []; AddStep(ExchangeToEntrance, R, 1); AddStep(ExchangeToEntrance, F, 7); AddStep(ExchangeToEntrance, R, 1); AddStep(ExchangeToEntrance, F, 5); //receiver AddStep(ExchangeToEntrance, R, 1); AddStep(ExchangeToEntrance, F, 4); //entrance /// execute queue Exec(initToEntrance); Exec(entranceToExchange); Exec(Exchange); /// execute loop while(true){ Exec(ExchangeToEntrance); Exec(entranceToExchange); Exec(Exchange); }
Stage #8
/// internal funcs function AddStep(tgtArr, f, n) { tgtArr.push({f: f, n: n}); } function Exec(queue){ for (let m = 0; m < queue.length; m++) { let command = queue[m]; for (let i = 0; i < command.n; i++) { command.f(); } } } /// compound commands function ThrowAll(){ let items = GetWorkerInventoryItems(); for (let i = 0; i < items.length; i++){ ThrowItem(0); } } function WaitSync(){ while (!SyncWorkers()) {} } /// wrappers/shortcuts function F() { MoveForward(); } function R() { TurnRight(); } function L() { TurnLeft(); } function N() { DoNothing(); } function T() { ThrowItem(0); } function TA() { ThrowAll(); } function W() { WaitSync(); } /// defining queues let init = []; AddStep(init, F, 1); AddStep(init, R, 1); AddStep(init, F, 5); //UR button let loop = []; //loop without mixer output AddStep(loop, F, 2); AddStep(loop, L, 1); AddStep(loop, F, 4); //exchange corner AddStep(loop, W, 1); AddStep(loop, W, 1); AddStep(loop, TA, 1); //throw plat chip, if any AddStep(loop, W, 1); AddStep(loop, W, 1); //take red chips AddStep(loop, L, 1); AddStep(loop, F, 2); AddStep(loop, L, 1); AddStep(loop, F, 2); //plat mixer intake AddStep(loop, N, 3); AddStep(loop, F, 2); //back to button AddStep(loop, L, 1); let loop2 = []; //loop with mixer output visit AddStep(loop2, F, 2); AddStep(loop2, L, 1); AddStep(loop2, F, 4); //exchange corner AddStep(loop2, W, 1); AddStep(loop2, W, 1); AddStep(loop2, TA, 1); //throw plat chip, if any AddStep(loop2, W, 1); AddStep(loop2, W, 1); //take red chips AddStep(loop2, L, 1); AddStep(loop2, F, 2); AddStep(loop2, L, 1); AddStep(loop2, F, 2); //plat mixer intake AddStep(loop2, N, 3); AddStep(loop2, F, 1); AddStep(loop2, R, 1); AddStep(loop2, F, 3); AddStep(loop2, R, 1); AddStep(loop2, F, 1); //plat output AddStep(loop2, N, 7); AddStep(loop2, F, 1); AddStep(loop2, R, 1); AddStep(loop2, F, 3); AddStep(loop2, R, 1); AddStep(loop2, F, 1); AddStep(loop2, N, 1); AddStep(loop2, F, 2); AddStep(loop2, L, 1); /// execute one-off Exec(init); /// execute in loop while(true){ Exec(loop); //2 chips in mixer Exec(loop); //4 Exec(loop2); //1 Exec(loop); //3 Exec(loop2); //0 }
Worker2:
/// internal funcs function AddStep(tgtArr, f, n) { tgtArr.push({f: f, n: n}); } function Exec(queue){ for (let m = 0; m < queue.length; m++) { let command = queue[m]; for (let i = 0; i < command.n; i++) { command.f(); } } } /// compound commands function ThrowAll(){ let items = GetWorkerInventoryItems(); for (let i = 0; i < items.length; i++){ ThrowItem(0); } } function WaitSync(){ while (!SyncWorkers()) {} } /// wrappers/shortcuts function F() { MoveForward(); } function R() { TurnRight(); } function L() { TurnLeft(); } function N() { DoNothing(); } function T() { ThrowItem(0); } function TA() { ThrowAll(); } function W() { WaitSync(); } /// defining queues let init = []; AddStep(init, R, 2); AddStep(init, F, 1); AddStep(init, L, 1); AddStep(init, F, 1); let loop = []; AddStep(loop, F, 1); AddStep(loop, L, 1); AddStep(loop, F, 2); AddStep(loop, R, 1); AddStep(loop, F, 4); AddStep(loop, R, 1); AddStep(loop, F, 4); AddStep(loop, L, 1); AddStep(loop, W, 1); AddStep(loop, F, 9); AddStep(loop, R, 1); AddStep(loop, F, 2); //lower mixer AddStep(loop, R, 2); AddStep(loop, N, 3); AddStep(loop, F, 1); AddStep(loop, L, 1); AddStep(loop, F, 6); AddStep(loop, L, 1); AddStep(loop, F, 2); //exchange corner AddStep(loop, W, 1); AddStep(loop, R, 1); AddStep(loop, W, 1); AddStep(loop, W, 1); AddStep(loop, F, 5); AddStep(loop, R, 1); AddStep(loop, F, 5); AddStep(loop, L, 1); AddStep(loop, F, 8); AddStep(loop, R, 1); AddStep(loop, F, 1); AddStep(loop, R, 2); //cash in AddStep(loop, F, 1); AddStep(loop, L, 1); AddStep(loop, F, 5); /// execute one-off Exec(init); /// execute in loop while(true){ Exec(loop); }
Worker3:
/// internal funcs function AddStep(tgtArr, f, n) { tgtArr.push({f: f, n: n}); } function Exec(queue){ for (let m = 0; m < queue.length; m++) { let command = queue[m]; for (let i = 0; i < command.n; i++) { command.f(); } } } /// compound commands function ThrowAll(){ let items = GetWorkerInventoryItems(); for (let i = 0; i < items.length; i++){ ThrowItem(0); } } function WaitSync(){ while (!SyncWorkers()) {} } /// wrappers/shortcuts function F() { MoveForward(); } function R() { TurnRight(); } function L() { TurnLeft(); } function N() { DoNothing(); } function T() { ThrowItem(0); } function TA() { ThrowAll(); } function W() { WaitSync(); } /// defining queues let init = []; AddStep(init, F, 2); let loop = []; AddStep(loop, F, 11); AddStep(loop, L, 1); AddStep(loop, F, 5); AddStep(loop, L, 1); //before collecting chips row AddStep(loop, W, 1); AddStep(loop, F, 4); AddStep(loop, L, 1); AddStep(loop, F, 1); AddStep(loop, R, 1); AddStep(loop, F, 3); AddStep(loop, R, 1); AddStep(loop, F, 1); AddStep(loop, R, 1); AddStep(loop, F, 2); AddStep(loop, L, 1); AddStep(loop, F, 1); AddStep(loop, L, 1); AddStep(loop, N, 4); //upper mixer AddStep(loop, F, 1); AddStep(loop, R, 1); AddStep(loop, F, 3); AddStep(loop, R, 1); //above red chip row AddStep(loop, F, 3); AddStep(loop, R, 2); AddStep(loop, N, 3); AddStep(loop, F, 2); AddStep(loop, R, 1); AddStep(loop, F, 2); //exchange corner AddStep(loop, W, 1); AddStep(loop, W, 1); AddStep(loop, TA, 1); AddStep(loop, W, 1); AddStep(loop, L, 1); //back to UL button AddStep(loop, F, 6); AddStep(loop, L, 1); AddStep(loop, F, 11); AddStep(loop, L, 1); /// execute one-off Exec(init); /// execute in loop while(true){ Exec(loop); }
About
Solutions themselves are far from optimal, especially in later stages – they are just a quick and dirty way to complete the levels. But they should perform well enough to pass the stages in a reasonable time.
And yes, code style is inconsistent, unfortunately, to be fixed in v2.
Thanks to Zelnogrard for his excellent guide, all credit to his effort. if this guide helps you, please support and rate it via Steam Community. enjoy the game.
Related Posts:
- Outcore: Coding Mini Game Walkthrough
- Outcore: How to Reset the Game (Deleting the Save)
- Outcore: The Last File Section Guide
Nice