Author Topic: Compression Challenge  (Read 25484 times)

0 Members and 1 Guest are viewing this topic.

Offline Builderboy

  • Physics Guru
  • Project Author
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Compression Challenge
« on: December 08, 2010, 07:16:09 pm »
So i have started working on the title screen, and it is quite detailed and i want to refrain from just posting all 768 bytes into the program, as i feel that would be a bit large.  And so, i have decided to make a compression challenge!  Whoever can compress this screen into the least number of bytes will get their name in the credits and my eternal respect and gratitude :D Note that the final size should include everything that is needed to put the screen into L6, through whatever means necessary.

Note: I decided to release the real title screen :P
« Last Edit: December 08, 2010, 07:37:59 pm by Builderboy »

Offline Runer112

  • Moderator
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Compression Challenge
« Reply #1 on: December 08, 2010, 07:23:51 pm »
* Runer112 accepts your challenge >:D

EDIT: I should ask: what drawing routines will already exist in the program? I don't want to use the rectangle routine, for instance, if it doesn't already exist and adding it would inflate the code larger than using some other method.
« Last Edit: December 08, 2010, 07:25:26 pm by Runer112 »

Offline nemo

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1203
  • Rating: +95/-11
    • View Profile
Re: Compression Challenge
« Reply #2 on: December 08, 2010, 07:24:17 pm »
Do you use Rect()/RectI() in portal's code already? because then the routines are only like 15 bytes to call instead of having to include a 200 byte subroutine.
by the way, the image is 192 x 134... is that intentional?
« Last Edit: December 08, 2010, 07:24:48 pm by nemo »


Offline Builderboy

  • Physics Guru
  • Project Author
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Compression Challenge
« Reply #3 on: December 08, 2010, 07:27:53 pm »
Yes rect and rectI() are both used, including line() and all the pixel/sprite commands.  As for the size, D: i'll upload a new version really quick

Offline nemo

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1203
  • Rating: +95/-11
    • View Profile
Re: Compression Challenge
« Reply #4 on: December 08, 2010, 07:29:53 pm »
Yes rect and rectI() are both used, including line() and all the pixel/sprite commands.  As for the size, D: i'll upload a new version really quick

unless you plan on having a title screen that can scroll an amazing..... three pixels!


Offline Builderboy

  • Physics Guru
  • Project Author
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Compression Challenge
« Reply #5 on: December 08, 2010, 07:30:53 pm »
Haha negative :P

Offline willrandship

  • Omnimagus of the Multi-Base.
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2953
  • Rating: +98/-13
  • Insert sugar to begin programming subroutine.
    • View Profile
Re: Compression Challenge
« Reply #6 on: December 08, 2010, 07:40:35 pm »
wouldn't that be three screens?

Offline Builderboy

  • Physics Guru
  • Project Author
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Compression Challenge
« Reply #7 on: December 08, 2010, 07:41:30 pm »
Hmm?  In what way?

Offline nemo

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1203
  • Rating: +95/-11
    • View Profile
Re: Compression Challenge
« Reply #8 on: December 08, 2010, 07:45:22 pm »
can the screen be assumed cleared?


Offline Builderboy

  • Physics Guru
  • Project Author
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Compression Challenge
« Reply #9 on: December 08, 2010, 07:45:40 pm »
Sure

Offline Runer112

  • Moderator
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Compression Challenge
« Reply #10 on: December 08, 2010, 07:56:13 pm »
Does the DrawInv routine already exist?

Offline Builderboy

  • Physics Guru
  • Project Author
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Compression Challenge
« Reply #11 on: December 08, 2010, 08:04:15 pm »
Nope

Offline nemo

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1203
  • Rating: +95/-11
    • View Profile
Re: Compression Challenge
« Reply #12 on: December 08, 2010, 08:04:41 pm »
RotCC/RotC?


Offline Builderboy

  • Physics Guru
  • Project Author
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Compression Challenge
« Reply #13 on: December 08, 2010, 08:07:59 pm »
Nope

Offline Runer112

  • Moderator
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Compression Challenge
« Reply #14 on: December 08, 2010, 09:52:48 pm »
The tricky part of this is trying to compress it in a way that the size of the code itself doesn't offset the amount of data saved, because not much data is being compressed.

But I got 608 bytes. Storing the data as a raw picture and putting it onto the screen and buffer would take 777 bytes. If anyone gets any better, let me (and Builderboy) know.

EDIT: 606 bytes.

EDIT 2: 605 bytes.

EDIT 3: 602 bytes. I think this is as small as I'm going to get it, so I'm attaching what I have. I included two versions because, although the second is 2 bytes larger than the first, you might consider it better. Whereas the second one updates the screen all at once, the first one updates the screen 4 times throughout the process due to the Bitmap() calls drawing directly to the screen. This slight delay isn't very noticable, but I figure I'll just give you both options.
« Last Edit: December 08, 2010, 11:12:13 pm by Runer112 »