Java.

My experiment with Java in a high-performance graphics context has “sort of” (perhaps not permanently) ended.  It’s been interesting, as I managed to get a lot more out of it than I did C#, even though the latter is a language I have most of my commercial experience in and therefore ought to be able to get more out of.

The thing is stuff like normal calculation is turning out to be dog-slow – down in the realm of things like reading from the filesystem – and I need to satisfy my curiosity by implementing the same class in C++ to see whether it’s language or design at fault.  For some reason, even with JIT, when you get down into really tight nested loops with lots of trig or memory accesses the bytecode languages start to struggle more than you’d expect from the literature.

Now that’s not to say 3D graphics won’t work in Java; Minecraft being the obvious counter-example, and if you can offload the work to the GPU or have a very simple, low-cost path to throw vertices at the graphics card then you’ll probably gain more from the development speed of Java than you’ll lose in raw FPS.  In other words, if your CPU operations aren’t much more than traversing a scene graph and doing some frustum culling, you’re fine.

Where I run into problems is that my project is doing a lot of data upsampling and streaming, at quite dense detail levels, which means that spending 2-3ms in calculation per scenery tile is already borderline before we’ve started thinking about normal maps, material baking or any other fun stuff you can do to a landscape tile.  It may be the case I see the same results working without the abstraction layer of a virtual machine, and it may be the case I can optimise my Java code better, but the point here is information gathering more than anything.

(Also I want to play with clipmap-based terrain rendering, which means some from-scratch coding whichever language I do it in.  May as well bung the terrain-gen algorithms in C++ as I do it.)

There probably ought to be more to this, and something of my playing with Delaunay triangulations, but blimey, look at the time!

Advertisements
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s