Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

Do you think it is technically possible to write a fully-fledged 3D MMO client with Browser JavaScript - WebGL for graphics, and WebSocket for Networking?

  • Do you think future MMOs (and games generally) will be written with WebGL?
  • Does today's JavaScript performance allow this?
  • Let's say your development team was you as a developer, and another model creator (artist). Would you use a library like SceneJS for the game, or write straight WebGL? If you would use a library, but not SceneJS, please specify which.

UPDATE (September 2012): RuneScape, which is a very popular 3D browser-based MMORPG that used Java Applets so far has announced that it will use HTML5 for their client (source).

Runescape HTML5

Java (left) and HTML5 (right)

UPDATE (June 2013): I have wrriten a prototype of a WebGL/WebSocket based MMO: https://github.com/alongubkin/xylose

share|improve this question
3  
Mozilla Firefox and Opera just dropped websocket support for security reasons: heise.de/security/meldung/… See gamedev.stackexchange.com/q/6524/450 for cross browser abstraction of the network stuff. –  Hendrik Brummermann Dec 15 '10 at 22:08
2  
I think all three of these questions are interesting, but I'd rather have them split into three questions. In my mind they're barely related. –  user744 Dec 17 '10 at 12:09
2  
Technically it's possible, yes. Realistically is another matter. –  The Communist Duck Jan 21 '11 at 16:10
    
As a side note: Google made a JavaScript library on WebGL that is pretty cool: code.google.com/p/o3d –  Alex Beardsley Jan 24 '11 at 16:24
    
My assumption is that your question implies a 3D MMO. 3D is not a requirement for the genre, and in fact many MMOs have exist on the web for years as little more than HTML forms (See urbandead.com) Not to mention all the PHP games from Gameforge (en.gameforge.com) or the more exotic AJAX/Javascript stuff like Lord of Ultima (lordofultima.com) –  wkerslake Jan 24 '11 at 21:24
show 2 more comments

closed as not constructive by Anko, bummzack, Josh Petrie, Byte56, John McDonald Jun 6 '13 at 19:17

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

10 Answers

up vote 7 down vote accepted

Do you think it is technically possible to write a fully-fledged 3D MMO client with Browser JavaScript - WebGL for graphics, and WebSocket for Networking?

Yes, absolutely. There is no reason WebGL or WebSocket technology would prevent you from making a 3D MMOG client, or any game client for that matter.

Do you think future MMOs (and games generally) will wrriten with WebGL?

Yes. I believe within the next five years, most 3D browser games will be written using WebGL. The reason is simple - WebGL is the only standardized 3D technology that will have implementations available in every major web browser (Chrome 9, Firefox 4, Safari 6, and Internet Explorer via Chrome Frame).

Does today's JavaScript performance allow this?

Yes. JavaScript performance in modern browsers has increased to the point where 3D game development is feasible. For example, see the Three.js project.

Let's say your development team was you as a developer, and another model creator (artist). Would you use a library like SceneJS for the game, or write straight WebGL? If you would use a library, but not SceneJS, please specify which. Thanks!

Use a library to save time. There is no reason to write your own WebGL graphics code unless an existing library is missing features that you need. Even in that case, it would probably be more time efficient to extend the existing library.

For my project, I am using GLGE as it supports many different graphics effects and is constantly being updated with new ones.

share|improve this answer
2  
The question "Do you think future MMOs (and games generally) will wrriten with WebGL?" and the answer "Yes. I believe within the next five years, most 3D browser games will be written using WebGL." are not a precise match for each other... –  Kylotan Feb 28 '11 at 18:20
add comment

Technically possible? Yes. But why bother when web solutions like Unity are available?

Future MMOs written in WebGL? No. Ok maybe but there are web based plugins like Unity that do fine right now.

Today's JavaScript performance allow this? No. Ok yes if you keep your game simple.

Would you use a library like SceneJS [...] or write straight WebGL? Neither. I would use a third party application such as Unity.

share|improve this answer
3  
Your answer is wrong, contradictory and badly formatted. Sorry to be so harsh. If you think op should just use unity say so in a comment to his question. –  oberhamsi Jan 31 '11 at 12:48
    
Ironically oberhamsi, my original answer did just say "Use Unity", but I was told I needed to answer the question more directly. –  Tim Holt Feb 1 '11 at 0:10
1  
Okay, fair enough. I think unity is a very different beast then trying to do it natively in the browser. Sure, you can do anything with a plugin but the question seems to me: what are the limits of native browser technologies. –  oberhamsi Feb 1 '11 at 11:45
add comment

Unity is good. See also Shiva and the Prime Engine.

share|improve this answer
1  
Unity and the Prime Engine have nothing to do with the technologies mentioned though. They are native code plugins. –  Kylotan Dec 16 '10 at 17:26
1  
They are answers in the sense that we are saying, "No it is not a good idea to do this, however here are alternatives." Answers that say, "No but here is an alternative" are a lot more preferable than just "No" –  Tim Holt Dec 16 '10 at 17:41
3  
Sometimes I'd agree, but rarely. There's a danger of trying to read someone's mind and guessing what they 'really' want to do, when actually the original question was perfectly legitimate in its own right. If someone asks about the suitability of X, we shouldn't always reply with "just use Y". At the very least there should be a comparison of the suitability of the two so that we come away knowing more about X. –  Kylotan Dec 16 '10 at 20:25
    
I'll rephrase my answer then to answer his question about what library to use. I'd use the Unity "library" myself :P –  Tim Holt Dec 17 '10 at 0:05
    
top rated answer says basically the same thing.. –  Error 454 Jan 21 '11 at 16:51
add comment

I don't think many future MMOs will be written with any client-side browser technology since most MMO developers will want to use the same language across the client and the server, and most game developers are fluent in non-web languages like C++. There's far too much client-code involved to make it very practical in Javascript anyway, except for quite trivial simulations. There are also other limitations imposed by running in the browser which are unsavoury for a typical game developer.

I'm sure there will be some games like this, however. They're just not going to take over from WoW or similar games for quite a while. They will probably be made more by web developers getting into games rather than games developers getting into the web.

share|improve this answer
    
Does the downvoter want to add a comment explaining how they disagree with my answer? Just wondering. :) –  Kylotan Jan 27 '11 at 15:28
add comment

There are already several Browser based MMOs out there. They usually don't use 3D graphics though.

I'm a bit sceptic when it comes to WebGL. The current crop of browsers don't support WebGL in their normal release builds. You'll have to get special builds or mess with config files, which is more complicated to the average user than downloading a plugin.

Speaking of plugins: Several people mentioned Unity, but don't forget Flash. An upcoming release of the Flash player (code-name molehill) will have GPU-accelerated 3D. My guess is, that flash will provide hardware accelerated 3D graphics in the browser before WebGL takes off.

share|improve this answer
1  
The issue of stable browser with webgl support should not happen after Jan 2010 or so. Firefox 4 and Chrome 9 are slated to come out at about that time. Chrome 9 beta is pretty simple to install and doesn't require messing with anything to enable webgl. The link to the beta edition is bellow the regular download link for chrome. –  Nicolas K. Dec 24 '10 at 0:29
    
@Nicolas K. - Do you mean Jan 2011? –  DMan Jan 23 '11 at 17:25
1  
@Nicolas K - Availability of a browser, and install base of a browser are very different things. 13% of internet traffic is still IE6. Source: marketshare.hitslink.com/browser-market-share.aspx?qprid=2 –  wkerslake Jan 24 '11 at 21:14
    
@DMan: Probably, since it's out now. I can't wait until someone figures out how to bluescreen (or kernel panic, or whatever it is Macs do) a crappy OpenGL driver using WebGL... –  user744 Jan 24 '11 at 21:15
1  
@wkerslake: Those stats are outrageous. I maintain a site aimed at the average internet consumer with half a million unique visits per day, and less than 1% of them use Internet Explorer 6 (about 1/3 use Internet Explorer 7/8/9). Firefox and Chrome stand for 50% of the traffic, and they're self-updating browsers meaning the majority of people will have WebGL support installed within a few months. Since development of a game can easily take 6 months, I see no reason to discourage people from using WebGL today. –  Blixt Mar 1 '11 at 13:32
add comment

This is not feasable right now (early 2011). You can not create a real-time, 3D MMO in native, browser technologies (meaning no plugins).

I won't speculate about the future. This is how it looks right now. Assuming you target only modern browsers (IE9, FF4, etc). If you plan to support IE7 then you are crazy. That will never work.

Things missing:

  • full control over keyboard and mouse (ability to set mouse position, key interception)
  • fullscreen
  • 3D

Areas / solutions with serious problems:

  • WebSockets now deactivated in the few browsers that supported it
    • without it: now low latency, bi-directional client-server communication
  • audio problems
    • codec mess, you need ogg and mp3
    • common frequences not supported
    • concurrancy
    • delay
  • canvas performance (in some cases doing divs & css transformations is faster)
share|improve this answer
add comment

The question you should ask yourself is why will game developpers want to depend on web technology they do not master and have no control over, current langages allows you even in a web browser to make awesome games ?

share|improve this answer
add comment

Yes, but with major caveats.

You won't have full keyboard control, and for many control freaks, this could be a deal-breaker. The F-keys for example will likely remain out of reach for quite some time.

You're not going to be able to hit most browsers, either. WebGL isn't really well-supported yet, and websocket support is hit-and-miss these days, with some browser vendors enabling it for one version, then disabling it for the next.

But you can put together something simple, sure. Throw in some compelling gameplay and it won't matter that the graphics are a little low-key. Runescape started off pretty simple, and grew into a complex, fun, incredibly popular MMO, back when everyone said that an MMO created in a browser plug-in was a pipe dream.

An MMO built withing the current limits for browsers that adapts as things change would certainly have a leg-up by the time that browsers are far enough to support a "AAA" MMO.

share|improve this answer
1  
Almost all of the modern browsers support the function keys (quirksmode.org/js/keys.html#link6). In fact, that page is at least several years old and the support for them in modern browsers is probably even better. –  Ricket Jan 25 '11 at 3:22
add comment

Yes, but the technology still needs to stabilize and there will likely remain performance trade-offs vs native applications.

share|improve this answer
add comment

Absolutely, yes.

WebGL is included in nightly builds of both WebKit (Chrome/Safari) and Gecko (Firefox). WebSockets is currently disabled due to security issues, but there is no reason why it shouldn't be re-enabled once the issues are resolved. In the meantime there is always HTTP.

Will all games be written this way? No, but a significant number will be. Once WebGL is in final versions of Chrome and Firefox the penetration will already be higher than that of native plug-ins like Unity.

JavaScript performance is absolutely up to writing games. You probably won't see a Crysis level of graphics for a while, but remember with WebGL, the number-crunching is offloaded to the GPU.

For a small 2-man team you will need to be prepared to do a lot coding which ever engine you use. There currently aren't any WebGL/JavaScript engines that actually cover much of the game code. SceneJS, three.js and similar are wrappers over the graphics layer, but provide nothing for collision, physics, audio, resource-loading, network or tools which make up the bulk of a product like Unreal Engine, or Unity.

It's early days at the moment, I'd expect to see more middleware emerging over the next year.

share|improve this answer
add comment

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