Live data from Hacker News

Show HN: My first WebGL demo, the first self-extracting PNG ever?

demoseen.com

1–10 of 56 posts

Re: Show HN: My first WebGL demo, the first self-extracting PNG ever?

#2
I've been working on this for a couple weeks, attempting to get it looking perfect and get it to 1kb. It's going to be going on stage at http://solskogen.no/ shortly, so I figured now is the perfect time to post.

As far as I know, this is the first ever case of a self-extracting PNG -- the file is a PNG that first is interpreted as HTML, which then unpacks the compressed code within the PNG to start the second stage. I plan to write a blog post about how I got the size down as far as it is, but feel free to ask any questions you may have, as I'd love to see this technique spread!

Edit: Requires Chrome and Firefox -- has been tested heavily on Windows and OS X, but this will eat your CPU and GPU alive.

Re: Show HN: My first WebGL demo, the first self-extracting PNG ever?

#4
post #2

I've been working on this for a couple weeks, attempting to get it looking perfect and get it to 1kb. It's going to be going on stage at http://solskogen.no/ shortly, so I figured now is the perfect time to post. As far as I know, this is the first ever case of a self-extracting PNG -- the file is a PNG that first is interpreted as HTML, which then unpacks the compressed code within the PNG to start the second stage.…

Pretty cool hack! I'm looking forward to the blog post.

It doesn't seem to eat my processor too much. In Chrome with AMD processor it's sitting at about 25% CPU usage.

Re: Show HN: My first WebGL demo, the first self-extracting PNG ever?

#5
post #4
post #2

I've been working on this for a couple weeks, attempting to get it looking perfect and get it to 1kb. It's going to be going on stage at http://solskogen.no/ shortly, so I figured now is the perfect time to post. As far as I know, this is the first ever case of a self-extracting PNG -- the file is a PNG that first is interpreted as HTML, which then unpacks the compressed code within the PNG to start the second stage.…

Pretty cool hack! I'm looking forward to the blog post. It doesn't seem to eat my processor too much. In Chrome with AMD processor it's sitting at about 25% CPU usage.

Thanks!

It isn't too be on the CPU for most people, but for some reason it's eating a massive chunk of CPU-time for some people -- seems to be only in the latest Firefox nightlies, but i'm not seeing it here, so I'm unsure of what it could be.

Re: Show HN: My first WebGL demo, the first self-extracting PNG ever?

#6
post #4
post #2

I've been working on this for a couple weeks, attempting to get it looking perfect and get it to 1kb. It's going to be going on stage at http://solskogen.no/ shortly, so I figured now is the perfect time to post. As far as I know, this is the first ever case of a self-extracting PNG -- the file is a PNG that first is interpreted as HTML, which then unpacks the compressed code within the PNG to start the second stage.…

Pretty cool hack! I'm looking forward to the blog post. It doesn't seem to eat my processor too much. In Chrome with AMD processor it's sitting at about 25% CPU usage.

Do you have a quad core CPU by chance? 25% is the max that a single-threaded process would use. (Someone please correct me if this is wrong, but at least this is the behavior I've observed.)

That being said, this uses only 10-12% CPU on my quad-core machine.

Re: Show HN: My first WebGL demo, the first self-extracting PNG ever?

#8
post #2

I've been working on this for a couple weeks, attempting to get it looking perfect and get it to 1kb. It's going to be going on stage at http://solskogen.no/ shortly, so I figured now is the perfect time to post. As far as I know, this is the first ever case of a self-extracting PNG -- the file is a PNG that first is interpreted as HTML, which then unpacks the compressed code within the PNG to start the second stage.…

If it's 1k, then it's a serious contender.

Re: Show HN: My first WebGL demo, the first self-extracting PNG ever?

#9
post #6
post #4

Earlier quoted context omitted.

Pretty cool hack! I'm looking forward to the blog post. It doesn't seem to eat my processor too much. In Chrome with AMD processor it's sitting at about 25% CPU usage.

Do you have a quad core CPU by chance? 25% is the max that a single-threaded process would use. (Someone please correct me if this is wrong, but at least this is the behavior I've observed.) That being said, this uses only 10-12% CPU on my quad-core machine.

Ah, I guess I should have specified. It's a Phenom 8750 (triple core.)

Re: Show HN: My first WebGL demo, the first self-extracting PNG ever?

#10
post #6
post #4

Earlier quoted context omitted.

Pretty cool hack! I'm looking forward to the blog post. It doesn't seem to eat my processor too much. In Chrome with AMD processor it's sitting at about 25% CPU usage.

Do you have a quad core CPU by chance? 25% is the max that a single-threaded process would use. (Someone please correct me if this is wrong, but at least this is the behavior I've observed.) That being said, this uses only 10-12% CPU on my quad-core machine.

It depends on what you use to report CPU usage. Many monitoring tools stick with 100%/core, but some normalize it.
Post reply on HN