Topic: JavaScript Demos Encoded in PNG Buttons Pages that link to <a href="https://ozoneasylum.com/backlink?for=32006" title="Pages that link to Topic: JavaScript Demos Encoded in PNG Buttons" rel="nofollow" >Topic: JavaScript Demos Encoded in PNG Buttons\

 
Author Thread
guciek
Neurotic (0) Inmate
Newly admitted

From:
Insane since: Oct 2010

IP logged posted posted 10-01-2010 13:19 Edit Quote

Hey, I registered on this forum to ask what you think about this idea:

http://guciek.net/en/articles/javascript_in_images

I basically thought to make 32x32 buttons that are HTML/JavaScript demos if you execute their uncompressed bytes as a HTML page

Maybe you have some demos that fit in 3k size that you could convert to buttons?

What do you think about a contest of "icon apps"?

poi
Paranoid (IV) Inmate

From: Norway
Insane since: Jun 2002

IP logged posted posted 10-01-2010 14:37 Edit Quote

funny to see JSpongy in there and a couple of JS1K entries ( missing Wolf1k ).

Wouldn't it be nicer if you used the low 2 to 4 bits of each component of each pixel. That way the whole 32x32 pixels would show a ( noisy but ) visual cue of what's to come. Agreed. At most it would provide ~1.5Kb of data but that's MORE than enough to do something cool.

poi
Paranoid (IV) Inmate

From: Norway
Insane since: Jun 2002

IP logged posted posted 10-01-2010 14:49 Edit Quote

Hope you don't mind, but seeing your "What do you thnk about a contest of icon apps ?", I threw a bone to @getify to use this cool idea for the JS1337 contest.

guciek
Obsessive-Compulsive (I) Inmate

From:
Insane since: Oct 2010

IP logged posted posted 10-01-2010 14:54 Edit Quote

Yeah, I really liked JSpongy, hope you don't mind.

I wanted to have at least about 3-4 k space in those buttons to allow for a different class of demos than JS1K...

I would go with your idea and enlarge the buttons to 48x58, but there's another thing - simplicity of compressing and decompressing. Anyone can just read and write code directly saved in PPM images, without the need for any special programs/scripts.

I did not include Wolf1k because the buttons provide 3k, so it would allow for a much more complete version of the game. If you ever make it, let me know :P

poi
Paranoid (IV) Inmate

From: Norway
Insane since: Jun 2002

IP logged posted posted 10-01-2010 15:26 Edit Quote

No problem.

But you're not distributing the PPM images, so it's not that important. Surely the encoder can be written in JavaScript. I for one am not a Linux guy and would definitely generate the combined JSxIMG in JavaScript instead of fiddling with some command line stuff.

About a bigger, more "complete" version of Wolf1k, FWIW I did 3D TOMB II a while back, a Doom like in less than 4Kb with actual gameplay, textured floor and ceiling, multiple enemies, ... But ~4Kb was the total size: including HTML, JS and 3 or 4 images. Not sure how that to easily embed such page into an image. My first guess is MHTML. ... also with the 3dtomb2 domain taken over I should move back all the 3D TOMB II files on my site.

guciek
Obsessive-Compulsive (I) Inmate

From:
Insane since: Oct 2010

IP logged posted posted 10-01-2010 16:02 Edit Quote

Some preaching is needed here. Every interface is a balance between being easy for novices and being fast for experts. Unix command line is the furthest to "fast for experts" side. Believe me, command line is THE way to use a computer

I never saw 3D Tomb II... and now it is not published anywhere? MHTML is a bad idea if you want it to be cross-browser. I'd say it is Data URLs to go. But I guess you should expect the game to grow to, say, 5k after embedding images this way.

About JS1337 - the name is not suitable, because 1337 = 191*7, so you cannot have a nice sized image that would yield this many bytes for an user script...

Maybe the guy could be persuaded to use some other name, even if he's emotionally attached to 1337

guciek
Obsessive-Compulsive (I) Inmate

From:
Insane since: Oct 2010

IP logged posted posted 10-01-2010 19:57 Edit Quote

poi, I thought about your suggestion and I think that with some trickery it should be possible to create nice images even when only having the highest bit free. In HTML/JS, you can easily insert whitespace and comments where you want, and for example white space has low ASCII codes, so it can be underlaid beneath any parts of an icon that needs clean colors. Additionally, you get as much as 9 colors, so it is not that bad for an icon!

It will make it harder to make nice icon, but then again, those that are nice will really stand out!

I went and made a contest site at http://imgjs.com - this is my view of how it should be, but of course I cannot make it alone... so what do you think and can you help?

coach
Nervous Wreck (II) Inmate

From:
Insane since: May 2011

IP logged posted posted 05-31-2011 11:00 Edit Quote
Edit TP: spam removed


Post Reply
 
Your User Name:
Your Password:
Login Options:
 
Your Text:
Loading...
Options:


« BackwardsOnwards »

Show Forum Drop Down Menu