Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

What 'Things' are required for this sort of game? I understand java, c++, javascript, and objective c (iphone programming) fairly well, however I know nothing about networking programming, but I do know about networking in general (packets, mac addresses all that good stuff)

So this is my main question: for a game like Tribal wars, Evony, Shadowland online, travian, what programming languages do I need to know to take this on and finish it by myself? I'd imagine that most of it will be done in java, but for the whole connecting other players, combat, leader boards and (most importantly) making online payments for things, what languages should I learn for developing something like this?

share|improve this question

3 Answers 3

up vote 3 down vote accepted

I've been considering the same thing but for a Scorched Earth/Gunbound style game.

To make the kind of game you are talking about there are going to be two parts:

  1. The client side (player's browser)
  2. The server side (your game's server). This encompasses:
    1. The language used on the server
    2. The database used to store data

Short Answer

For the client side your two options are pretty much (in no particular order):

  1. Javascript + HTML
  2. Actionscript (Flash)

For server side languages (again, no specific order):

  1. Javascript via node.js (see Bane's answer)
  2. PHP (see Lohoris's answer)
  3. Java (sorry don't really have a link, but you mentioned you are familiar with it)
  4. Ruby
  5. Python

For databases (no specific order):

  1. MySQL
  2. Postgresql
  3. MongoDB (this is a NoSQL database)

Long Answer

The server side can be pretty much whatever the heck you want it to be. You'll likely want support for sockets which PHP and node.js support, making them viable options. Your question mentioned you are familiar with Java and that's a viable option as well. If you're comfortable with Java (and not doing this to learn new languages/technologies) that's may be your best bet.

As far as databases go MySQL and Postgresql are widely supported and established databases. Something like MongoDB is a bit more exotic and may not be supported by your server side language of choice. Me, I'd probably use Postgresql unless I was interested in mucking around with NoSQL or thought it gave some clear, tangible benefit.

On the client side, game interactivity is going to require either Javascript or Actionscript (i.e., Flash). None of the games you called out look like Flash games to me or, if they are, they appear like they could be made without Flash so I'd recommend you stick with Javascript here.

As for integrating with payment gateways and other third party solutions you'll want to checkout things like PayPal and see what they support. Typically they support a few different languages (PHP and some flavor of Microsoft are usually safe bets) and have code samples in all supported languages. The Facebook API is friendly with PHP and Javascript.


Other Considerations

Does Your Game Need To Use Sockets?

Both Flash and Javascript** support socket connections. Flash does this via the Socket class and supports sending and receiving binary data. As mentioned by Bane there is a node.js Javascript implementation of sockets via socket.io. However, binary sockets are not supported and browser support can be iffy (though socket.io compensates for this).

To me this then becomes one of two questions:

  1. Which technology do I want/need to use server side? Or,
  2. Which technology do I want/need to use client side?

In my case I wanted to use Javascript on the client and node.js + socket.io seems to be the best (possibly only, certainly easiest) technology that would enable socket connections to the server. So I'm using Javascript + HTML in the browser and node.js on the server. Another benefit is that I'm using the same language on both the client and the server which is nice.

If I needed binary sockets or wanted to use Java on the server I'd probably choose Flash on the client side. There are a lot of socket servers written in Java for the express purpose of supporting multiplayer Flash games (SmartFox is one example).

** Via WebSockets in most modern browsers.

Can You Get By With Remote Procedure Calls Instead of Sockets?

If you can use RPC (think AJAX) then you're really free to do things however you see fit. Just about any browser (even the shambling corpse that is IE6) supports AJAX calls, as does Flash. Likewise any server technology is going to be able to respond this these requests. If your design allows for this it really becomes a matter of which technologies you prefer.

What Languages Are Supported By Third Party Solutions

If you'll be integrating with third parties you should check out what technologies they support. While there is no reason you cannot run the game server in Java and integrate with your payment gateway in PHP but it would probably be easier to just have it all be in one or the other.

share|improve this answer

You can do it all in JavaScript. For server side, use node.js. That's basically a JS interpreter outside of the browser, so you can run it just like you run Python or other great scripting languages. Not just that, it gives you support for many networking features, mainly you'll be serving the actual content with it. For communication you'll want to use socket.io. These two have great communities that are always being helpful and basically are the future of web-development. It also helps to code both the client and the server side in the same language.

I'm building a browser MMO as well. Here's my dev blog, I describe various problem that you might encounter.

share|improve this answer

PHP+MYSQL+HTML is enough for a start. JavaScript if you want to do AJAX stuff (you want to).

Java is completely unrelated, as is networking, since HTTP will handle this sort of things.

share|improve this answer
    
So the game would be written in java or javascript? And I will definately look into php and those. –  Gabe Dec 1 '11 at 16:04
2  
I told you, no Java. The game would be written in PHP, querying the database in MYSQL, echoing the page in HTML. JavaScript will be used to implement AJAX features. –  Lohoris Dec 1 '11 at 16:35
    
First of all, with over 10 years of experience in software and database design/development and management, I'll have to object to any possible suggestion of using MySQL while there's a much superior (beyond comparison) option like PostgreSQL. It's more capable, more stable, and (performance-wise) more scalable. And second, I'll have to object the suggestion of using PHP instead of Java too. Java is a superior language especially in comparison to PHP. I'm very well aware of the popularity of PHP but all in all it's a badly designed language with great issues on productivity and maintainability. –  uygar.raf Mar 15 '12 at 16:04
1  
And Java would be more productive and maintainable? –  Lohoris Mar 15 '12 at 18:54

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.