Sign in to follow this  
Sid_TheBeginner

Programming Language for Multiplayer Programming

Recommended Posts

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

Share this post


Link to post
Share on other sites
Gazu    216
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

Share this post


Link to post
Share on other sites
Hey thanks for your reply! I'm currently learning C++ The learning curve seems steep. But I'm just pushing myself [img]http://public.gamedev.net//public/style_emoticons/default/huh.png[/img] When a large program runs I'm motivated else a bit restless [img]http://public.gamedev.net//public/style_emoticons/default/biggrin.png[/img]

Share this post


Link to post
Share on other sites
SimonForsman    7642
[quote name='Sid_TheBeginner' timestamp='1340638028' post='4952679']
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
[/quote]

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).

Share this post


Link to post
Share on other sites
ApochPiQ    23000
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 [b]far[/b] 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.

Share this post


Link to post
Share on other sites
hplus0603    11347
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.

Share this post


Link to post
Share on other sites
wood_brian    193
[quote name='Gazu' timestamp='1340641377' post='4952693']
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++.
[/quote]

I have some open-source, marshalling and networking code [url="http://webEbenezer.net/build_integration.html"]here[/url].

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this