Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to make real-time network games in JavaScript

Is it possible to make real-time network games using JavaScript? I've seen flash do it, but I'm interested in making a multiplayer browser-based game that doesn't depend on any plugins. I've read that it is impossible to keep Ajax connections open for streaming communication, and it isn't feasible to make several new Ajax connections per second to keep the client in sync with the server.

like image 611
thejoshwolfe Avatar asked Oct 09 '10 22:10

thejoshwolfe


People also ask

Can JavaScript be used for gaming?

JavaScript can be used to make games using a variety of platforms and tools. Both 2d and 3d libraries can be used in combination with JavaScript to create fully-fledged games in the browser or external game engine platforms.

Can you build games with node js?

If you want to learn or refresh your skills in Javascript, you should make a game using Node. js. If you're already a Javascript developer, you should teach others how to make a game in Node.

Is JavaScript good for mobile games?

So for web-browser-based games, 2D or 3D, JS is native, so JS is a natural fit. For iOS/Android, it's not, but there are a load of frameworks for 2D games that will build for native.


1 Answers

Use WebRTC instead of WebSockets for access to peer-to-peer and UDP. See here: Does WebRTC use TCP or UDP? and WebRTC vs Websockets: If WebRTC can do Video, Audio, and Data, why do I need Websockets?

like image 82
michaelkoye Avatar answered Sep 22 '22 20:09

michaelkoye