Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: Darkhog's challenge: Obfuscated drawing

  1. #1

    Darkhog's challenge: Obfuscated drawing

    I've decided to live up this community a bit.

    The challenge is following:
    You need to draw following picture:


    You CANNOT store it in anyway in program, it must be procedurally generated.

    Image must appear EXACTLY as shown above.

    You need to obfuscate ALL your code as you go. Only manual obfuscation allowed.

    Binary AND source code COMBINED cannot exceed 300kb.

    You can use any pascal-capable graphic library, including ports of C libraries. Be advised though, that any of DLLs used aside of stuff that comes with WinAPI or standard Linux APIs counts to size limit, even if it isn't written by you.

    Deadline: Nov, 16th.

  2. #2
    Quote Originally Posted by Darkhog View Post
    Image must appear EXACTLY as shown above.
    For this you would either need to store the picture in your program, or use exactly smae steps to produce the image as you did and that is quite dificult withput knowing the steps you did.


    Quote Originally Posted by Darkhog View Post
    Binary AND source code COMBINED cannot exceed 300kb.
    This can be quite hard as some graphical libraries already exceeds this limit.
    Also if I create a New Application with blank form in Delphi XE3 with default project options the executable size already Exceeds 10 MB. I gues to many libraries get linked into it even thou they are not even being used.
    EDIT: Most of this space is being used by Debug information so if I compile that Application without debug information its size drops to some over 2MB in size.

    EDIT2: Creating new LCL application in Lazarus without debug information also generates Executable whose size exceeds 1.5 MB.
    So creating an executable with less than 300k in size would be a big challenge already. And this would probably draw pepole away from even atempting your challenge.
    Last edited by SilverWarior; 17-07-2013 at 08:52 PM.

  3. #3
    It's possible to make console application that small, to save such image in a file. But drawing on screen does close out any standard GUI methods. OpenGL, DirectX, SDL and Allegro are all out of question i assume.

    And you couldn't have picked any more provocative base image

  4. #4
    Quote Originally Posted by Darkhog View Post
    You CANNOT store it in anyway in program, it must be procedurally generated.
    I take that you mean that you cannot store the image as an exact bitmap? Obviously the image must be represented in the code somehow.

    Quote Originally Posted by Darkhog View Post
    Binary AND source code COMBINED cannot exceed 300kb.

    You can use any pascal-capable graphic library, including ports of C libraries. Be advised though, that any of DLLs used aside of stuff that comes with WinAPI or standard Linux APIs counts to size limit, even if it isn't written by you.

    Deadline: Nov, 16th.
    As mentioned by other users this seems as a strict requirement. Why even put a size limit? As I see it the interesting part is to generate the image and apparently make your code unreadable.
    Imagine I've written something clever here inspiring you to make something awesome. If that happens give me credits

  5. #5
    Why size req? Because I want to see how much code you can squeeze into 300kb (combined sources and exe). You can add as many "bells and whistles" as you like as long as it performs task. Drawing this image doesn't need to be ONLY thing your code will perform, but it must be ONE OF THEM.

  6. #6
    Quote Originally Posted by Darkhog View Post
    Why size req? Because I want to see how much code you can squeeze into 300kb (combined sources and exe). You can add as many "bells and whistles" as you like as long as it performs task. Drawing this image doesn't need to be ONLY thing your code will perform, but it must be ONE OF THEM.
    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?

    About the image complexity (120x120), it would be required to write a simple additional tool which generates some code. By the code i don't mean directly a pixelmap, but it can be different representation of it. I can't imagine anyone reading all the pixel-coordinates by hand.

    I like similar challenges, but this doesn't seem thought through. Is the intention of this contest, to find out all possible ways to make small-executable visual demos?

  7. #7
    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.

  8. #8

  9. #9
    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.

  10. #10
    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

Page 1 of 2 12 LastLast

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
  •