Jason4Ever Posted March 16, 2015 Share Posted March 16, 2015 Hello, I'm Java Developer , and i want to create an online game (network) on Facebook , its idea same like (War commander, Redalert and Farm village) after searching i found that Java Applets currently isn't preferred from users , so i decided to use Flash as these game are using , but some guys adviced me to use HTML5 . Frankly I don't have enough information about it , and i saw samples of games by it , but for my target , is it enough to handle an online browser game with lot of users with same motions and effects speed like SWF ? and a question about source code ? it's by Javascript so it will be visible to any one to stole my code !? how can i secure my source code then ? All advice and clarifications please Quote Link to comment Share on other sites More sharing options...
AzraelTycka Posted March 16, 2015 Share Posted March 16, 2015 Hello, I won't tell you if it's better than flash for your games, I'll leave that to people with this experience. Here is just a sample gample which was made some time ago, it's Command & Conquer. It works on my super old (stone age maybe earlier) computer super smoothly, I didn't try multiplayer though, so I don't even know if it works, but you can check it out with your friends and see for yourself. Yes, javascript is usually processed by your browser so the code is visible in this way, anyone can check it and anyone can copy it if needed. There are some ways how to make your code less readable but you can reverse each of these processes to get the readable version back, so no way to hide your code from other's eyes, you can just make it more difficult.Besides that, there's 'server version' of javascript called node.js, with this you can run some part of yoru game on server and just some bits on user machine (so only those bits are seen be the user). Although, I can't tell you about it's performance this way, I can only guess that it would increase the requirements for your server hardware and connection quite a bit (?). Personally I can't see a reason why to hide your code from others maybe except cheating (which is a pain to deal with javascript, but server version helps here quite a bit)? Game code is nothing world breaking so it's not like you are programming some research in physics, chemistry, etc, which could be stolen from you. Just my humble opinion, correct me if I'm wrong. Either way, in the end the browser needs to get javascript to interpret it in a way it understands it, so you can't encipher it and send it to the browser because the browser won't understand it. Quote Link to comment Share on other sites More sharing options...
Ashkettle Posted March 16, 2015 Share Posted March 16, 2015 For multi-player games, it's usual to make the game logic happen on the server, so that cheating is reduced. The client sends requests to act upon, which the server then evaluates the legitimacy of and either approves of it, or declines it.JavaScript and HTML5 are fine for most types of 2D games, and I don't think you have a case where it's not. Uglify your script to protect it a little bit, but other than that, focus on the server for the logic if you are really afraid of cheating.That all said, if you are a Java programmer, why not use LibGDX? It will target HTML5 as an output and you can use tools you are already familiar with. If you are using this as an impetus to learn JavaScript, then I say go for it. If you just want to produce your game, it's often wise to not try to learn too many things at once. In any case. Good luck. I look forward to seeing what you accomplish. More games is always better. Quote Link to comment Share on other sites More sharing options...
Jason4Ever Posted March 16, 2015 Author Share Posted March 16, 2015 Hello, I won't tell you if it's better than flash for your games, I'll leave that to people with this experience. Here is just a sample gample which was made some time ago, it's Command & Conquer. It works on my super old (stone age maybe earlier) computer super smoothly, I didn't try multiplayer though, so I don't even know if it works, but you can check it out with your friends and see for yourself. Yes, javascript is usually processed by your browser so the code is visible in this way, anyone can check it and anyone can copy it if needed. There are some ways how to make your code less readable but you can reverse each of these processes to get the readable version back, so no way to hide your code from other's eyes, you can just make it more difficult.Besides that, there's 'server version' of javascript called node.js, with this you can run some part of yoru game on server and just some bits on user machine (so only those bits are seen be the user). Although, I can't tell you about it's performance this way, I can only guess that it would increase the requirements for your server hardware and connection quite a bit (?). Personally I can't see a reason why to hide your code from others maybe except cheating (which is a pain to deal with javascript, but server version helps here quite a bit)? Game code is nothing world breaking so it's not like you are programming some research in physics, chemistry, etc, which could be stolen from you. Just my humble opinion, correct me if I'm wrong. Either way, in the end the browser needs to get javascript to interpret it in a way it understands it, so you can't encipher it and send it to the browser because the browser won't understand it?Hello, I Appreciate your rich response , Frankly i just saw many samples of Games by HTML5 , awesome!!. But still scary from going into a dead point after starting building my game with HTML5 + Javascript and discover that it's not possible to continue with it , for Example : - Using flash i'm sure 90% i can build my game idea because already i saw many huge games have same idea and built on Flash - Using HTML5+javascript I'm sure 55% i can build my game on it but still worried about the the technology in my advanced steps in my game. Specially HTML5 as i know still new. ** Note: I tested a HTML5 game on IPhone4 browsers (chrome, Safarie) and it was so slow , and i tested same game in HTC mobile , was good but wasn't portable when you move your mobile screen to be wide position. I Apologize i know that i'm in the center of HTML5 forum but I'm new to both of Flash and HTML5 , so i need to take the ideal decision for building a successful project and achive good marketing. so i need more opinions and clarifications those will help me more Quote Link to comment Share on other sites More sharing options...
d13 Posted March 16, 2015 Share Posted March 16, 2015 so i need more opinions and clarifications those will help me more Another option might be to build your game in OpenFL using Haxe: http://www.openfl.org OpenFL is an open-source version of Flash which can publish to the Flash Player as well multiple other sources, including HTML5, desktop and mobile.If you're not sure about which technology to commit to, OpenFL might be a good way to hedge your bets for now. Quote Link to comment Share on other sites More sharing options...
Elvarion Posted March 17, 2015 Share Posted March 17, 2015 There are many wrappers for native application, that manages with HTML5. From my perspective - using HTML5 you'll get wide auditory with on-line stores and platforms. Porting game to the mobile platform will not hurts you and can be made in one-two days. Flash is the same as HTML5, but requires additional plugins and not supported by all mobiles. My choice - HTML5 Quote Link to comment Share on other sites More sharing options...
Jason4Ever Posted March 17, 2015 Author Share Posted March 17, 2015 There are many wrappers for native application, that manages with HTML5. From my perspective - using HTML5 you'll get wide auditory with on-line stores and platforms. Porting game to the mobile platform will not hurts you and can be made in one-two days. Flash is the same as HTML5, but requires additional plugins and not supported by all mobiles. My choice - HTML5Great, so you will not worry about your game's assets ? and code ? if some one stolen your hard working easily ? is there a method for avoiding that ? Quote Link to comment Share on other sites More sharing options...
Ashkettle Posted March 17, 2015 Share Posted March 17, 2015 If somebody wants to steal your assets and code, they will. There is no platform out there that cannot be decompiled and robbed of the code and resources. If you are exposing it to the client machine, they can get to it. Come up with something great and it won't matter. People can clone it (and likely will if it's good) anyway, even without the code. drhayes, Jason4Ever and d13 3 Quote Link to comment Share on other sites More sharing options...
AzraelTycka Posted March 17, 2015 Share Posted March 17, 2015 Great, so you will not worry about your game's assets ? and code ? if some one stolen your hard working easily ? is there a method for avoiding that ? Ehm, I'm back once again. You are so worried about getting your code stolen, that i have to ask why exactly? Do you have some innovative algorithm which has never been discovered until now? Then go for patent if you want to sell it.Otherwise there's no reason to be so hooked up on the idea of exposing your code. Honestly what is so worth stealing about your code which other games/programs already don't have? There are tons of engines, finished games, examples, testing materials, there are literally dozens of sites where you can just walk in download their code and run in in your computer with a giant headline 'This code is free, use it however you want it, enjoy!'. So why would anyone exactly bother 'stealing' your code, what is so worth and special about you and your code that you need to be on a safe side with a computer game? The only time I'm worried about it is when I'm doing research in chemistry and can't afford to let my code be sean because of math behind it, but with games to be so worried about getting your code stolen feels kinda weird. Just let them have it if they want it's not like they or you need to build all the coee yourself either, you'd be stupid to do everything by yourself too (with big games) and it doesn't really hurt you. What makes it worth is your game license and that's yours not theirs. Just an opinion. Jason4Ever 1 Quote Link to comment Share on other sites More sharing options...
Elvarion Posted March 18, 2015 Share Posted March 18, 2015 Great, so you will not worry about your game's assets ? and code ? if some one stolen your hard working easily ? is there a method for avoiding that ?Yep, I do not worry about that. Flash is also not closed. Even native applications, is not closed. If you're targeting to the mobile market - wrap your HTML5 with smth like NativeCanvas or similar. Installed app assets are not accessible for regular user. From other hand, hacker will break your game anyway will it be Flash, HTML5 or C++ - doesn't matter. Jason4Ever 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.