Wondering if this would be a good idea...

For discussions about game development that does not fit in any of the other topics.
User avatar
Jackolantern
Posts: 10891
Joined: Wed Jul 01, 2009 11:00 pm

Re: Wondering if this would be a good idea...

Post by Jackolantern »

KunoNoOni wrote:The problem I have with javascript is that the user can see it and if there good enough they can change what is on the page with it. Kinda like SQL injection.


-KunoNoOni
That problem is fixed with AJAX. The client-side Javascript is only used to create a client for displaying the game output and sending game input. No game logic is on the client-side, because, as you said, it could easily be tampered with. All of the AJAX game input is verified server-side to make sure it makes sense. The setup is much more simple, but along the exact same lines as any desktop-based MMORPG.
The indelible lord of tl;dr
User avatar
hallsofvallhalla
Site Admin
Posts: 12026
Joined: Wed Apr 22, 2009 11:29 pm

Re: Wondering if this would be a good idea...

Post by hallsofvallhalla »

can someone show me how to get javascript from a include file? I have yet to find a way in mozilla but I haven't tried very hard.
Zyviel
Posts: 75
Joined: Tue Jun 08, 2010 8:12 pm

Re: Wondering if this would be a good idea...

Post by Zyviel »

I'm not sure if this fits what you are looking for but here is something at w3schools site:

http://www.w3schools.com/asp/asp_incfiles.asp
User avatar
hallsofvallhalla
Site Admin
Posts: 12026
Joined: Wed Apr 22, 2009 11:29 pm

Re: Wondering if this would be a good idea...

Post by hallsofvallhalla »

i did not mean it like I wanted to learn how to do something in Javascript. I meant I keep seeing people say they can see what is in include files and i have yet to see proof. I am sure it is possible but I would like to see how so I can see. I know ther eis one post about it but I never got a chance to check it out fully.
Zyviel
Posts: 75
Joined: Tue Jun 08, 2010 8:12 pm

Re: Wondering if this would be a good idea...

Post by Zyviel »

Oh I see what you were asking now. The only thing I can think of is if there are calculations or some type of game mechanic done on the client side someone could alter the values being sent back to the server to give themselves an advantage.
User avatar
Jackolantern
Posts: 10891
Joined: Wed Jul 01, 2009 11:00 pm

Re: Wondering if this would be a good idea...

Post by Jackolantern »

I am not sure how to see it through the browser, but a packet sniffer could definitely pull it out. Anything the browser reacts to can be viewed one way or another. Obfuscation with a high-powered obfuscator is the best way to protect client-side code, and even that is not 100% secure. I am sure both ways (including and obfuscating) will knock out at least 98%+ of the people who want to study your code. The only problem is when that one person who does packet sniff includes (or use whatever other methods to see them, including using the browser WebKit) or have the technical ability to unobfuscate code distributes said code.
The indelible lord of tl;dr
User avatar
KunoNoOni
Posts: 61
Joined: Sun May 09, 2010 1:54 am

Re: Wondering if this would be a good idea...

Post by KunoNoOni »

Gimme a site and I'll show you how its done


-KunoNoOni
User avatar
Jackolantern
Posts: 10891
Joined: Wed Jul 01, 2009 11:00 pm

Re: Wondering if this would be a good idea...

Post by Jackolantern »

I am not sure of any that use the method. I think Halls used the method at one time, so he may have one.
The indelible lord of tl;dr
User avatar
Chris
Posts: 1581
Joined: Wed Sep 30, 2009 7:22 pm

Re: Wondering if this would be a good idea...

Post by Chris »

To see all the JavaScripts in Opera, you simply right click with your mouse on the web page as you generally would when you right click on any other thing. Then there's a list of options comes up just beside your cursor, this is usually what happens with just about everything you right click onin Windows at least. In that list you click on 'Inspect Element'. It will then open Dragonfly.

In the DOM tab, you can see all the HTML. expand the header and whatever else they might have the JavaScript in. Now click on the src. Nice! We can now see lovely JavaScripts!

Even without these handy tools, with JavaScript all you need to do is read through the code a bit, do some searching, and voila!

I believe GayFox also has something the same called firebug. I never looked into it as GayFox sucks so bad.
Fighting for peace is declaring war on war. If you want peace be peaceful.
User avatar
KunoNoOni
Posts: 61
Joined: Sun May 09, 2010 1:54 am

Re: Wondering if this would be a good idea...

Post by KunoNoOni »

yep thats the gist of it. not really hard at all... except when the programmer removes all the whitespace... then its a jumbled mess lol



-KunoNoOni
Post Reply

Return to “General Development”