Jump to content

  • Log In with Google      Sign In   
  • Create Account

Programming Language for Multiplayer Programming


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
9 replies to this topic

#1 Sid_TheBeginner   Members   -  Reputation: 157

Like
0Likes
Like

Posted 25 June 2012 - 09:27 AM

Which Languages are used for specifically Multiplayer Programming in Games? I've basic knowledge of Computer Networks and would also be having Advanced Computer Networks soon and also "High Speed Network Architecture and Protocols, Neural Networks later" in my college..Will these subjects help me in learning Multiplayer Programming?
I'm interested in Networking altogether. So how does Networking come in games and which languages are used?
I'm new to programming and have begun with C++. Sorry for not narrowing my question. In short please enlighten me about multiplayer programming in games...
Thanks,
--Sid

Sponsor:

#2 Gazu   Members   -  Reputation: 216

Like
0Likes
Like

Posted 25 June 2012 - 10:22 AM

I'm currently looking into that topic too.
I don't think it's a question of what language to use for it. At the moment I'm trying to get some open source examples for network architecture and it seems most things you will find there are c++.
But I think basically any language which features some network capabilities, like TCP/UDP sockets for example, should be fit for programming multiplayer games of any genre.
It really depends on your understanding of networking mechanics, so yeah, I think those classes you are going to attend at your college will be very beneficial for you.

I would suggest, just pick any language you are the most comfortable with, and just start making any networking-related little programs, like a little chat application or anything like that.

Edited by Gazu, 25 June 2012 - 10:23 AM.


#3 Sid_TheBeginner   Members   -  Reputation: 157

Like
0Likes
Like

Posted 25 June 2012 - 10:34 AM

Hey thanks for your reply! I'm currently learning C++ The learning curve seems steep. But I'm just pushing myself Posted Image When a large program runs I'm motivated else a bit restless Posted Image

#4 SimonForsman   Crossbones+   -  Reputation: 6304

Like
0Likes
Like

Posted 25 June 2012 - 11:05 AM

Which Languages are used for specifically Multiplayer Programming in Games? I've basic knowledge of Computer Networks and would also be having Advanced Computer Networks soon and also "High Speed Network Architecture and Protocols, Neural Networks later" in my college..Will these subjects help me in learning Multiplayer Programming?
I'm interested in Networking altogether. So how does Networking come in games and which languages are used?
I'm new to programming and have begun with C++. Sorry for not narrowing my question. In short please enlighten me about multiplayer programming in games...
Thanks,
--Sid


C++ doesn't include sockets so you will have to use either the socket library that comes with your OS (Winsock for windows) or a crossplatform wrapper library.

Sockets allow you to send data from one machine to another over the network. To make a networked multiplayer game you need to figure out what data you have to share and how to share it (a client-server model is probably the easiest).
I don't suffer from insanity, I'm enjoying every minute of it.
The voices in my head may not be real, but they have some good ideas!

#5 Felix Ungman   Members   -  Reputation: 1066

Like
0Likes
Like

Posted 25 June 2012 - 11:08 AM

One way to start is to take a look at some multiplayer library (something like RakNet or similar), and see how it would work in a simple game (like pong).

openwar  - the real-time tactical war-game platform


#6 ApochPiQ   Moderators   -  Reputation: 16397

Like
1Likes
Like

Posted 25 June 2012 - 01:05 PM

Networking by itself is generally not a significant consideration when choosing a language (or, more likely, a library) for a new game.

Other things are far more important, such as (in decreasing order of relevance):

- What platform(s) are you targeting?
- What kind of game is it? Turn-based? Real-time? 2D? 3D?
- How important is performance?


If you're targeting, say, Android or iOS devices, your language options are going to naturally steer you towards Java and Objective-C respectively. If you're on the Xbox 360 or PS3, you're in for C++ and maybe some versions of pure C. On the PC, if you're doing a desktop game, sky's the limit; use whatever you like. If you're doing a browser game, be prepared to choose between Flash/ActionScript and HTML5/JavaScript.

The type of game also matters. You can do multiplayer 2D games just fine with something like Python or Ruby or whatever other language you fancy. If you want to do a hardcore realtime 3D shooter with all the latest fancy effects, you're back to C++ (or using a pre-built engine, which is far smarter than trying to write your own).

And of course performance can always play a role. As before, if you just want a simple game, use a powerful, high-level language that you already know. Even a good chunk of more complex, action-oriented, graphically-intensive games can be done in languages like C# or Java with ease; c.f. XNA for example.

Basically, C++ is a waste of time unless you're trying to target cutting-edge games on current-gen or next-gen consoles. If you don't fall into that camp, use the language you know best (or like best) and just pick a networking library for it. Netcode can be written in basically anything.

#7 Sid_TheBeginner   Members   -  Reputation: 157

Like
0Likes
Like

Posted 25 June 2012 - 08:27 PM

Thanks for all the wonderful replies. I think I'll stick with C++ Posted Image

#8 hplus0603   Moderators   -  Reputation: 5706

Like
0Likes
Like

Posted 26 June 2012 - 03:52 PM

If you aren't yet very comfortable with all the features and idioms of your language, you should not also start trying to do multiplayer programming. Multiplayer programming adds a distributed systems aspect to your game, which adds as much more complexity and failure possibilities as you already have. Experience shows that trying to learn it all at once doesn't work.

enum Bool { True, False, FileNotFound };

#9 wood_brian   Banned   -  Reputation: 197

Like
1Likes
Like

Posted 26 June 2012 - 04:20 PM

I'm currently looking into that topic too.
I don't think it's a question of what language to use for it. At the moment I'm trying to get some open source examples for network architecture and it seems most things you will find there are c++.


I have some open-source, marshalling and networking code here.

#10 Gazu   Members   -  Reputation: 216

Like
0Likes
Like

Posted 27 June 2012 - 02:03 AM

Thanks man, I will have a look into that :)




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS