Does really game development on Java suck? Why are we still here?

Many games are being shipped with the alternate .NET runtime Mono, why can’t games ship with an alternate JVM runtime Avian?

I didn’t realize Avian was that far along. Ideally they would get Google NaCl support or Playstation Vita support. I will need to check out their iOS pathway.

EDIT: While running samples from Avian’s web page… I got Microsoft virus alerts (I never get these). Something about password stealer? Does anyone know about this?

I love the idea of generating Windows .exe files without relying on any other JRE.

When did porting Avian or the like become hacked console? It’s just a set of code that you build on a machine it does not require that you hack anything.

Yes, there exist jitting JVMs that could theoretically be run on PS and XBox (not iOS). The main issue is that they are very slow compared to the desktop JVMs which are already about half the speed or so of C++, and these devices are extremely limited in power and have some very obscure architectural limits compared to the fairly straightforward design of desktop PCs meaning that these JVMs are even slower than they might otherwise be.

Regardless - the problem is that the entire toolchain, from a AAA studio’s point of view, is missing. From one end - actual developers with game development skills who can do Java - through to the content pipeline integration - right to the deployment, there are simply massive hurdles at every step. Given that the actual coding development is maybe only 10% of the budget of a AAA title why the hell would they want to switch to Java to shave off 2-3 % points off that cost only to a) lose it all working around the totally novel experience of deploying Java on a console b) end up with a game that runs 1/10th the speed they need it to c) have to recode all their content pipeline stuff from scratch because none of it is compatible with a Java-centric world?

Java has made roads in indie development only because of three factors: firstly that the coding part of indie game development can easily account for 50% or more of a project’s total cost and so shaving 20-30% off of that makes a significant impact on profit; secondly because the simultaneous release onto MacOS results in a 10-15% increase in profits as well; and thirdly because there is simply no realistic hope of most indies getting on to a console anyway without a world of pain which is probably the opposite to the experience they first envisaged.

But, iOS.

Shame.

Cas :slight_smile:

I didn’t realize it existed. Looks like a really cool initiative!

While I am pretty impressed at the fact it works at all I can’t help but notice just how lamentably slow it is. And there’s your problem right there.

And still… iOS. We need an AOT compiler, period. Excelsior might have something up their sleeves…

Cas :slight_smile:

Also I should mention JamVM if it hasn’t already been mentioned - it is a complete implementation of the J2SE JVM spec, and the basis of the Dalvik VM on Android. It has JIT, but, again, misses out on 10 years of awesome Hotspot engineering that have made desktop Java as fast as it is today.

Cas :slight_smile:

From a big studio’s standpoint, what’s the advantage? If I’m writing something from scratch, the time difference between programming in Java vs. C/C++ is virtually zero assuming I have equivalent libraries on both sides. But chances are few studios have a pool of competent java programers…so development speed would be slowed by a given teams learning curve of the language and tools. This would be a one time cost…but why would they bother? What’s the long term advantage? Additionally you have the added memory footprint of the VM plus extra code space due to pointer bloat. Then you end up with a codebase that is trivially decompilable and runs nowhere near the speed that a C++ equivalent (no structures, temporal hints, parallel SIMD, etc.). Some of these issues could be dealt with via a custom VM…but what does that buy you other than additional costs (including time to develop/integrate)

If I wanted to advocate Java programming for games what I wouldn’t try to do is go “head-to-head” with C++. Work with Java’s strengths instead. Notably java is a dynamic language, so loading/unloading code chunks is easier (well not really, but I won’t tell if you don’t). So building a good ~100% uptime server with hot-deployment would be a reasonable feather-in-the-old-cap. Doing the same on client/standalone isn’t as interesting as it would really just be a memory footprint reduction technique. Additionally using Java as an embedded scripting language would be reasonable. This is different that writing an entire game from a studio’s standpoint since it would mean one/two bodies on engine/scripting language interface and the folks doing the scripting would be n00bs that aren’t getting payed as much.

I suspect that - working from scratch, with a team of Java developers who also had game development experience - you’d probably realise a pretty significant productivity boost over C++. I also suspect you’d probably get, over several games, a continuous productivity boost through effective re-use, though I mostly base this on my own development practices. But unless you just happen to already have this team of Java game developers handy, you will already be aware of the small part that programming actually has in bigger budget games compared to everything else.

This is not to say that studios have not successfully done it: Jagex, Threerings, and even Popcap back in the day. And at the other end of the scale, little indie boutiques like Mojang (haha), Oddlabs, Puppygames, Swing Swing Submarine, etc. It’s just not that common. But wrt. the OP’s original rant… why should its general rareness in AAA development stop us using it to make games?

Cas :slight_smile:

We don’t really know what the overall failure rate. For java vs. C++ from independents I wouldn’t be surprised if the numbers are similar and that the reason that C++ seems to generate more completed games is just due to the number of bodies making the attempt.

Hm I do not believe there is actually any such thing as “failure rate” in commercial development. In studio terms a failed project is usually one that is canned by a publisher, which will be for reasons independent of the programming environment - be it sudden budget catastrophe or management failure, I’ve never heard of a technical failure before, in either C++ or Java.

Having said that about 50% of our ideas never see the light of day. We get so far with them and then pull the plug because they turn out to be rubbish :persecutioncomplex:

Cas :slight_smile:

Nah, I was referring to groups of 1-5 people that say, “Hey! I’m/we’re gonna make-a game!”

Re: success of “Draw Something” – currently making $100k a day.

Is this a game that couldn’t be written in Java? (I guess, yes, to the extent that it is for iPad, etc., but otherwise?) Is there an existing “game engine” that could have been used to make it?

[quote]The studio, which has been in operation for about four years, had previously struggled to make any traction on the App Store with previous attempts such as Cupcake Corner, a bakery simulation, and Puppy World, a Nintendogs-like game.
[/quote]
Their previous games: derivatives. Might have been made by existing game engines? Game engine = GLUT?

To me its actually more of a challenge to use Java, especially because so many people do not. I know (Visual) C++ and I can use it to create games that run on all Windows platforms, but a few years back I actually ported some code from C++ to Java to play around with it (we’re talking 2D platformer type of stuff). And I was hooked.

My results were pretty staggering (to myself).

  • I did the same with only half the code
  • what took me a month to get right using C++ (including debugging and plugging memory leaks) took me only a week to do using Java; now that I figured out how to properly use the debugger features it is development bliss. That also says something about my C++ skills of course, which were decent but in no way as developed as my grip on Java :slight_smile:

This is quite a few years ago and I already knew that the client side of Java was too underdeveloped to make it a good platform to RUN games on. With good hope I witnessed how Sun started all kinds of projects to remedy that. JOGL, hardware acceleration in Java2D, project Darkstar, even that 3D user interface of which the name escapes me right now. Unfortunately it never became anything that actually moved the platform forward :frowning:

Nowadays game development using Java is “nice”, but I don’t see it developing into anything more. Perhaps its time for a new book with LWJGL as the base and a nice picture of Minecraft on the cover, focused on indie game development.

Greatest idea I’ve read in a while ;D

I agree with you and myself ;D

Avian can compile AOT, it runs on non-jailbroken iOS devices. I actually started using it to port libgdx to iOS. Caveat: only ARM6 support at the moment, that means no native floating point. There seems to be some work done on an ARM7 emitter. However, at the moment i think the best bet on iOS is to use IKVM and Mono(Touch). I’ve done some experiments a while back on the desktop and that works fine, the PlayN guys seem to go that route on iOS at the moment. Benefit: better debugging tools over Avian, which does not implement any kind of debugging protocol.

I don’t know much about C++, mostly because I started on Java and have been reluctant to switch, but it seems that actually getting started as an indie dev is easier in Java. Simply because there is a nice built in library with lots of code already written and built in, and deploying is kind of easier in Java. If you want to ignore the whole “Applets suck, WebStart sucks, having to package a JVM sucks” thing, the cross platform deployment is nice :stuck_out_tongue: The main things that have kept me away from C++ are: The lack of a central GUI/Graphics library, memory management, cross platform is a little trickier. Also I’ve yet to find a C++Gaming.org :wink:

tl;dr Woo Java

As much as I don’t want to send people away from here, gamdev.net is the central place for C/C++.

Mufasa: One day Simba, you will be king of all the Internet. Everything the light touches shall be yours.
Simba: What is that dark place over there?
Mufasa: That is gamedev.net. You must never go there.

Cas :slight_smile:

Meh, it isn’t/wasn’t THAT bad. I’ve had some helpful sessions there during my CPP days. But like any other “big” forum, there is a larger portion of the type of the self-proclaimed “saints of development”; you know, the kind that do not have to provide arguments because there is no way they can be wrong.

The lack of a central GUI/Graphics library, memory management
WxWidgets is quite good and cross-platform and is still maintained. Memory management is of course a good reason to flock to Java or a .NET flavor; perhaps even the best reason. With proper code design it isn’t THAT hard to do, but it still a major dent in productivity to have to micromanage stuff at the code level. Some people thrive on that though, but perhaps that is sparked by the necessity to do it - I used to be like that myself when I was coding C++ and I miraculously lost it when I received the blessing that is Java.