Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
Codidactyl game and code - creation process and obfuscation
I am interested in knowing how the recent Codidactyl game and its code were created and obfuscated. See the non-announcement.
From other posts, it appears that luap42 and Monica Cellio may have worked on it. I was able to format the code easily and see roughly what is happening, but the obfuscation was a beast. Without knowing what utility was used, it's hard to get a real look.
1 answer
Yo. Me here.
I used the code for the Codidactyl on the run as basis for the game, added a wrapper checking for the Konami-code by being a simple finite automaton and after that creating the canvas and loading the game. Then I made changes to the game code to support the new game type (fly instead of jump, sugar comes from both reactions at random heights).
The game uses HTML5 <canvas>
and runs a few async main loops (codidactylHandle for the Codidactyl, lollipopHandle for the objects, collisionHandle for checking for collisions and drawloop for erasing and redrawing the images). Furthermore, there has been an event-based jumpHandler, which reacts to the click/keydown event.
You can find the game source code in this GitHub Gist, which I also used to share it with the other team members a few days before April 1st (which was also the first time they heard of it): https://gist.github.com/luap42/4d788dffd602801492c536fce58129b3 [1]
The code has been obfuscated with https://obfuscator.io/, using the settings that seemed to be the most obfuscating to me.
Feel free to ask in the comments if you have any further questions.
-
Yes, the source code quality is low, but I think that's okay for a one-day April fools game. ↩︎
1 comment thread