Programming Language for Multiplayer Programming
#1 Members - Reputation: 157
Posted 25 June 2012 - 09:27 AM
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
#2 Members - Reputation: 216
Posted 25 June 2012 - 10:22 AM
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.
#4 Members - Reputation: 3830
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).
The voices in my head may not be real, but they have some good ideas!
#6 Moderators - Reputation: 8424
Posted 25 June 2012 - 01:05 PM
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.
[Work - ArenaNet] [Epoch Language] [Scribblings] [Journal - peek into my shattered mind]
#8 Moderators - Reputation: 3376
Posted 26 June 2012 - 03:52 PM
#9 Banned - Reputation: 197
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.







