Campaign on https://kampanj.bregott.se/home/ranking to promote their dairy products during the halloween period. First place is guaranteed to get a nice pair of earphones. The game itself is built on Construct 2 engine which is a game engine for people new to programming. Seems generally clunky, but not that relevant for this reversing task. The goal here is to disable generation of obstacles so that no actual brain cells are required to achieve a relatively high score.
By looking at the network tab you can see two files being generated - c2runtime.js and bmg_loader.js. The obvious first assumption here is that the first file is the actual engine and whatever code is in the other file is code that belongs to the game logic.
By observing some of the code in bmg_loader.js you can notice that console.log
gets undefined on the first line, which means that the developer doesn't want the user to see all the log messages. Understandable, because th