I'm creating a 3d game on HTML5. It's 30% complete and the hard part is already coded. The server is on node.js.Now I'm realizing that maybe it was not a wise choice. This is because I realized:

  1. Three.js still has many bugs. I don't see the same thing on every machine. Each browser, OS, can give different results. I'm afraid my clients will have a great stress installing my game properly.
  2. I have tons of sprites and models on my game. I wonder if my clients will have to load all them again everytime they want to play?
  3. I wonder if a Node.js server will be fast enough to handle it, and I'm afraid it won't be scalable.

What would you advise me? Should I continue and finish the game on HTML5 or is it better to remake it on something else, like Unity3d for the client and (what?) for the server?

  • 2
    \$\begingroup\$ Its really going to be up to you in the end....Unity3D has its own set if issues, the first of which being all of your clients will need to download the plugin, whereas HTML5 is open....what you need to do is a pro's and con's list :p \$\endgroup\$ – the_e Mar 3 '12 at 20:42
  • 1
    \$\begingroup\$ What kind of performance and scaling numbers are you actually looking at achieving? Your algorithm and architecture choices are going to make far more performance impact than language choice. Starting over almost always feels like a good idea but is generally not a great idea unless you've hit an absolutely impassable block. \$\endgroup\$ – Jason Morales Mar 3 '12 at 22:54
  • \$\begingroup\$ Is there anything stopping you using Flash, if you're certain you need to change? Unity might be slight overkill, although you certainly can do 2D with it. \$\endgroup\$ – Engineer Mar 4 '12 at 15:54
  • 2
    \$\begingroup\$ The last 10% of most games requires 90% of the work, so really, you might be closer to 3% done :P Okay maybe that's a bit exaggerated... but its still an important consideration. \$\endgroup\$ – bcrist Jun 11 '14 at 1:32
  • \$\begingroup\$ Dude... the game has been finished 2 years ago. \$\endgroup\$ – MaiaVictor Jun 11 '14 at 16:58

#1: I can't comment on Three.js as I haven't used it. Two thoughts: (a) A lot of the variation is going to be due to graphics hardware. There are certain things you should avoid doing to be consistent across GPUs, which will be the case no matter what 3D engine you use. (b) You can always use raw WebGL instead of any framework, which will get you better performance (due to reduction in abstraction) and might help you detect and work around inconsistencies.

#2 should not be a problem as long as your sprite and model resources are served with proper caching information — make sure your web server is configured appropriately. Check your server logs and your browser's request inspector, and perhaps use RED.

#3: Using HTML5 etc. on the client side does not mean your server has to be in JavaScript. Interoperation is part of the whole idea of the Web. (If you're shoving JSON around, well, there are libraries for that everywhere, not just in JavaScript.) Choose the best platform for the client, and for the server, independently.

| improve this answer | |
  • \$\begingroup\$ Could you recommend a good platform for the tcp server? This is a hard question to make because people think I'm trying to start a flame war, etc., but I just don't know. What are, honestly, the best options? I used node.js because it seemed (and was) very easy and fast to code, and yet it seemed scalable. I had a horrible experience with C++ though. I would spend days and days with almost no progress because of so many errors and lack of high-level language features. \$\endgroup\$ – MaiaVictor Mar 3 '12 at 18:49
  • 1
    \$\begingroup\$ I don't have any large-scale server experience, sorry. However, I think it's probably a good idea to stick with what you've got and work on making sure you have something fun, before you worry about performance and invest the effort in a rewrite in a lower-level language (if that's even necessary). \$\endgroup\$ – Kevin Reid Mar 3 '12 at 19:34
  • 1
    \$\begingroup\$ @Dokkat Most languages have some sort of socket support. Python, Ruby, Java, languages that run on JVM (Scala, Groovy, Clojure, Jython, JRuby, etc.), and so forth. And there are also libraries that allow you to use the Node.js style event queue model in a variety of languages. If you prefer high level languages, stick with them, and continue with Node or choose a similarly high level language. But before you do anything drastic ask yourself: Are you really expecting that high of a load? Node.js isn't C++, but it's still pretty fast. \$\endgroup\$ – michael.bartnett Mar 3 '12 at 22:53
  • \$\begingroup\$ Kevin Reid, okay! And thanks for the great answer. I don't know why I'm not getting good answers lately... Michal.bartnett, thanks too, this was also very enlightening. \$\endgroup\$ – MaiaVictor Mar 3 '12 at 23:20
  • \$\begingroup\$ Oh coming here 2 years later makes me see how silly I was. I remember the doubts I had and feel good for easily knowing the answer of my own questions. Hope some years in future the same happens with the things I currently don't understand (: \$\endgroup\$ – MaiaVictor Jun 11 '14 at 17:00

Not the answer you're looking for? Browse other questions tagged or ask your own question.