Can I write a browser game only using Java?

Started by
11 comments, last by WoopsASword 7 years, 11 months ago

Are you saying that this is an okay way to go about this, converting a Java game into different languages using GWT, or should I just suck it up and learn JS + HTML?

If you're doing web stuff, you're not going to stay away from JS and HTML, regardless of what you use. GTW is one way that allows you to leverage what you already know. You tell me if you want to do that, or learn something new from scratch, or pick something else.

Honestly I havent made web games, although I do web applications (JS, HTML, C#, Microsoft stack). I'm more of a desktop guy in game dev, and I use Java for that.

"I AM ZE EMPRAH OPENGL 3.3 THE CORE, I DEMAND FROM THEE ZE SHADERZ AND MATRIXEZ"

My journals: dustArtemis ECS framework and Making a Terrain Generator

Advertisement

Are you saying that this is an okay way to go about this, converting a Java game into different languages using GWT, or should I just suck it up and learn JS + HTML?

If you're doing web stuff, you're not going to stay away from JS and HTML, regardless of what you use. GTW is one way that allows you to leverage what you already know. You tell me if you want to do that, or learn something new from scratch, or pick something else.

You should be perfectly fine developing the full game in Java using LibGDX. Yes the final code will be compiled to javascript and put on an HTML page, but you do not need to do this yourself. Using other languages to compile to javascript is a growing trend, and there is even a subset of javascript (asm.js) design to run compiled code faster.

It is perfectly common not wanting to do javascript :) and if you mainly care about getting your game out there, you don't need to learn new technologies for now. I did this game fully in Unity and exported to WebGL http://pew.dk/void/ Unity is not known for having a great WebGL export pipeline, so I can only imagine it would run more smooth in LibGDX.

I don't know the current state of networking in LibGDX, and if you are using browser specific features you might need to write a plugin in javascript for that, but for most use cases you should be absolutely fine without.

And just so it's clear: Applets are perfectly fine if you don't want people to play your game ;)

I'd say libgdx is your way to go.

Although for browser games I'd take JS and WebGL for 3d rendering or a framework for text-based (As angular).

If you are serious about development, don't be afraid to jumping into new technologies. It is just a minor part of our profession. (I say minor because we must live in such world to progress).

In another note, you can use three.js, it is an awesome 3d graphics library which can help you create 3D application in the browser.

This topic is closed to new replies.

Advertisement