Encryption of graphics files

For questions about using Classic.

Post » Sat Apr 03, 2010 7:40 pm

I've concluded its better to load the files at given time from HD instead of keeping them all in frames of animations in VRAM and that's what all the heavily graphical 2D games I've played seem to have done - and is problably why they are so easily ripped. Anyway, what encryption method is available to Construct to make it so it's at least marginally difficult to rip?
B
2
S
2
G
4
Posts: 259
Reputation: 1,968

Post » Sat Apr 03, 2010 9:06 pm

Construct only keeps the current layout in VRAM unless you change that setting. Constantly loading everything off the HDD on-demand doesn't seem to be a good idea as constant HDD use is never good. Storing some stuff in regular RAM would be a great feature IMO if it works like I think it does and there'd be no HDD searching/reading.

I have more to say on this, but I'll wait for your reply. There's a topic in the Construct Discussion about lots of frames and animations and stuff that is directly related to your issue.
B
2
S
2
G
2
Posts: 372
Reputation: 1,794

Post » Sat Apr 03, 2010 9:38 pm

Loading an image at runtime still uses VRAM. In terms of VRAM usage, it's no different than having it stored as an animation frame. Construct loads it once to VRAM the same way all other textures are loaded to VRAM.

The only benefits of loading images at runtime instead of having them as part of the cap is it makes it quicker to preview and save, and if you want to update your game and save bandwidth/download time, the players don't have to re-download all the images they already have.
Moderator
B
87
S
32
G
33
Posts: 3,005
Reputation: 27,397

Post » Sun Apr 04, 2010 12:43 am

I don't mean loading every tick. I mean loading per outfit and equip change that alter animations or appearance - which is what I suspect all those MMOs are doing with their hundreds of customizable equipment. Instead of a exe, I see folders of large files that is assumable to be graphics and music. Most of the time the exe is tiny in comparison.

So how does one encrypt those files like those games do?
B
2
S
2
G
4
Posts: 259
Reputation: 1,968

Post » Sun Apr 04, 2010 12:59 am

[quote="manontherun":rjtl2va1]I don't mean loading every tick.[/quote:rjtl2va1]

I was referring to Mr. Wolf's comment about constantly loading from the hard drive, though upon rereading it I might have misread it.

Sorry I forgot to address your original question - I've heard lucid's 's' plug-in has encryption, though I haven't tried it.
Moderator
B
87
S
32
G
33
Posts: 3,005
Reputation: 27,397

Post » Sun Apr 04, 2010 1:38 am

Sorry for confusion. I read that thread and I'll look into taking advantage of a separate layer. Due to simplicity of eventing, I like to use one animation with large number of frames so that I can use the loopindex as much as possible. With use of the Image Manipulator, along with separate layers, there should be a way to keep all frames in the exe - while still keeping the same ease of eventing. Regardless, encryption is still an issue I'm bound to come across again, so I guess the question will still remain. Which Lucid plug-in BTW? He's made like 100 since I last checked here.
B
2
S
2
G
4
Posts: 259
Reputation: 1,968

Post » Sun Apr 04, 2010 2:35 am

[quote="Arima":dka3xjn4]Loading an image at runtime still uses VRAM. In terms of VRAM usage, it's no different than having it stored as an animation frame. Construct loads it once to VRAM the same way all other textures are loaded to VRAM.

The only benefits of loading images at runtime instead of having them as part of the cap is it makes it quicker to preview and save, and if you want to update your game and save bandwidth/download time, the players don't have to re-download all the images they already have.[/quote:dka3xjn4]
I know that, I was referring to a sort of "on-demand putting into VRAM." From the other topic which is kind of related to this issue, I've found out that everything is stored in RAM until it's loaded into VRAM when you load the layout. I'd like to be able to decide what gets loaded into/unloaded from VRAM better. My post was a little unclear, sorry.

@ manontherun - That's sounds like Asset Streaming. 3D games really use it. It loads on-demand what it needs. That's why there can be a little delay before your character model changes.

Unfortunately, Construct is very limited with how it can use resources and a lot of features that 3D game engines use (and can really be in 2D games too!), aren't in Construct. Construct was originally made to just run everything from a single .exe. It is not a good practice and a lot of people don't like it, so the whole encryption thing is a hot topic.
B
2
S
2
G
2
Posts: 372
Reputation: 1,794

Post » Sun Apr 04, 2010 3:05 am

[quote="manontherun":va09h2xb]Sorry for confusion. I read that thread and I'll look into taking advantage of a separate layer. Due to simplicity of eventing, I like to use one animation with large number of frames so that I can use the loopindex as much as possible. With use of the Image Manipulator, along with separate layers, there should be a way to keep all frames in the exe - while still keeping the same ease of eventing.[/quote:va09h2xb]

Separate layer? What do you mean by that? Objects being on different layers won't affect the VRAM usage, if that's what you meant.

If you put all of the graphics into one animation, construct will load those all at once. Construct loads textures on a per object basis. Create an object, and construct will load all of the textures for all of its animations. To break things up, you can categorize the graphics by object - have a sprite for level 1 section 1, for example.

As for the plug-in, it wasn't a typo - Lucid's plug-in is named "s". :)

[quote="Mr Wolf":va09h2xb]I'd like to be able to decide what gets loaded into/unloaded from VRAM better.[/quote:va09h2xb]

As mentioned above, you can sort what you want loaded by objects. Construct will simply load all of the textures for all the objects in the layout. If you create an object from another layout, it will load the textures for it then.

[quote="Mr Wolf":va09h2xb]@ manontherun - That's sounds like Asset Streaming. 3D games really use it. It loads on-demand what it needs. That's why there can be a little delay before your character model changes.[/quote:va09h2xb]

If there's a pause, I don't think it counts as real streaming - it's simply loading. I think actual streaming is when the application uses idle time to load things, and doesn't complete the task immediately. If there's a pause, that's because the application is waiting for the data.

[quote="Mr Wolf":va09h2xb]Unfortunately, Construct is very limited with how it can use resources and a lot of features that 3D game engines use (and can really be in 2D games too!), aren't in Construct. Construct was originally made to just run everything from a single .exe. It is not a good practice and a lot of people don't like it, so the whole encryption thing is a hot topic.[/quote:va09h2xb]

Personally I don't think it's very limited with how it can use resources. How do you think it's limited? The one glaring feature that bugs me is there's no way to have construct load things when it needs to, but not unload them automatically when leaving a layout.
Moderator
B
87
S
32
G
33
Posts: 3,005
Reputation: 27,397

Post » Sun Apr 04, 2010 3:50 am

Construct can't do texture streaming and it has to spawn the objects, it can't just keep the objects "there" without textures. With spawning objects, it is entirely cumbersome and not at all dynamic. I'm not entirely sure about all the different definitions of "streaming" and although I could discuss the wording of it, I'd rather not take the time. There's two different things here: 1) The type of loading when you change outfits in a game. Somtimes there's a tiny pause of the character model though not of the game itself, as it changes the model. 2) Only keeping textures of things in the immediate area of the object in VRAM. I would presume they still exist, just without their normal textures. I'm not sure how much of this sort of the loading is normally scripted and how much is dynamic.

Really, Construct is limited with these kinds of things. I do not know all the details of implementing this for Construct, but I'd like to see something being worked on. Resource management is a must in 2D games as they are more VRAM hampered than 3D games. I'd really like to see loading that doesn't pause the game for one thing.

Edit: What do you mean "unload them when leaving a layout"?
B
2
S
2
G
2
Posts: 372
Reputation: 1,794

Post » Sun Apr 04, 2010 6:36 am

Hm, what about reading a single data file on HDD and storing it in RAM entirely, then retrieving compressed images from that image on request? Sort of like .zip file with all images stored in RAM. I figure that'd require a plugin.
B
62
S
21
G
12
Posts: 1,910
Reputation: 13,155

Next

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 0 guests