2019-05-24 16:21:13

Hi all, i have recently thought about creating my own novel creator in python.
what i want to do is basicly have the user have a text file, or a file with another extension, does not matter for now, but then just parce that file with python in order to make dialogs text boxes and menus based on what  the text file contains. i hope you understand so far.
I already have menu's figured out, use audio game kit for that.
I also have input and dialogs figured out, i will also use the audiogame kit for that.
And for sound, i thought i would use the recent sound pool in python if it is reelly souch a needed thing.
My question is just how will i go about letting users release there games? without other people having to see what is in other people's games?
and if i have any other questions, i hope it will be ok to ask here. Oh, i also have speech figured out, since it will be the main component besides python, needed to play and make games, i will use the speech from audio game kit for python also. i also plan on open sourcing this project. thanks

best regards
never give up on what ever you are doing.

2019-05-24 20:20:09

Perfect protection is impossible, but you could encrypt and pack them so users could distribute encrypted files. If you release opensource, it's extra extra impossible. People would just call any decrypt or unload function you create

I am a web designer, and a game developer. If you wish see me at http://www.samtupy.com

2019-05-24 22:34:03

You could have your script, instead of actually playing a game straight from a text file, generate Python source code.
Then Cythonize it, which isn't too hard and it's hard to get more than jibberish out of the extension.
Cythonized extensions can be imported and used like normal Python modules, accept they have a pyd extension.
You could then create a zip file or use a pack file class if you have one, and encrypt the data with a key.
The zip file would contain sounds for the game, and the Cythonized extension.
You'll need to extract the extension to a temporary folder to load it, because I can't find a way to load it from a zip file.
Then just run it.

2019-05-24 22:35:25

Well if you make it open-source people will decrypt things with no problems at all. By novel creator do you mean like the choice of games and choose your story games? Even if you don't open-source the project, the games sound like they would be easy to reverse engineer for anyone, even an amateur.

Guitarman.
What has been created in the laws of nature holds true in the laws of magic as well. Where there is light, there is darkness,  and where there is life, there is also death.
Aerodyne: first of the wizard order

2019-05-24 22:45:05

Ok, you all got some points.
I will still open source the idea, but then i will just encrypt the data. as i am not sure how to turn the script into python code, and it sounds like a lot of work.
And i meen like the choise of games titles, kind of like them.
If any one reelly want's to spoyl the fun and read the story lines, it is then there story, unless some one would like to contribut to my idea once it is open sourced. i am still verry new to programming in general.
I already got dialogs up and running and the showing of a title. i put my contents in a text file, and it works as expected.
thanks for all your help so far!

best regards
never give up on what ever you are doing.

2019-05-25 00:51:39

I already said, it doesn't matter if you encrypt the data, if it's open-sourced anyone could decrypt it. If you compile the code that doesn't really stop people from trying, but it does make it a little more difficult to decrypt things.

Guitarman.
What has been created in the laws of nature holds true in the laws of magic as well. Where there is light, there is darkness,  and where there is life, there is also death.
Aerodyne: first of the wizard order

2019-05-25 06:48:34

so @3 just letting you know if you have the game turn modules into python code and cythonize them, you are making it so only players with visual studio and a python environment as well as cython and all required modules could play the game

I am a web designer, and a game developer. If you wish see me at http://www.samtupy.com

2019-05-25 08:29:03

well then it would be kind of pointless for me to make this thing, or perhaps some one with better knoladge could make some thing haha

best regards
never give up on what ever you are doing.

2019-05-25 12:51:36

Why would you like to encrypt your games anyways? What's the point? ChoiceScript games are open to code-viewing and it's actually a learning technique that is very useful. Twine games can be decompiled by Twine compilers and read by the official Twine software. The only games i can think of now that aren't open are Choose Your Story games, and that's probably because they are hosted on an external server. In the end, I think letting people learn from the code of completed games is good. It should also be their choice if they'd like to modify them or know what comes next.

2019-05-25 12:52:57

Yeah, that is true. i then will not even encrypt the games.  thanks.

best regards
never give up on what ever you are doing.

2019-05-27 14:34:45

HMM...

Well, you can encrypt with certificates or PGP keys, but I don't know how it will work.

Cheers,

2019-05-27 16:44:18

@7
I'm not sure that's true.
Pyinstaller packages lots of pyd extensions and it doesn't need vs to run them.
You'd need it to build them, but it wouldn't be too hard for someone to setup a server, send the python code and have the server do the Cythonizing.
Then just download the file.

2019-05-30 01:02:13

Hmmm yeah I hadn't considered the server idea. It sounds viable, but I'm not sure of the security implications of something like that. It could be dangerous to send code to a server and have it compile, I can't see a way to make something like that perfectly airtight without the ability for me to use some clever cython directives or something like that to somewhat pwn the compilation server

I am a web designer, and a game developer. If you wish see me at http://www.samtupy.com

2019-05-31 16:35:56

I guess you can encrypt the data when sending and receiving. The server wouldn't be executing any of it either.
Maybe this is one of those times when I think a private/public key thing would be useful. The server has the private key.
This sounds like a lot, but the resulting game would run nice and fast and hopefully can't get aken apart.

2019-06-01 08:12:04

No but the server is compiling it. It's not about encryption here, the idea is to modify the code being sent to include some payload that is harmful when compiling, then it will be sent and though it's not directly executed, maybe some cleverly employed cython directive or some code that was purposefully designed to cause the compiler to hang for hours or create massive resulting files that took up loads of memory or other attacks could cause the server to die. I'm no expert in that field I've never tried breaking things during compilation and not sure if it is possible, but if it is it could pose massive security risks to allow server side compilation. I'd certainly never risk it. Even if the data is encrypted when sent, if this game is supposed to be open source I'll just mod the code to have it changed before encryption. I think the only safe option if you really want stories to not be readable is to have the stories hosted on a server, then the client can request certain parts of the story in text.

I am a web designer, and a game developer. If you wish see me at http://www.samtupy.com