Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Mindful

Pages: [1]
1
General / Simple Image Encryption
« on: March 21, 2012, 12:58:16 am »
Quote from: "MorleyDev"
To be honest, encrypting images like this is relatively pointless: If people want them, they'll get them.
They'll take screen captures of the game and copy them out of that.
They'll decrypt the files by looking at the exe structure and figuring out the encryption key.
They'll just copy the graphics style and make their own.

It's pointless to stop the signal.

If you want to make it so the layman can't just copy and paste and at least has to do a couple of minutes work, compression is the better way to go.

Packing everything into one big zip file and loading them from that is a common trick that's been around since before Doom (WAD files). Plus being able to keep everything close to each other in the hard drive by packing it all into one file can help to improve performance and has some other benefits regards to making, sharing levels etc.

Okay, as much as I appreciate the input, I feel like you didn't read any of the thread. I know anyone who wants the images is going to be able to get them; I'm protecting the images so that players don't spoil the plot for themselves (it's a Visual Novel, so the plot's really all there is), not because I think I'm going to be able to stop piracy. Packing things into a zip file might have been a good idea, but I've already got a system for removing headers and loading images with removed headers working.

2
General / Simple Image Encryption
« on: March 19, 2012, 05:08:24 pm »
Quote from: "dydya-stepa"
i suggest you to finish your game first. anyway i don't think anyone will want to look into your images.

1) It's just crap - face it.
2) If you make angry birds or plans vs zombies. Nobody will even try to use your images as you'll sue them

Don't waste time and make your game. There's 1000s ways to learn c++ without that.

Because 1000s of people like you are wasting their time instead of making games - there are still almost no good games produced with sfml.

Ahhh, nothing like a good dose of internet hostility in the morning. Anyway, I respectfully disagree with your statement.

Quote
There are two reasons:

-I want to learn C++ too.

-I can't stand Python.

Besides, Ren'py is nothing more than SDL's functions exposed to the Python interpreter, with a few helper scripts to more complicated operations, isn't it?

Fair enough on the first two reasons. As for the third, I don't think you  are giving Renpy enough credit. Granted, I haven't used it, but I've looked at some games made with it, and they seemed pretty polished - although I have no way of knowing how much was Renpy and how much was Python extensions. That said, your first two reasons are good, so don't think I'm trying to talk you out of writing your engine; I think it's a great idea, and I hope you do well with it. I was just curious. Anyway, if you run into any interesting issues or want someone to bounce ideas off, you can always shoot me a PM. I can't promise I'll be able to help, but I tend to be pretty good with conceptual issues and we're working on similar projects, so I might know something. Even if I can't help, it would still be interesting to see what you're doing (if you're comfortable sharing your code, that is. I would understand if you weren't).

3
General / Simple Image Encryption
« on: March 19, 2012, 06:08:48 am »
Quote from: "N_K"
Wow, so I'm not the only one who develops a visual novel engine (well, kind of, it's mixed with tile-based RPG).

But instead of removing the header of all the PNG files, why not store them in a custom binary format, based on Protocol Buffers, or EBML?

Also, take a look at the open source KiriKiri visual novel engine (FSN is built on this engine, by the way). It's plugin-based, and although I haven't tried it myself yet, I'm sure you can use its custom archive format with a little effort in your engine.


I actually did look at KiriKiri, but it has no English documentation that I know of. As to why removing the headers is a good idea: I picked up C++ two weeks ago (although admittedly I'd logged enough time in various game editors/scripting languages to be familiar with some of the basics before starting). I think removing the headers is fine for now, because it's something I actually know how to do. I don't doubt that your method would likely be better in practice, but I'd have to understand it first, and removing the header files works well enough. I appreciate your suggestion, I just don't quite think I'm up to par.

Edit: Actually, now my curiosity is piqued. I'm doing this in C++ because I figured it would be a good way to learn, but I could just as easily have used Renpy. I haven't looked at specifics, but Renpy looks pretty robust. Does it not have enough support for the RPG elements you're looking for, or is there some other reason you chose not to use it?

4
General / Simple Image Encryption
« on: March 18, 2012, 11:27:15 pm »
Quote from: "Mjonir"
If was thinking on storing the headers in the .exe, not the whole picture. But you don't need that if you just remove a constant information ("89 PNG" which all PNG files start with).

To do that on the file, simply have a little program that open all ".png" files and remove the first 4 chars. (You can also test that it's not already removed, so you can just dump your images and run the same script without damaging images where the header is already removed.)

To read them, load the file in memory, add the little constant string at its beginning and then give it to SFML through loadFromMemory() methods. Can't give you the implementation, but that's the idea :)


Alright, I definitely don't know how to do all of this, but I'm sure I can learn. You've given me enough that I at least know where I'm going now, which is exactly what I wanted. Thank you. Also, thumbs up on your FSN avatar - I'm actually doing this for a visual novel.

5
General / Simple Image Encryption
« on: March 18, 2012, 11:04:40 pm »
Quote from: "nietaki"
My best (simple) idea would be to use a XOR Cipher with the key contained in the code. This way you could easily convert the encrypted files whether it's by xoring the data you read to the memory or writing your own neat InputStream :)

Make sure to share the implementation (without the key of course), it might be a neat tool to have and a good thing to learn from for people like me if you wrote it well using InputStream :)


In terms of the actual encryption applied, I was looking at a XOR cipher (just because it's so simple). Unfortunately, I think you're giving me a little too much credit here; I really only have basic experience with streams. If I manage to write something, I doubt it will be worth sharing.

Quote
If you want something REALLY simple, why not just remove the headers + extension, and store them in your .exe? You can even just remove the mandatory "89 PNG" at the start of the file, most tools will refuse to open it, and you don't have anything to encrypt/store

Like I said, I can't store them in the .exe (too many), but the idea of just removing the headers and extension sounds like something a little bit closer to my level. I'm sure I can find a tutorial on doing this to the files, but what would reading them afterwards look like? I take it I'd still have to use a custom InputStream to read them since they'd no longer have an obvious format?

Edit: I'm really not too concerned about secrecy. The game launch is a long ways off, I haven't used a name, and really, like I said, this is mostly about preventing the average Joe from opening the image files, as opposed to having impenetrable security.

6
General / Simple Image Encryption
« on: March 18, 2012, 08:37:51 pm »
I'm in the process of writing a reasonably basic game, and for the sake of plot integrity, I don't want curious players to be able to simply open any of the image resources I'm using. As such, I'm looking for a very simple way to encrypt the images I'm using. Unfortunately, I'm pretty new to C++ and SFML, so I'm not sure where to start.

A couple of important notes: first, I know images can be stored in the .exe, but I don't think that's a very good idea in this case. The project will use a lot of high-quality images and the .exe would end up being enormous. Secondly, I know that anyone who really wants to see these image files is going to be able to, so I'm not worried about using a complex form of encryption. I just don't want it to be as easy as opening a resource folder. Lastly, I realize this is likely going to be complicated to do. I'm certainly not asking anyone to write the code for me, I'd just like to know what the best way to go about this is. Should I just convert the images into binary files, or something similar? Is there a simpler way? I've looked around for tutorials but most of them use a more complicated form of encryption than I'd need, and I couldn't find any in context of SFML (I'm using 2.0 so I figure InputStream is going to play a part in loading the encrypted images).

The files will be mostly .png files, and it's very important that whatever encryption process I use doesn't damage their quality. Any input would be appreciated; I'm totally at a loss here.

Pages: [1]