Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics

Dashboard
Notifications
Mark all as read
Meta

Codidactyl game and code - creation process and obfuscation

+7
−0

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.

Why does this post require moderator attention?
You might want to add some details to your flag.
Why should this post be closed?

4 comments

My contribution was to say "sounds neat" when luap42 shared the code for review. :-) Monica Cellio‭ 3 days ago

It would be fine to ask this on meta. But currently, "asking to explain what a certain code does, unless they are small and an attempt to understand them is also added" is listed as off-topic for this site. https://software.codidact.com/help/on-topic. The meta discussion thread can be found here: https://software.codidact.com/posts/278648. As for whether obfuscation in itself is off-topic: no it isn't. I proposed to make it off-topic but there was no clear community consensus. Lundin‭ 3 days ago

@Lundin But the Q is not about explaining a code. TS is asking what tool was used to obfuscate the code. FoggyFinder‭ 3 days ago

As currently written, I also think this belongs more to meta than the main site. I will try to figure out a way to migrate it there and reopen it (have an issue with migration due to meta tags). Alexei‭ 2 days ago

1 answer

+7
−0

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.


  1. Yes, the source code quality is low, but I think that's okay for a one-day April fools game. ↩︎

Why does this post require moderator attention?
You might want to add some details to your flag.

0 comments

Sign up to answer this question »