Would Javascript suffice?

Started by
2 comments, last by M3 E 10 years ago

o.k, So I want to program a multiplayer game that runs in one's web browser. I want players to be able to log into their accounts and then join the 3D world that is being hosted by a server. the players then use their browser as a client to interact with the backend server and other players.

I'd like to program all of this using JavaScript and Html5 for graphical components.

I'm going to use libs from Node.js and Three.js and if it's compatible with Windows, Pomelo for it's scalable server libs.

thought's on choosing this route? Once I get going I don't want to have to jump to another language because it has better tools to handle the requirements of them game.

Advertisement

I resently made a project using Three.js and the API is really good. I made something similar to a 3D modeling tool (you can upload your 3D model, material and textures, apply transforms, compose a complex model and export it in another format or save it in the server to modify it later) so for the graphic part I think you'll be OK, but you need to be good at JavaScript too.

For the login and some other stuffs (a chat if you're planning one, for example) you can use HTML directly and save time. You can make a div that looks like part of the canvas, or you can draw some elements over the canvas with some CSS (like a "saving" message in a corner).

Also, if you want to do a multiplayer game relaying on the web browser would save some work related to sending packages and working with asynchronous requests.

The bad part is that HTML and JavaScript sources and the requests that the browser does are really easy to modify, so you'll need to pay extra attention for hackers, you'll have to add lots of checks server side.

Some months after I started the project of the 3D modeling tool I found TypeScript, but it was too late to change. If you're more confortable with typed languages maybe you can try that, it's a language that compiles to JavaScript (you can type pure JavaScript mixed if you need to) but it adds support for classes, inheritance and type to variables, and you can use it on Visual Studio.

thank you for the heads up about typescript.

This may seem silly, but I'm actually going to begin this project using both JavaScript using a variety of free development libs, and Unity. I'd like to compare the two and then choose between them to make my final choice. I imagine that using JavaScript would allow just about anything, but would be limited by the amount of time needed to actually realize the project, where as Unity may be quicker to get something tangible up and running, but may be more difficult to do what the mind's-eye desires because of production limits with the free version.

This topic is closed to new replies.

Advertisement