Bad Apple!! in Love2D

Show off your games, demos and other (playable) creations.
User avatar
raidho36
Party member
Posts: 2063
Joined: Mon Jun 17, 2013 12:00 pm

Re: Bad Apple!! in Love2D

Post by raidho36 »

I guess it's a bit late, but have you tried diff coding? It tends to produce much more compressible output for LZMA. There kinda already is a bit of it, since it only changes pixels between frames, but that's sub-optimal. Start with top left corner and some default value to "current" vlaue (e.g. black) and for each pixel, see if it's a different value than current one, write down the difference for that pixel. If it's the same, write 0. With such file, most of pixels are just zeroes or short patterns, this compresses exceptionally well with LZMA. You can extend diff-coding to previous line as well as previous pixel, and then to previous frame. This eventually produces very well compressible output.
User avatar
Segfaultd
Prole
Posts: 5
Joined: Sat Apr 09, 2016 12:04 am

Re: Bad Apple!! in Love2D

Post by Segfaultd »

raidho36 wrote:I guess it's a bit late, but have you tried diff coding? It tends to produce much more compressible output for LZMA. There kinda already is a bit of it, since it only changes pixels between frames, but that's sub-optimal. Start with top left corner and some default value to "current" vlaue (e.g. black) and for each pixel, see if it's a different value than current one, write down the difference for that pixel. If it's the same, write 0. With such file, most of pixels are just zeroes or short patterns, this compresses exceptionally well with LZMA. You can extend diff-coding to previous line as well as previous pixel, and then to previous frame. This eventually produces very well compressible output.
Great idea! I'll try to come with something here and see the results.
-- When I wrote those, only God and I understood what I was doing
-- Now, God only knows

local github = "https://github.com/danielpontello"
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 1 guest