Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Embedding ROMs in Images (.png) #5

Open
rmmh opened this issue Mar 16, 2012 · 2 comments
Open

Embedding ROMs in Images (.png) #5

rmmh opened this issue Mar 16, 2012 · 2 comments

Comments

@rmmh
Copy link
Contributor

rmmh commented Mar 16, 2012

I'd like to make it possible to embed ROMs in .png images, so you can host them as images and have a Mako web player that you point to the appropriate URL.

Something like this:

Imgur

Holds about 128KB of data. The Five game compresses down to 20KB with bzip2..

I'm not sure on the best way to do the border around the data region. It might be helpful to have it include text like "Mako ROM -- http://mako.github.com/1" (assuming that's a link to the web player).

@JohnEarnest
Copy link
Owner

Actually, there's something even cooler you can do by taking advantage of how the PNG and ZIP file formats work- concatenate an image onto an executable JAR of the game:

cat ScreenShot0.png Mako.jar >Joined.png

like this:

http://i.imgur.com/NZu4G.png

If you download that image and rename it with a .jar extension, you should be able to run it as a desktop application. In my above example, the image and jar formed a file that was 57k in total.

Think that would work?

@rmmh
Copy link
Contributor Author

rmmh commented Mar 16, 2012

I know about that trick, but there's the possibility that some image host might strip the extra data. Not that big of a deal, I guess.

It's neat to have it all self-contained like that, although if you remove the .java files and the unecessary classes you can shave another 20k off that size.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants