Results 1 to 10 of 16

Thread: Darkhog's challenge: Obfuscated drawing

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Quote Originally Posted by User137 View Post
    We meant empty window application with no bells and whistles, that take more than 1Mb. To display image, you do need to create a window right, or are we allowed to call Windows specific command, to for example launch Windows Photo Viewer on saved image?
    The executable of the biggest Allegro.pas 4.4.4 example (ex3d, that shows how to create and display a bunch or 3D textured cubes) is 153'1 KiB (not counting the Allegro library). This is on Fedora 18 64bit. Can't remember if it's bigger on Windows. [edit] Not sure if it's "X file is ... KiB" or "X file has ... KiB". In Spanish it's "has".[/edit]

    About the challenge, now I'm too lazy so I'll wait. But may be I try...
    Last edited by Ñuño Martínez; 18-07-2013 at 10:42 AM.
    No signature provided yet.

  2. #2

  3. #3
    I think you all are getting fixated on hi-level graphical APIs. There's one unit that would perfectly help with drawing B&W image.

    Hint: It is there since Turbo Pascal and on FPC it pops a window.

  4. #4
    We're not saying that it is impossible, but personally I don't find it interesting at all to try and make my executables as small as possible by using tools that I wont normally use. To me it seems like an unnecessary requirement for a challenge about drawing an image with obscure code.

    I might give this challenge a try, but I wont bother about size limit, and I think many other would be put off as well about the size limit if they can't use the tools they are familiar with.
    Imagine I've written something clever here inspiring you to make something awesome. If that happens give me credits

  5. #5
    PGD Staff / News Reporter phibermon's Avatar
    Join Date
    Sep 2009
    Location
    England
    Posts
    524
    presumably if I do store the image in my code and binary but succeed in obfuscating the fact that I did, then I win some chocolate? The hand drawn image contains very little geometric repetition in which you can really push the boat out in terms of generation, any program that does this would be pretty much be scan-line based with fixed or obfuscated data describing filled blocks etc or otherwise break the image down into the smallest procedurally replicable parts.

    I'd be up for an obfuscation challenge any day or night but if we're going to obfuscate the process of re-constructing an image then it'd be far nicer if that image had interesting structures to replicate.

    Plus an obfuscation challenge is very subjective, what may be indecipherable to one pascal coder might be perfectly fine for the next. Unfortunately the language is a very poor choice for obfuscation as it's strongly typed by design. A lot of the fun of a C obfuscation challenge comes from throwing off the reader with obscure syntax or by deliberately exploiting the non-type safe design blunder of such languages.

    I think it'd be a challenge just to write any obfuscated pascal code, at least in the classical, small code snippet sense. Obfuscation through sheer size (we've all done that ) or macros used to redefine language keywords etc are boring.
    When the moon hits your eye like a big pizza pie - that's an extinction level impact event.

  6. #6
    Just out of curiosity i tried to draw some graphics in small executable. I managed to fit the compiled Lazarus exe and source code under 60kb (or actually under 50kb i guess), and it draws a full color pixel map in a WinAPI window.

    Some limitations i noticed, is that simple types like TBitmap is not allowed. It uses interfaces which increases executable size by 1Mb or so. Anyway, it is doable.

    (The only thing i have in uses list is Windows)

    edit: I have finalized my entry. Up to you if i send it as private message or post public. I know it could be obfiscated to remove all line-change characters, but i left it at 137 lines
    Last edited by User137; 26-07-2013 at 03:36 AM.

  7. #7
    Under Darkhog's permission, i'll post my submission in this thread. That is under 50kb when extracted:
    https://www.dropbox.com/s/nk8u6a0bwv...window_obf.zip

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •