Java vs JavaScript. Why not both? aka. Browser war again!

Not trying to be a cool kid… or am I but Java is old and JavaScript is cooler, way way more cooler. I’m leaving this shitty language, it’s can not run in the browser anymore. It’s outdated and have invullable security problems, CAN NOT MAKE GAME,… bla bla bla… <----PUN INTENDED! Don’t take this lame joke seriously

Ok, let take a look at this.
http://examples.jsweet.org/jsweet-examples-threejs/webapp/webgl_materials_normalmap.html1

JSweet is a transpiler from java to javascript. http://www.jsweet.org/1
and compare to other competitors, it’s not ugly and useless :slight_smile:
Threejs is the js rendering engine for the browser and its have huge community and a editors also.
three.js / editor
Whitestorm is a new js game engine toss the coin about the concept of React component and game in the browser (focus in physics)
https://whsjs.io/#/

After being a battle debate whenever java is doom in the browser recently in the forum. Yes, this is the light of the bright future. I did a prototype porting JME concept to javascript sometime ago, so I have quite expriences with doing stuff back and forth with java, jme pipeline and browser.

Now I really want to see if I can do it easily with combination of jsweet and threejs. check my github https://github.com/atomixnmc/jmonkey-js

I had a deep look for both bleeding edge java and javascript techs available. But I see the most important and key feature of a java game engine like jME is the java language its self and a tons of libraries available. Another very strong point is the IDE and the concept of jME (app, node, control, state) is very clean and pure genius. Combination with core libs such as the ZayES to open up the component aspects or the animation, AI lib or blender pipeline… You can see the powerful toolset we had and will have. Also open up the web world will bring much more audiences to the comunity to push it forward.

May be it’s an new era begin, time for us to come back to the browser… (pun intended after the infamous topic). SO, we can still write it in java once and run anywhere! Just like the old time!

5 Likes

:frog: I mean, i’m always in the front line when it comes to defend javascript against common misconceptions.

But javascript is simply too chaotic for big programs like jme. And java does not have security problems nor is outdated, on top of that, js is full of branding (:wink:).

3 Likes

This is bound to be a nice pleasant conversation…

No flames around here. :slight_smile:

Can someone hand me a Cookie™ and some Beans™ for my cup of Java™? :slight_smile:

Seriously…
I think the space is interesting. If cross compiling to Javascript becomes as easy (sic) as Android then we have something.

5 Likes

My friend used threejs, he couldn’t get a skeletal animation to run. I tried to help and it just refused to work. Long story short it was a nightmare that no one seemed to be able to solve.

Furthermore using javascript turned me to drugs and crime.

5 Likes

In many states, “drugs and crime” is redundant.

Kind of like “software development and flagellation” :slight_smile:

1 Like

Threejs is not that bad at all :slight_smile:

But jme3 is much better, that why I will break our core component into package (jsweet candies) and post them in my github. It’s amazing how some part (abstract out of native things) can run directly without a single error. Like the animation timeline or even the skeleton framework. It’s so awesome to be as abstract as java after all huehuehue

1 Like

After I used javascript I joined the flat earth society.

Is Whitestorm built on top of threejs? If I was ever to commit heresy and use something other than JME, it’d be Godot engine, recently heard about it and the latest in development version looks cool. But then we would need some flagellation.

I checked out the links you provide. maybe your idea is something. However I agree that JME community must be a pure java community. So I suggest to make new community outside JME community and make it unofficially related to JME community. If you use github you may use gitter.im or something to create the community.

1 Like

I don’t know if I agree on that. I mean having more plattform we could write games isn’t a bad thing and when I got it correctly it is still pure Java just when you make the packages there is a new option for web browsers by this java to javascript translation. It will be most probably a new project but still highly jme related. I’m interested and don’t want to discourage anybody to contribute to jme.
I see so many cool new stuff prospering everywhere around jme that I not even find the time to look in all that.

3 Likes

It would be neat if the tech + work gets it to the point where it’s like Android deployment. ie: some extra steps and setup but ultimately just another deployment option.

Maybe that’s impossible now (?) but surely the tech is working in that direction. And it’s not like the Android deployment problem was simple, really.

Yes, it would be great. The techs revolve everyday, don’t know if things will get old or be replaced any time. I think the Java via JavaScript to get back close with browser is the “only” reasonable choice at the moment. It’s not a big pain, just a few more config lines in the gradle file and we have a pack that suite the web. I’m preparing a demo. I will let you guys know when it finish.

1 Like

In the (so call) jmonkey-js which I want to make here, Threejs (or what ever) is the API underlying, just like lwjgl. We are the game engine on top of that. By providing some concepts, some implementations and some tools, and a strong community we are good to go. We don’t find anywhere more fit than this community to share this idea. And why do we have to stick with only Java at all? We can use Java do game programming, and use another runtime to distribute it. Anyway, there is a degree of things that should or should not do to keep the engine as pure as its self now. But let’s explore the potential directions first! Cheers,

I think you should give JSweet a shot.

I’m looking forward to your demo.

Depending on how much your code depends on typical Java APIs, you might also want to take a look at http://www.teavm.org/. They are building a full-featured JVM running on javascript, down to all of the standard libraries being available.

Hi,

I know about teavm. It is interesting but it’s not a mature solution yet. The problem is the standard library is nothing compare to usage of js-interprop libraries and java-ecosystem libraries as jsweet provide here. It bring to the table the real deal of intergration between java and the browser for example use of jQuery, backbone … inside java or use of popular java lib as guava or reactive… Of course I want to know more about the other solution also, please tell me if you know more details as if i overlooked. Thanks

Check out how libgdx does it. They use google’s GWT to transpile to javascript and html5.

I like your idea actually. I offer the suggestion for new community just because hopefully your idea may go on. And I am wondering ist it possible to use your jmonkey-js not just for browser solution but for other purpose. For gui /lemur or android game or something maybe?

Initially i thought you were going to propose to dump java in favor of js. But if the goal is making a deployment option with this transpiler, it might be interesting.

GWT is not that good :slight_smile: it’s not suitable for wide range of application beside of UI especially for games, it’s heavy and you know outdated already. Libgdx went that path because there is no alternative at the time. Another thing to consider is jsweet offer much more things in the term of interoperable. GWT or teavm can also be an option for deployment of course but I prefer to go with lastest trend instead of digging the deprecated solution.

Good to know, thanks. I wish you the best of luck on your endeavors. It’s going to be tough, haha. Would be incredible to have this in jmonkey

1 Like