de en es fr
Let the machine help
Light teasing, exhibition, BDSM, sissyfication, watersports... with sounds and pictures


Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Hiding content
PostPosted: Thu Jun 02, 2016 2:05 pm 
Offline
Veteran
Hey.

I don't know if this goes against some rules about sexscripts but is there a way to hide content and parts of the script?
I of course understand that this can have some security issues.
What I am looking for is a way to hide images, so you have to complete a piece of the game to unlock another girl.


Top
 Profile Send private message 
 
 Re: Hiding content
PostPosted: Thu Jun 02, 2016 2:56 pm 
Offline
Site Admin
User avatar
Aloha

You're right about security issues. See more here.

As it is for a picture, perhaps some picture live eiting may be enough (a code that recreate a picture only if the user win). But it will be very hard to avoid a user to replace if(....) by if(true), as in usual hacking of software.


Top
 Profile Send private message 
 
 Re: Hiding content
PostPosted: Thu Jun 02, 2016 3:10 pm 
Offline
Veteran
How would you do something like that? Recreating an image?


Top
 Profile Send private message 
 
 Re: Hiding content
PostPosted: Thu Jun 02, 2016 3:17 pm 
Offline
Site Admin
User avatar
Not easy, but here's how I'll do it : I'll use some code to reverse the bytes of the picture inside the file, or something like that. When success, you do the process back, then show the picture.

I can provide some code if you want (or someone else).


Top
 Profile Send private message 
 
 Re: Hiding content
PostPosted: Thu Jun 02, 2016 3:23 pm 
Offline
Veteran
That could be awesome!:)


Top
 Profile Send private message 
 
 Re: Hiding content
PostPosted: Thu Jun 02, 2016 4:10 pm 
Offline
Site Admin
User avatar
Here is a full example (first the encoding you should do once time for all, then the decoding for the user) :
Code:

def path = System.getProperty("user.dir")+"/images"

def baseFile = new File(path + "/mensclothes.png")
def encodedFile = new File(path + "/mensclothes_encoded.png")
def encodedBytes = baseFile.getBytes()
encodedBytes.eachWithIndex( { b,n -> encodedBytes[n] = (byte)(b ^ 128) } )
encodedFile.delete() //emptying
encodedFile.append(encodedBytes)
// setImage("mensclothes_encoded.png") //would fail, of course : it's encoded !

def decodedFile = new File(path + "/mensclothes_decoded.png")
def decodedBytes = encodedFile.getBytes()
decodedBytes.eachWithIndex( { b,n -> decodedBytes[n] = (byte)(b ^ 128) } )
decodedFile.delete()
decodedFile.append(decodedBytes)
setImage("mensclothes_decoded.png") //success !


The "encryption" is here a simple "xor" : the b^128 part

Probably this code could be better, I'm no groovy wizard.


Top
 Profile Send private message 
 
 Re: Hiding content
PostPosted: Sat Jun 04, 2016 10:30 am 
Offline
Veteran
Thank you very much. This is really nice.
Since sexscripts scripts are basically open source, there are no way to cheat-proof the game,
but this will do. The idea is just that the user needs to go through a bit of trouble to unlock the pics, instead of just accidentally stumbling upon them while browsing folders:).


Top
 Profile Send private message 
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: Google [Bot] and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  


Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Maroon Fusion theme created by Oxydo
Software, theme modifications, phpBB modification by Doti 2010 - 2020
This website uses session cookies only.