Home | Reviews | GUIpedia | Forum | Fun500


BrandonWhich language for a networked 2d game?
I often think that I'd like to write some type of 2d multiplayer game that I could play with friends, but I can't decide what language and library to use. So I'm here asking you, if you were trying to make a 2d multiplayer game, and could use any language/graphics library/networking library, what would you use and why?
2013-09-207:43 AM

pharoahRe: Which language for a networked 2d game?
I'd use JavaScript: - You don't have to get your friends to install something - The UI tools are really advanced - you can make certain parts just using HTML controls - If you're doing a tiled game, you can use an array of references to DOM image objects and just change the source, instead of using canvas There are some disadvantages, mainly latency. If you need events to be sent around quickly, you'll probably want to use websockets or the comet technique, both of which have significant drawbacks in terms of good backend support compared to AJAX type calls. Also, you can't do P2P stuff, you need to make a server. But if it's for your friends, you can just throw it on a free tier EC2 (or even Azure) instance.
2013-09-212:17 AM

ToddRe: Which language for a networked 2d game?
JavaScript is good although I don't know how many browsers support WebSockets. I'd recommend Python since it has a very simple TCP sockets library. Plus if you design a protocol for your game, I feel like Python makes it easy to wrap everything into a class with great ease.
2013-09-2212:02 AM

pharoahRe: Which language for a networked 2d game?
It looks like almost all the modern ones support them: http://caniuse.com/websockets However, if your friends are willing to install Python (or you figure out how to compile it), then that's a good choice. I wrote a networked game in Java and a client in Perl once, and that went fairly well also. In any case, if you're writing a server, you need to understand threads.
2013-09-227:30 PM

geekbasicRe: Which language for a networked 2d game?
I would recommend QB64 or FreeBasic as your free alternatives. If you like C++, this might help: http://qt.digia.com/ I would also recommend Blitz Basic greatly. Run Basic Might also be worth a try. A Javascript/PHP/Database combo is much more involved as you know. Something that might help would be the new HTML5 canvas tags.
2013-10-022:33 PM

geekbasicRe: Which language for a networked 2d game?
Python is a great language for networking.
2013-10-022:34 PM

Blog


2021 Brandon Cornell