Online MMO Game, jME a good choice?

I'm looking to create a game based around gang warfare. The game should be online, support several hundred users at a time with reasonable 3d graphics.



Would using an applet be appropriate for this type of game? I'm thinking something similar to Runescape, but with better graphics. Or would it be better to use a Java Web Start approach, are there any drawbacks with this? I've read that there are memory/CPU limitations with applets- however the compatibility of current browsers with java applets is what has drawn me towards this language and ultimately engine.



One of the main specifications for the game is accessibility, I'm not looking for a full screen game with incredible graphics, just something that the user can load up quickly from a browser without having to download/install anything.



Am I looking in the right place?



(oh and if I am could anyone point me in the right direction of some applet demo's that push jME/the applet approach to its limit?)



Thanks!

Applets are restricted in many areas, and like you said, memory, which is crucial for a 3d game, also using a 3D canvas would mean greater overhead. This might change when jME2 switches to using LWJGL2 which has the ability to embed a native display component right inside a form without using a canvas.

Well, Java has been traditionally limited to the power of the Virtual Machine in which it runs. Basically, this means that Java in general is weak because it can't utilize hardware acceleration. jMonkeyEngine is able to get around that and be more powerful because it utilizes OpenGL commands, which allow it to get the full handle on hardware acceleration and pump up your graphics. Applets, as far as I know, cannot do this.



For this reason, I would suggest jME.

Trussell said:

Well, Java has been traditionally limited to the power of the Virtual Machine in which it runs. Basically, this means that Java in general is weak because it can't utilize hardware acceleration. jMonkeyEngine is able to get around that and be more powerful because it utilizes OpenGL commands, which allow it to get the full handle on hardware acceleration and pump up your graphics. Applets, as far as I know, cannot do this.

For this reason, I would suggest jME.


I'm not sure I phrased my post correctly, I would be using jME as an applet. Is jME within an applet able to use hardware acceleration, at least to some extent, or is this a problem limited by applets which jME cannot circumvent?

Momoko_Fan, when is this change likely to take place?

Trussell, you can use jME with applets. But the users will see a dialog box asking for permission to run native code on the system.

Trussell said:

Well, Java has been traditionally limited to the power of the Virtual Machine in which it runs. Basically, this means that Java in general is weak because it can't utilize hardware acceleration.


Not true at all.  Java has ALWAYS supported 2D hardware acceleration for many operations for a long, long time.

With the advent of Native Direct Byte Buffers in Java 1.4 it has been possible to address any hardware from Java.  In fact, this is what makes lwjgl, the foundation of JME, possible.


jMonkeyEngine is able to get around that and be more powerful because it utilizes OpenGL commands,


Actually JME calls LWJGL. LWJGL is an OpenGL binding.  The std Java libraries dont have a 3D binding (yet) because it wasnt an issue when they were designed.  JOGL, an alternate OpenGL binding, is mkaing its way into Java.  Its already used under the hood in the latest Java 2D libs.


which allow it to get the full handle on hardware acceleration and pump up your graphics. Applets, as far as I know, cannot do this.


Not true, again.  LWJGL, and thus JME, can be run just fine in traditional Applets.  They just require that you sign the applet and that the user click an approval box to give you permission to run.  Applets do have some limitations, but most can be circumvented by this method.

If you are willing to limit yourself to Java 1.6, Applets received a MAJOR upgrade in  1.6.  They are now effectively Java Webstart Apps that are just embedded in a browser window and have all the power of Webstart apps. One of the limits of pre 1.6 applets that you couldn't sign your way around was that you couldnt set java command line flags such as the memory size.  The 1.6 applets fix this.


For this reason, I would suggest jME.


Its not an either/or situation.  As explained above you can use JME in an Applet just fine.
HOWEVER if you do, be aware that your game will NOT work on computer that does not support OpenGL.  It also will only work on Mac, Win32 and Linux because those are the only platforms supported by LWJGL.

If you want to write a game that will run on any system that supports Java, then you will need to stick to the standard libraries (and probably not do much if any 3D).

I should add that "supports hundreds of players" is a pretty ambitious target.  Especially if you've never written a large scale game server.  Id strongly suggest looking at Project Darkstar to give you a leg up on your server scaling.

Okay, thanks for the replies so far- i've had a rethink on the game then, I'm looking towards setting up a website in flash/javascript/ajax with mysql to handle player data etc. then have a multiplayer java applet game based on jME on a separate page. The applet would use data from the site for the player information and would need to communicate with the mysql database. Would this method of data handling work effectively? Or can anyone see any major drawbacks from this angle? And what other tools would be required?



The graphics would need to be better than Runescape, hence why I've chosen jME for this.

jeffpk said:

If you are willing to limit yourself to Java 1.6, Applets received a MAJOR upgrade in  1.6.  They are now effectively Java Webstart Apps that are just embedded in a browser window and have all the power of Webstart apps. One of the limits of pre 1.6 applets that you couldn't sign your way around was that you couldnt set java command line flags such as the memory size.  The 1.6 applets fix this.


In addition to this, the default assigned memory to an applet in a browser is about 96MB. A very simple game already requires about 40-50MB (such as flagrush). The only way to bypass the 96MB limitation is if the user changes this default setting and assign more RAM however, no one is going to do that.. if they even know it's possible.

Your best bet IMO is Webstart.

is this 96 Mb limit still present in java 1.6 or has this been upgraded like jeffpk mentioned?

They have proclaimed with update 10 this can be resolved…how, I'm not sure. :o

There's a few issues that you are more likely to dodge with WebStart than with the Applet approach.  These have been pointed out above.  In addition, you also get the option to make it standalone (for free) for those people that might not want to use the web to get to it.  I know it's blasphemy, but many such people do exist.  Browsers have a tendency to misbehave a little more that the vanilla JVM.  Of course, I'm probably jaded from some of the evil ActiveX components I have been forced to wrestle with.



Granted, it doesn't take much to think a little about your application entry point to be able to support both standalone and applets.  I think a more valid point is that applets have been and probably always will continue to be intended for small development.  You're talking about burying a fairly memory intensive game inside what may already be a bloated browser (if you are using IE).  :wink:



If what you're really after is the "lightweight" distribution that the web provides, I think WebStart is a better choice for a 3D/networked application.  OTOH, you should also recognize my Swing GUI fat client bias.

darkfrog said:

They have proclaimed with update 10 this can be resolved...how, I'm not sure. :o

The how is that you can now write jnlp for an Applet just like a webstarted app.  Applets  no longer run in a vm embedded in the browser, they launch a priavte VM when they start (like Webstart).
jeffpk said:

darkfrog said:

They have proclaimed with update 10 this can be resolved...how, I'm not sure. :o

The how is that you can now write jnlp for an Applet just like a webstarted app.  Applets  no longer run in a vm embedded in the browser, they launch a priavte VM when they start (like Webstart).


Am I missing something or does this actually mean an Applet is equal to an webstart with the only distinction being it runs (this actually being an illusion) inside a browser?

That's at least pretty darn close to the truth if not the case.

and all that together with lwjgl's applet updates, things are looking good for browser embedding :slight_smile:

What is your MMO based on?

When were done with it, you'll be able to run it of a toaster if you wish  8)