A Flash Developer Resource Site

Results 1 to 12 of 12

Thread: [Disc] Encoding data in an image?

  1. #1
    Pumpkin Carving 2008 ImprisonedPride's Avatar
    Join Date
    Apr 2006
    Location
    Grand Rapids MI
    Posts
    2,378

    [Disc] Encoding data in an image?

    I've been following Squidi.net's 300 series since day one. Something that has always thrown me was that he suggested using images as downloadable "upgrades" or "expansions" for the Tiny Crawl game series. I've researched this a bit and while I see it as very valid and easily distributable (which was Squidi's reasoning for using them; everyone can download a jpg or png file), and while I do think that Tiny Crawl would make a really great viral flash game for facebook, myspace, or the iPhone, I don't think that jpg's would be the best way to create expansion packs. My question, or poll rather, is what would be a better type of distribution system to deliver upgradable/in-game-purchasable expansions?

    I can assume that by creating an unusual aspect to a flash game arises several problems. Not only would you require a validation process to enable a user to "purchase" a new expansion, but also a way to prevent users from freely re-distributing those expansions for free to other uses (one though would be to make character requirements like needed X experience to enter a new section, should that be included in the expansion or upgrade).

    I see this better suited to a external application where you could literally include an import system or save the graphics to a folder where the game could detect and "install" if you will, new things if and when the images are purchased.

    The last thing that I've been pondering is if generating these types of encoded images is even possible with Flash? I understand the security and stability issues involved with flash/php and saving pngs to the user's system, so what would be a good method of implimentation? I'd really like to play around with this idea of generating expansion data-graphics and maybe even using them one day.

    Your thoughts?
    Last edited by ImprisonedPride; 02-19-2009 at 03:57 AM.
    The 'Boose':
    ASUS Sabertooth P67 TUF
    Intel Core i7-2600K Quad-Core Sandy Bridge 3.4GHz Overclocked to 4.2GHz
    8GB G.Skill Ripjaws 1600 DDR3
    ASUS ENGTX550 TI DC/DI/1GD5 GeForce GTX 550 Ti (Fermi) 1GB 1GDDR5 (Overclocked to 1.1GHz)
    New addition: OCZ Vertex 240GB SATA III SSD
    WEI Score: 7.6

  2. #2
    Senior Member tonypa's Avatar
    Join Date
    Jul 2001
    Location
    Estonia
    Posts
    8,223
    JPG is compression that loses data, more you compress = more data is lost. So of course you would use lossless bitmap like GIF/PNG.

    And FP10 can save files directly to user computer.

  3. #3
    Senior Member Orkahm52's Avatar
    Join Date
    Jan 2006
    Location
    Perth, Australia
    Posts
    335
    Spore does something similar to what's on Squidi.net. I believe the Spore creatures you create are saved inside the meta-data of a .png thumbnail. This seems like a better approach then having all the data showing. ( Though something inside me likes that better ) Not sure if it's possible in FP10 or a flash and php combo.

    ~Ork.

  4. #4
    Student
    Join Date
    Apr 2001
    Location
    -
    Posts
    4,756
    its pretty common to store meta information (like a game level or whatever) in a images file header - now you can do that even with FP10.
    A friend showed me excatly that some time ago back then he used Air but FP can do that as well. Just browse on the net for some PNG encoder classes and read about binary stuff.

  5. #5
    Pumpkin Carving 2008 ImprisonedPride's Avatar
    Join Date
    Apr 2006
    Location
    Grand Rapids MI
    Posts
    2,378
    I see what you're saying, but it seems very illogical to me that this would be suited for a flash environment. I'm just not sure there would be a legitimate way to regulate the usage if it mattered who had access to what kind of upgrades.
    The 'Boose':
    ASUS Sabertooth P67 TUF
    Intel Core i7-2600K Quad-Core Sandy Bridge 3.4GHz Overclocked to 4.2GHz
    8GB G.Skill Ripjaws 1600 DDR3
    ASUS ENGTX550 TI DC/DI/1GD5 GeForce GTX 550 Ti (Fermi) 1GB 1GDDR5 (Overclocked to 1.1GHz)
    New addition: OCZ Vertex 240GB SATA III SSD
    WEI Score: 7.6

  6. #6
    Senior Member realMakc's Avatar
    Join Date
    Oct 2002
    Posts
    927
    the obvious solution is to have image only useable once, with some sort of online check. but this makes little sense, unless you want user to be able to re-sell unused image. and even that way, you could get away with long password (like random md5 or alike).
    who is this? a word of friendly advice: FFS stop using AS2

  7. #7
    Senior Member Sietjp's Avatar
    Join Date
    Jan 2005
    Location
    Paris, France
    Posts
    711
    Sorry to interfere but I don't get the point, what's the difference between saving the data in a binary file or in the header of an image file ?

  8. #8
    Student
    Join Date
    Apr 2001
    Location
    -
    Posts
    4,756
    the difference is that when writing it into a the binary file which is a image but in its header you dump some xtra stuff compared to just saving a image is that:
    - booth the FP movie and any other image viewer can read the image data (so you can email it to a friend and he can preview or see the image even though he has not the flash movie that knows how to handle with the header xtra stuff).
    - you flash application can in addition to just loading the image process the meta information e.g level or a creature.

    its the same they did with spore- each time you create a avatar image out of spore it adds meta information of that creature so that all you need to send someone else is that thumbnail of your spore creature (PNG image) and that person can easily drag it into its spore game to add that creature. I think its a very creative and funny idea - if not used in a bad way (because that also common practice like putting trackable hidden data in the image to sue people because they abused copyrights)

  9. #9
    Pumpkin Carving 2008 ImprisonedPride's Avatar
    Join Date
    Apr 2006
    Location
    Grand Rapids MI
    Posts
    2,378
    Quote Originally Posted by renderhjs
    the difference is that...
    Also, compatibility plays a major key. Virtually anyone on any platform and download and view a png file. It makes distribution virtually pain free.
    The 'Boose':
    ASUS Sabertooth P67 TUF
    Intel Core i7-2600K Quad-Core Sandy Bridge 3.4GHz Overclocked to 4.2GHz
    8GB G.Skill Ripjaws 1600 DDR3
    ASUS ENGTX550 TI DC/DI/1GD5 GeForce GTX 550 Ti (Fermi) 1GB 1GDDR5 (Overclocked to 1.1GHz)
    New addition: OCZ Vertex 240GB SATA III SSD
    WEI Score: 7.6

  10. #10
    Student
    Join Date
    Apr 2001
    Location
    -
    Posts
    4,756
    true

  11. #11
    Senior Member tonypa's Avatar
    Join Date
    Jul 2001
    Location
    Estonia
    Posts
    8,223
    I dont think the original idea in Squidi was about image headers. The image itself was the data as I remember.

  12. #12
    Pumpkin Carving 2008 ImprisonedPride's Avatar
    Join Date
    Apr 2006
    Location
    Grand Rapids MI
    Posts
    2,378
    Yes it was tony. And it's the reason I started this thread. I knew vaguely that it had to do with the meta tags, but Squidi make reference to the actual color components of the image being the container for the data, and the idea is played around with again on the forum for this topic on squidi's site. It's pretty foreign to me at this point, but I hope to get something workable by the week's end.
    The 'Boose':
    ASUS Sabertooth P67 TUF
    Intel Core i7-2600K Quad-Core Sandy Bridge 3.4GHz Overclocked to 4.2GHz
    8GB G.Skill Ripjaws 1600 DDR3
    ASUS ENGTX550 TI DC/DI/1GD5 GeForce GTX 550 Ti (Fermi) 1GB 1GDDR5 (Overclocked to 1.1GHz)
    New addition: OCZ Vertex 240GB SATA III SSD
    WEI Score: 7.6

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center