Lots of doors are being closed for Java

Last J2ME contract I did was in 2005, and it seemed like it was on the decline back then too.

Maybe it’s still popular in some remote parts of Africa or something, but I would certainly not suggest anyone to get into J2ME dev these days.

Is the Tiobe Index http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html useful at all in terms of gauging a programming language’s health? It seems there is a bit more daylight between Java and C & C++ right now than in a couple years. Also shown: C# & Python on the rise (how much of that is Jython?).

It wouldn’t surprise me if it’s pretty close to reality - java is a very popular language, nobody is disputing that.

It’s just that that’s because most software out there is server/web based in-house stuff.

Java for games has never been popular and I don’t think it’s really getting much better.

Sure no one plays Runescape, AllBinary, Puppy, or other J2SE, J2ME, or Android games… I must be imagining things.

He refers to developer mindshare.

Cas :slight_smile:

Hi guys,

While we’re on this topic… I’ve been wondering lately whether Mono .NET wouldn’t be a valid alternative for gamedevelopment.
As it’s also crossplatform, c# ressembles the java language very much and seems to support all the things we’re missing from Java:

Now I know you guys are prob all in favor of Java, or else you wouldn’t be hanging around here :wink:
But I was wondering if any of you expirimented with this? And if so, what did make you come back?

Thanks!

Martijn

Sure, there are some successful games done in java (I’ve made most of my games with java2d, pulpcore or lwjgl too) but not as many as you’d expect from arguably the most commonly used language in the world.

Indeed, it’s laughable how few games are written in Java. It’s like there has been concerted, co-ordinated effort in preventing it from occurring. All that JOGL bollocks didn’t help, probably deliberately designed to scupper chances of success by dividing the tiny community.

Cas :slight_smile:

I think a big part of the reason is that Applets sucked too much, for way too long (and in some circumstances they still do).

If we’d have the applet experience you can now get with a modern java plugin on chrome under windows or linux (os x is still on the old plugin) 10+ years ago I think you’d see a ton of java games out there today.

What, even with the incredibly obscure rituals you had to perform to get Java2D performing vaguely fast? On some hardware? Java2D is a horribly complicated API, that’s why I turned to OpenGL in the end! More irony. Anyway that ship has sailed, but it still begs the question: why no games being developed in Java now? And the reason always boils down to the same things: no console support, no phone support*. Although I’m not entirely sure why indie developers don’t embrace it a bit more as it’s ideal for desktop games development, as I’ve repeatedly shown.

Cas :slight_smile:

  • sorry tberthel but those games you’ve got there look and play like something from the 80’s not the 90s or even 2000s, minus a decent user interface.

Yes, I think we’d just have gotten something like PulpCore earlier if Applets wouldn’t have (for all practical purposes) died years ago as far as web games are concerned.

The lack of developer interest also means it took a lot longer to get decent game libs and tools (e.g. see how quickly html5 game libs and frameworks popped up within months of canvas/audio becoming usable for 2d games on cutting edge browsers).

It’s almost shocking to think that applets first appeared almost 16 years ago. In time Java has had tonnes of development, but applets themselves have had almost none. They still feel very clunky and heavy when starting up, can be difficult for new developers to get working and have lots of odd bugs. On FunOrb they suggest minimizing and remaximizing if your applet fails to appear, and it’s not uncommon for other sites to write “if it doesn’t work then try refreshing the page”. You don’t get that type of flakyness with Flash or HTML+JS (at least not to the same extent).

But I think the main issue is that although applets are more then capable of out performing their rivals, it’s really difficult to do so. For example there are editors for building pretty UI’s specifically for Flash and Silverlight, whilst none for Java applets (as a result applets always tend to look like applets). Plus so many basic things have been missing like video support. Silverlight is only 4 years old and has none of the big issues that applets do (like fast startup, fully hardware accelerated graphics and video support).

JavaFX was a spectacular waste of resources, the whole java client side team were mending that sinking ship for months with no result. There is still almost nothing to show for it years afterwards, and it promised video playback, fast start up, integration with adobe tools, integration with swing, jogl and the kitchen sink

For me one of the biggest boosts for java games was Ken Russell the engineer who made plugin 2 (and jogl), as well as Chris Campbell and Dmitri Trembovetski who were responsible for giving java 2d proper d3d performance on windows in 6u10.

haha, I’m aware of that issue, its something LWJGL Applets also suffered from in the past but was fixed years ago, too bad funorb use their own opengl java binding :).

Yup they could have easily been where Flash is now but Sun just didn’t care about that market.

Fools in charge that’s why.
Actually JavaFX2.0 showed serious promise. And it’s still twitching. Might be something in it yet.

Cas :slight_smile:

The reason I think Erlang is an unreasonable choice isn’t because of any technical issues, it is because of risk avoidance. Scaling shared state concurrency is a near intractable nightmare and Erlang’s model (actors/messages) is the only reasonable solution that I’m aware of. The problem is that Erlang is a highly complex functional language that one would have trouble finding a pool programmer capable of properly using it. As an aside, I find it interesting that Blizzard/Activision bought DemonWare back in 2007 and WoW nor any other Activision game (to my knowledge) uses Erlang. My thinking is that you can get the same set of features from other languages with less risk.

WRT: “It can handle a high number of threads” - We’re talking about two different animals here. I was talking about “real” threads at the OS/hardware level, whereas actor/message (et al.) systems use “lightweight threads” (fibers, picothreads, etc).

@Roquen: Exactly, and that’s why I said that serious, high-performance server-side programming is done almost entirely on the JVM. Akka is probably a great substitute for Erlang, and since more and more is moving server-side, I believe Java’s place in game programming will only grow.

@Cas: I have high hopes for JavaFX 2, too, but in retrospect, I’m not sure Sun’s negligence turned out so bad. The fact is that client-side is fragmented, and the only technology in consensus is the committee designed and non-proprietary HTML+Javascript. That’s the way the leading hardware vendors want it. They don’t want WORA. Apple doesn’t want Flash. The Playstation and the Wii don’t want to share games. Differentiated software sells differentiated hardware. No proprietary standard stands a chance. However, the client world is becoming so fragmented, with so many different types of devices, OSs and programming language, that developers simply won’t put up with it for long, and there will probably be one or two victorious software technologies. Should Oracle put itself into this dangerous competition, especially without client hardware of its own? Well, I’m sure people in Oracle are pulling their hairs out in frustration over Sun not inventing Android, but that ship has sailed. What should they do now? It’s a very difficult question. The best result they’re hoping for (and the one which will probably be best for the Java community) is some sort of a favorable settlement with Google over Android, which will allow them, and “standard” Java to put its foot in that door.
Other than that - they should hold on and fortify their position on the server, and do well with JavaFX2 to make up for lost developer mindshare.

It can be elegant to have a thread per connection, and because of Erlangs green threads it makes applying this model more straight forward then with say Java. For example there are many comparisons between various Erlang built web servers and Apache, where the Erlang solution can handle a much higher number numbers of connections before falling over and during that time the amount of data it’s outputting barely drops (unlike Apache). Secondly Facebook uses Erlang for their messaging system specifically because it means they can have millions of threads all waiting for data to come in. Using greenthreads is ideal as most of the time the vast majority of those threads are blocked. In short you don’t have to worry if your number of threads spawns into the millions where as with Java and others you need to apply a solution to deal with that (thread pools, runnable tasks, etc).

I learnt Erlang for my final year project at uni and tbh it took me about a week or two to be able to start building complex system with it. It’s primarily just the pattern matching and single assignment that makes Erlang a functional langauge; it’s really on the edge of the definition and it’s much simpler to learn then proper functional languages like Haskell.

That advice on FunOrb predates Jagex using OpenGL. I think the biggest problem was caching the Graphics object and using active rendering.