Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Graphics/Sprites Protection

 
S Chan
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have some graphics which are to be used for my game's sprites. I have shredded months of blood and sweat to produce them.

I'd like to distribute my game freely so that anyone can download it, play it and even look at the source code , but, on the other hand, I do not wish people stealing the graphics and claim they created/own them.

At the moment, I have the graphics saved into GIFs, JPEGs or PNGs formats and stored into a folder. The game, packaged in executable jar, access the image files within the jar.

I was wondering if I can some how save the graphics into other formats or use some other methods to store the graphics, so that people cannot just rip all the graphics out easily simply by unjar-ing the jar file. However, I still want the game to be able to load up the graphics with a reasonable speed.

I know I can't completely make the graphics safe from ripping, e.g. they can take screen dumps of the in-game graphics, but I just hope the graphics are not "so exposed" to the users so they can just rip it out without much effort or easily with an automatic process.

I thought about using Java code to generate some of the graphics at run time but I think that will hurt the game performance in large degree.

Anyone has any thoughts?
 
Maneesh Godbole
Saloon Keeper
Posts: 11070
13
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One way of doing it.

In pseudo code:
Convert the image to a byte array (using ImageIO and ByteArrayOutputStream and BufferedImage)
Convert the byte array to a String.
Print the string to your console.
Take this string and define it as a constant in your code
When the image needs to be retrieved, String->byte array->Image
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic