Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

De-obfuscated source code

A topic by Tobias V. Langhoff created May 19, 2019 Views: 341 Replies: 9
Viewing posts 1 to 6
Submitted (1 edit)

Last time some of us shared the de-obfuscated (or de-minified) source code, which was pretty educational. Maybe someone has the time to do it this time around too?

itch strips empty lines from source code here, but here's a Gist with the original and "de-obfuscated" code for my game, Pico Puzzle League:

https://gist.github.com/tobiasvl/6e0da644783aee5296391c41c4f7195b

Submitted

Sweet. I'm certainly going to both break down and comment the minified/obfuscated version as well as rewrite some of the structures to be more traditional for explanation's sake.

HostSubmitted

I forgot that we did this last year! I might deobfuscate my code for Tower Hop and post it here, just cause I want to make a full version of that game.

Submitted

Id be willing to do it, but my code isn't great. It would take extra work too, because I've gotten in the habit of minifying my code in the middle of writing it.

Submitted (2 edits) (+2)

I think everyone does that, which is why I called it "de-obfuscated" instead of "un-obfuscated" ;) I definitely whittled away at the code while writing it in order to stuff everything in, otherwise it wouldn't be doable. Then I went over the 560 characters afterwards and expanded it. 

Submitted

Am I doing this right?

--rythm circle by pedro ramirez
--5/19/19
//initiating variables that //control the game states //(whether the game
//is running, high score
//the radius and color of the //circle, current points and
//the sound your input makes)
highscore=0
function _init()
    radius=63
    circcolor=0
 points=0
 x=64
 running=true
 sound=1
end

function _draw()
 //restart by calling the init
 //function
 if(btnp(🅾️))then
  _init()
 end
 //if you dont have a game  //over screen
 if(running==true)then
  //clear screen but use   //the opposite color the of   //the circle to avoid matching
  //colors and an invisible circle
  cls(circcolor+7)
  //print the points and high score
  print(points,1,1,circcolor)
  print(highscore,1,10,circcolor)
  //if user presses x then...
  if(btnp(❎))then
   //if the radius is between 2 and 10
   if(radius > 2 and radius < 10)then
    //there's only 4 keys i used
    //so it needs to reset after     //4 times you've pressed it
    if (sound < 5) then
        sound += 1
    else
     sound = 2
    end
    //increment the points, color
    //of the circle, reset
    //the radius of the circle,
    //play the sound in the key
    //you are in and loop the song
    //(by playing it again)
    points += 1
    circcolor += 1
    radius = 63
    sfx(sound)
    music(1)
   else
    //if you pressed the x key
    //and it wasn't in that range
    //then here's the game over     //condition. first set the
    //high score to the current
    //points if highscore is     //less than points
    if (highscore < points) then
        highscore = points
    end
    //end the game
    running = false       end
  end
 
 //draw the circle in green if
 //its between radius 10 to 2
 //so people kinda know
 //when they're supposed to know
 //when to press the button
 if (radius > 2 and radius < 10)then
     circ(x,x,radius,11)
 else
     //at all other radii the color
     //is set by the iterator
     circ(x,x,radius,circcolor)
 end
 //if radius is smaller than 2
 //you lose the game
 if(radius > 2)then
     radius = radius - 1
 elseif (radius == 2)then
     running = false
 end
 
 else
 //if you get game over,  //clear the screen and display
 //the message on how to restart
 cls(circcolor + 1)
 print("play again? press 🅾️", x/3,x,c)
 end
end

Submitted

If someone shows an interest in a de-obfuscated version of one of my games, I'll do it :)

Submitted

I'd be interested in a de-obfuscated version of Facetious Puzzle. :}

Submitted(+1)

I will do it soon then :)

Submitted

Here is the deobfuscated version of Facetious Puzzle :



You can read it online here : https://github.com/PFGimenez/facetious-puzzle/blob/master/facetious-puzzle-deobf...

Tell me if something is not clear :)