Hiding dropbox code... (a question)


#1

Dear community - I wonder if you can help me…

My dropbox code was commented on a little earlier - very positively because I was told I must have spent a *lot* of work on a chapter… (I did, it had 7000+ plus lines of it) and first I thought cool and very sneaky!

However, I then stopped and wondered what I *really* felt about that… and then I wondered if other people had managed to hidden their code… so I had a quick look and saw that @allengies had hidden it but @JimD hadn’t hidden it. Now I don’t know if it was on purpose or not…

Now not wanting to say anything else (and being prepared to duck in case anyone throws anything at me - I’m not one to normally poke around in other people’s code) and I’m sure this might go over some people’s heads…

If anyone knows what I’m talking about then please let me know what they think about it?

Much love
David


#2

@sesquipedalian, you can look at it if you go to the game, then, at the end of the html link, you switch it from index.html to scenes/startup.txt (or switch startup to whichever chapter you want to view.

EDIT: Also to say what I think of others looking at my code. In the long run I don’t mind, because I do it to, if only to see how they used their code to do whatever it was that I didn’t understand before then (Which is how I know how to do a basic inventory as well as hide things in the stats screen)

Other than that, I get a bit embarrassed since my code is usually full of clutter or I think that whoever’s looking at it will think I’m completely doing it wrong or the hard way or I just don’t know what I’m doing.

Then I realize I don’t actually know these people face to face, and I stop caring :stuck_out_tongue:


#3

Sorry if this is a stupid question… How do you see a game code? Not that I’ll run wild, but I’ve been confused by a lot of game choices before and that sounds very interesting.


#4

@FairyGodfeather Melting brain juice run over earwax? I thought that’s what you get served up at Starbucks… no? Oh well I’m not much of a coffee drinker I suppose!

I actually think that’s right - any “lose always / win always / one bad choice and everything crumbles” games are the ones that are most likely to get that response… I guess its easier to code a game that way… but unless its designed to make you think meta-gamingly (is that a word?) or it hits you from outta nowhere with a worldview wallop (oh yes Slime Quest I’m looking at you! @Troubadour well played sir, well played) then those 3 examples simply don’t capture those emotions of great narrative ie: can you turn it around from defeat and win when everything is stacked against you… well not if you always lose or if your fate was sealed 3 chapters ago (cause what was the point of the last 3 chapters if it didn’t give you some sort of paradigm shift) and if you always win… well Agent Smith did say that utopian matrix was rejected because it was too perfect B-)


#5

Do you mean to make it so other’s can’t look at your code? (But still get to the story?)


#6

@Babisko Bingo!


#7

@nine - I don’t believe you can hide your code; the user’s browser needs to be able to see the code to play the game. One can make it slightly difficult to find the code manually, but there’s no way to totally hide the code, and I would recommend against tampering with any of the JS files if you intend to publish.

When you say allengies had hidden his code and JimD didn’t, I’m not sure which games you’re talking about, but I did get into Zombie Exodus’, Apex Patrol’s, and Tin Star’s opening scenes’ codes at the very least.


#8

@Caddmuss Ah ok - no probs… if it’s not possible it’s not possible… when I tried with Tin Star I got the CS standard startup.txt that came with the download… I’m not going to try and discover the opening scene…

I guess I was wondering generally whether people feel they’ve just been caught in their “undies” so to speak when they realise people have looked at what they’ve done or whether they’re not bothered about it…


#9

I’ll raise my hand in saying that I do peek from time to time at code, especially when something confuses me a little, but for the most part I try and keep the hood down if possible.

I understand where you’re coming from: I’ve wondered about hiding your choicescript from plagiarism or whatever else could come of it, but I’d like to think that no one here would be do something like that. As for hiding it for content reasons, it should be relatively easy to understand why something is or isn’t available as an option without having to peruse codes.


#10

@caddmuss it’s totally my stuff I admit it… I have absolutely no doubt that anyone here wouldn’t dream of doing anything like plagiarism… but there’s always them lurkers out there… watching… waiting…

I guess the stuff I’ve written is a bit different than most CS stuff - SLAMDUNK for instance, is a basketball simulator - properly coded and random as opposed to a story driven game… just cause I wondered if I could do it (not being able to code to save my life in anything other than CS before now) so its not like it’s impossible to do by anyone else… *shrug*

Interestingly enough I was wondering not less than 24 hours ago if I preferred coding solutions to games as opposed to making the games themselves (if that makes any sense) so I was wondering whether to offer any of the little subroutines for all sorts of things I’ve done available to anyone who wants them… I felt all worthy and magnanimous until I discovered that people can have a peek at them anyway… =))

Its funny how you think one thing in theory until your confronted with that in real life eh?


#11

I may be wrong, but maybe if you change the name of “startup.txt” people won’t be able to find it so easily. I mean, one way to see the code (I don’t know if there are others) is changing the link to reach the “startup” file, so if they don’t know how it’s called, they won’t get to see it.

Am I doing any sense?


#12

@Aquila - That’s what I meant by making it “slightly difficult to find the code,” but in all honestly, you kinda have to change certain things and a few of them to make it work, and anyone determined as well as equipped could still find a way to the code.

Edit: I see it this way: you give someone a link to your game, you pretty much give them access to your code.


#13

@Aquila that is right to a point… but doing that on its own without some other changes to other files won’t work… but I’m sure that could be worked around anyhow if people wanted to have a look badly enough!

I think @Caddmuss is right in that monkeying :(|) about with the code is of the devil >:) and best left avoided…


#14

If people are going to steal a game they’ll steal it regardless of how easy or difficult it is to access the code. I’ll admit I get most of my pleasure out of reading the code, I love seeing how people do things, the neat little tricks that they use, and once I’ve done a playthrough or three I like being able to read all the variations at the same time.

You could make it more difficult to access the code. If I can’t access the startup file though I generally then go into the mygame.js file and find the start file from there.

You don’t need to have a scene list in there I don’t think, you just need the start scene and from you can then just use goto_scene command. If you do that then it’s a bit trickier but still not that difficult.

You could guilt us. Put at the top a comment with PLEASE DON’T READ THE CODE!!!


#15

I didn’t mean to offend you by looking at your code! I just knew the code itself had to be so complex, I wanted to take a little peek. There really is no way of hiding your code, even by changing the startup.txt name since that needs to be in mygame.js and people can look at that to see what the name is.

I think if you ask others not to look at your code, they will mostly oblige. I know I would have!


#16

No you can’t, not conventionally anyway.
I would always push for people to be open and supportive of code analysis, it’s an indespensible way to both teach and inspire the rest of the community.
Very few people will be callous enough to copy and paste code line for line without your permission, and those who do are just cheating themselves in the long run.
I go by the “credit is very much appreciated but not strictly necessary, just don’t try and lay direct claim to the code you use”.

So if someone uses my code and it helps them make a better game, credit or no, I’m happy with that. What I can’t stand is someone taking code that isn’t their own and then slapping something like “Coded by me” on the end of their game - when it’s blatantly not :slight_smile:

But generally speaking I’m very supportive of an open source/free/shareware/creative commons approach to CS code.


#17

@FairyGodfeather not into guilting people so wouldn’t have done that!

@gameover Dude - its fine actually… I thought it a very neat trick at the time… and I still do to be honest…

It was more about the coincidence of me thinking…

“you know what, I’m not sure about making long games per se… maybe I’ll just do little routines for people and they can share in some nifty tricks”

(particularly since I lean towards the stats/routine/rpg based style of game as opposed to the CYOA style which most people use here amazingly well and is actually what COG is designed for! )

…and suddenly someone says - “cool nine - sweet code you did there - lots of effort” and my feelings didn’t quite marry up with my thinking… which made me wonder whether I was lying to myself or whether I was just being shy! :">

@gameover But i repeat again its fine… good way to throw in an easter egg or two if people are having a little perusal (and so I have updated my “security” to give any interested parties a nice seinfeld reference… Go explore people!)

much love
D

(edit last line - too many interesteds)


Monsters(WIP)- updated 04/27/17 -Link is updated
#18

While you can’t completely hide the code, you can make it extremely difficult to find (or at least make it to where no one can just go to mygame.js or startup.txt and find your scene lists). I wish there was a way to make it completely inaccessible, but I couldn’t find anyway to do so.

The reason I’ve been looking so deep into that isn’t because I’m concerned about stealing; I just can’t stand cheating or the thought of people finding spoilers (it’s especially bad when you have non-linear games). Since the game isn’t made to be played like that, having it tested like that does little good whatsoever.

I got so paranoid about it that I found myself making the code more convoluted than necessary in an attempt to hide how to get to what. :frowning:


#19

BTW, being able to look at the code enables me to send in more detailed bug reports than I would otherwise. This makes it much easier for the author to reproduce and fix the error than if I weren’t able to supply all that information. I can give the author not only the specific file name, but also find the bug in the code myself if I’m sufficiently motivated. And there are also a lot of more subtle bugs I’m not really sure are bugs until I look at the code and realize it isn’t behaving the way author intended. So when it comes to stomping obscure bugs, having the code available to perusal by a greater number of eyeballs can be highly helpful.


#20

I don’t care if people see my code or even use it. My story is more important to me than the code. I rather have people take my code and use it to make their games better than waste time redeveloping something I have already implemented.

I do also hope that others are equally willing to share. Vendetta gave us all the checkpoint system code which I use and shared with Cataphrak and Allen Gies.