What programming languages and software would be most suitably used to create an online, multiplayer browser game?
What I had in mind was an MOTCG (Multiplayer Online Trading Card Game) that'd be turn-based and run in your browser. It would pit two players against each other online to play through turn by turn. Some questions are coming to mind, though, such as:
1. What programs/IDEs could be used to create the described game, and in your opinion, which is the most efficient?
1-A. Would having the game run in the browser add complications (in other words, would it be easier to make a client that is downloaded by the player rather than played in the browser)?
2. What programming languages would be used?
3. How difficult and time consuming would something matching two players together online and saving their cards, stats, level, etc. be to program?
Thank you very much for your time and answers!
Browser game programming languages
What programming languages and software would be most suitably used to create an online, multiplayer browser game?
What I had in mind was an MOTCG (Multiplayer Online Trading Card Game) that'd be turn-based and run in your browser. It would pit two players against each other online to play through turn by turn. Some questions are coming to mind, though, such as:
1. What programs/IDEs could be used to create the described game, and in your opinion, which is the most efficient?
1-A. Would having the game run in the browser add complications (in other words, would it be easier to make a client that is downloaded by the player rather than played in the browser)?
2. What programming languages would be used?
3. How difficult and time consuming would something matching two players together online and saving their cards, stats, level, etc. be to program?
Thank you very much for your time and answers!
1) That depends on what language you choose, Adobe Flash or one of the free Flex IDEs work just fine for Flash based games, for Java you could use netbeans, eclipse, or some other Java IDE, you could also use Unity.
1-A) Not really, the main drawback with Flash is its lack of hardware accelerated 3D, Java has a slightly lower installbase (which means that your end users might end up having to download and install the Java runtime) (Java can handle hardware accelerated 3D in a browser though), Unity is a complete game engine and the only real limitation there is that you can't extend the engine itself. (It also still suffers from a fairly low installbase)
2. ActionScript (for flash based games), Java (For Java based games), or JavaScript/C#/Boo for Unity, you could also use JavaScript/HTML5 but the browser support is still fairly weak for this, If you're adding a server component you write this using whatever language you feel like (For HTTP based servers ASP.Net(C#), PHP and JSP(Java) are popular choices, for standalone servers C#, Java, Python, C++ and many other languages are commonly used)
3. Not that difficult for a turn based web game unless you're looking at high efficiency. (in its simplest form you could just use a php script that stores and reads moves from a database and outputs it as xml data that is read by the game (Its not a very efficient solution though as HTTP has a high overhead, xml data is verbose and a database is primarly meant for persistent storage, not as a tool to share temporary data between players, for a turn based game however this isn't a major problem)
What programming languages and software would be most suitably used to create an online, multiplayer browser game?
To build the game you describe, I would build it entirely in Javascript.
I would use HTML + CSS + JavaScript for the user interface. Moving cards around on the screen, and highlighting for drag-and-drop, is not particularly hard in modern JavaScript (use helpers like underscore and jQuery).
I would use Node.js for the server. This is because it's easy to implement "long polling" through node.js. Node.js is single-threaded, but it's highly unlikely that you will run into those limitations anytime soon. When you do, you can run multiple servers on different ports on the same machine, and let the matchmaking service make sure that two players in a match connect to the same game server.
The benefit of this approach is that your game will work on most web browsers, including iPhone, iPad, Android, etc. Flash does not run on iOS!
See the other thread about double-buffered long poll, or my blog post on the same topic, for more details. Note that, in your case, the pain of using HTTP that I talk about there won't be particularly hurtful, because your game is turn-based, not real-time interactive.
Thank you both for the replies, they've been a lot of help.
However, I'm still a little confused on the right approach.
I've heard Flash has a higher user-base, but does not work on iOS, so it might be a better idea to use JavaScript even though it isn't as frequently used. Is that correct?
However, I'm still a little confused on the right approach.
I've heard Flash has a higher user-base, but does not work on iOS, so it might be a better idea to use JavaScript even though it isn't as frequently used. Is that correct?
I've heard Flash has a higher user-base, but does not work on iOS, so it might be a better idea to use JavaScript even though it isn't as frequently used. Is that correct?
JavaScript is used by almost every web page on the web. What makes you think it's not frequently used?
Or are you referring to games, specifically? Old browsers had problems trying to do interactive things in JavaScript, but that was long ago -- and for your card-based game, even old browsers should work fine!
I thought Wikipedia said that not as many people had Java installed as those with Flash, as in some kind of plug-in that let them use programs on the web that required Java/Flash.
I thought Wikipedia said that not as many people had Java installed as those with Flash, as in some kind of plug-in that let them use programs on the web that required Java/Flash.
Java has a lower installbase than Flash, but JavaScript and Java are two completely different languages, JavaScript is an implementation of ECMAScript and is included in virtually all browsers (The only one i know of that doesn't is Lynx) while Java is a language and runtime created by Sun (owned by Oracle now), The primary similarity between the two languages is the names. (C# and Java has far more in common with eachother than JavaScript and Java has)
[quote name='GHMP' timestamp='1308629430' post='4825809']
I thought Wikipedia said that not as many people had Java installed as those with Flash, as in some kind of plug-in that let them use programs on the web that required Java/Flash.
Java has a lower installbase than Flash, but JavaScript and Java are two completely different languages, JavaScript is an implementation of ECMAScript and is included in virtually all browsers (The only one i know of that doesn't is Lynx) while Java is a language and runtime created by Sun (owned by Oracle now), The primary similarity between the two languages is the names. (C# and Java has far more in common with eachother than JavaScript and Java has)
[/quote]
Way back when, when scripting was added to Netscape Navigator, Sun paid Netscape to rename the scripting language to "JavaScript" and change the syntax from a LISP/Scheme-like syntax to a brace-based syntax. The main reason was to create exactly the kind of confusion we see above, to improve the perception that "Java is everywhere!"
The installed percentages of various technologies are approximately something like:
JavaScript: 100%
Flash: 97% (so about 3% of browsers are iOS :-)
Silverlight: 75% (Netflix uses it!)
Java: 65%
Unity3D: 12% (very rough estimate)
Most of these stats come from www.riastats.com. Note that the Unity3D plugin has a super-simple install process, so requiring a user to install that will probably only turn away about half of potential users, so it's actually a better choice than you would first think if you want 3D in your game.
I understand now...was just a little mixed up in the similar names, heh...
Thanks for all the help!
Thanks for all the help!
Hi,
I would actually not recommend using javascript because you will run into a lot of browser compatibility issues that need to be ironed out before you can really have a cross browser game.
Flash definitely helps solve this problem and gives you a much better coding environment that javascript can provide.
The company i just work for released a game similar to what you describe, and it took 4+ months with atleast 12 people working on it.
Im sure you could get a prototype up by yourself and not have a problem it really depends on what features you need.
There are a variety of socket server you could use such as electroserver and there are a few other options out there.
If your worried about price could build your own server using apache Mina or Red5 which is open source but that will take more effort.
Hope this helps...
(javascript can be very good for games and i have seen it uses but for heavy tweening and artwork it takes a toll)
I would actually not recommend using javascript because you will run into a lot of browser compatibility issues that need to be ironed out before you can really have a cross browser game.
Flash definitely helps solve this problem and gives you a much better coding environment that javascript can provide.
The company i just work for released a game similar to what you describe, and it took 4+ months with atleast 12 people working on it.
Im sure you could get a prototype up by yourself and not have a problem it really depends on what features you need.
There are a variety of socket server you could use such as electroserver and there are a few other options out there.
If your worried about price could build your own server using apache Mina or Red5 which is open source but that will take more effort.
Hope this helps...
(javascript can be very good for games and i have seen it uses but for heavy tweening and artwork it takes a toll)
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement