Question about Browser Game Deployment

I have some crazy questions. I like to make web games. I’m just wondering how does JMonkey’s deployment work if I want to make games that could be played in the browser. When deployed as a webgame, does the game become an applet in which a person would have to have Java on their computer if they’d want to play the game or is the deployment constructed in such a way that a person could just pick up and play the game in their browser and wouldn’t have to install anything on their computer? My other question is does it seem like Applets are going the way of beta tapes as in todays times, JavaScript, WebGl, etc. are gaining more ground? Thanks!

Yeah, applets are dead.

3D Gaming in the browser is pretty exclusively Javascript and WebGL these days. (Aside from things like Unity web player which I guess is also on its way out?)

For 2D, I guess there are also things like OpenFL: http://www.openfl.org/

This makes me wish that there was a from Java to Javascript converter program.:cold_sweat:

There are several of these… the most well-known being GWT (Google Web Toolkit). It’s been around quite a while, but I’ve heard it has its fair share of issues (Disclaimer: I’ve never used it myself).

There’s also JSweet which I’ve never used, but if I wanted to transpile Java to Javascript I would probably start there.

You will likely find the following thread interesting: Java vs JavaScript. Why not both? aka. Browser war again!

WOW, thanks Danielp and thanks for the link!! That’s exactly what I need. I never knew about such tool sets! Such toolset seems like something we need as many things are going Javascipt. My last question is has anybody tried using GWT or JSweet to convert their JMonkey game to Javascript? How did it go?

Thanks

No problem, glad to help out. :wink:

Unfortunately you’re right… Javascript and “web everything” seem to be very pervasive right now. Not a trend I’m thrilled about (for several reasons), but tools like GWT and JSweet do seem help to ease the pain somewhat. It is rather nice knowing that there are viable options if one must do web development and doesn’t want to write straight Javascript.

I should also mention one thing you didn’t mention in your post: JNLP (Java Network Launch Protocol). There are plenty of sites that describe it, but I’d add that in practice its a pain to get working right. I don’t think I’ve ever run a JNLP launched Java program that didn’t give me headaches and hassles (and 50/50 chances whether I’d ever get it to run or not). Aside from the possibility of transpiling Java to Javascript/WebGL, I’d say the best bet is to go with a good ol’ fashioned executable jar. If you don’t want to trouble your users with installing the right version of Java, bundle a JRE with your game (this is going to get a lot easier with JDK 9) and write a couple quick n’ easy platform-specific launch scripts to run your bundled JRE.