Archive for the ‘Java’ Category

A history of Circles

Monday, February 15th, 2010

Not too long ago I uploaded my second tech demo, Circles. Very small, very simple and was built also as a tutorial for my framework.
Circles ScreenshotBut it’s history goes back a lot further then that.

The version on my site is built in Java but originally it was built in Ruby using OpenGL. It was something small I’d knocked up in an hour called Physics Balls and built for an easy-going weekly competition called the Wednesday Workshop over at SoCoder. You can find it here.

The original Circles, on SoCoder


Overall it went down like a lead balloon. “Not much of a game” was the description given, and the consensus from most users. But that wasn’t the end!

During my time at university I’ve been very priviledged to be able to work with the Greenfoot team building example scenarios, testing and creating worksheets. The software allows you to easily build games and interactive scenarios with very little code and includes an web portal, the Greenfoot Gallery, where they can be uploaded. One of the projects I uploaded was a newer version of Physics Balls: Circles, and later it was included in a combination scenario I built: the JL235 Collection (which I thought was really cool, but people weren’t that impressed).

Some of my GreenfootGallery scenarios

Last year a book was released for Greenfoot for which I was asked if I could provide my Circles scenario. So I’m in a book, WOOT! Here is the book…

Inside this copy looked as though it had been through a washing machine


and in Chapter 10 on page 157-158, is Circles!

Circles, but my name is wrong! I never call myself 'Joe Lenton'

So is that it? Of course not! For my third year project at uni I’m building a highly concurrent framework in Erlang for which I’ve also made a version for another small tutorial…

In this version each Circle is updating in it's own seperate process

Next week, the magical Square!

BOOOO! Oracle

Friday, February 5th, 2010

Sun were giving all their products away for free and wasn’t making any money. To help out Oracle buys Sun. At first I thought this was excellent news because both companies have exceptional products, but neither have many flagship products (note flagship) that directly compete with each other. So it seems like a good mix.

This was until I received…

In short, Project Kenai is closing and taking my open source sf-library along with it. BOOOO!

So I’ve had to move the whole project across to Google Code. But it has me annoyed because Project Kenai is clearly prettier then Google Code:

However what really is quite worrying is that the JOGL project (Java OpenGL bindings) will also be closing along with Project Kenai and there are no plans to move it back to it’s old home java.net or to anywhere new (but there are some custom branches around on github). But it annoys me as yet another example of how Java, a very mature and successful language, is failing to capture the desktop market. I did a blog post a month or two ago mentioning WebGL which will allow you to do 3D in the browser, yet you’ve been able to do it for years with Java. It’s crazy it doesn’t get more support for this kind of thing from Sun,.. sorry, Oracle.

BOOOOOO!

Java, with no Java!

Wednesday, December 30th, 2009

A few weeks ago I saw this video on channel 9 about the new hardware acceleration features being added to IE9. In reality this is nothing new, I saw news reports of Mozilla talking about adding similar to FireFox at least a year ago. But to see it in action brought home a certain reality.

One of the key selling points for me using Java for building my games is that all of the graphics are hardware accelerated, all thanks to the OpenGL bindings. There is no worry about the number of images I’m using and if they are transparent. With hardware accelerated support in the browser this advantage is just no longer true.

The need for hardware acceleration is apparent if you look at some of the current high-end HTML 5 examples. There are some great ones over at Chrome Experiments.com, my favourites being a partial port of Another World. But some others make my PC grind to a crawl. However even with HTML 5 I’d then have to write all my games in JavaScript; a language far more combersume and limiting then Java.

Java to JavaScript

So next enters GWT, the Google Web Toolkit. A library for building GUIs in JavaScript. But what’s interesting is that it’s written and compiled from Java code.

I’ve been playing around with it over the last few weeks and if you’ve got any experience using something like Swing then you’ll find it a synch to use. They have a nice page showing all of the core widgets included here, but even nicer is their mock mail app example.

The potential here is that I could write a game in Java and not have to rely on the plugin being present. But even if the graphics are hardware accelerated it’s still not the same without the OpenGL bindings. Lots of little effects and tweaks I’d like to perform for which I need them to be able to perform. The solution? WebGL!

GFX FTW!

A new standard in development (here) and already supported by FireFox, Chrome, Opera and Safari (although it seems only via experimental nightly builds on FF). This would be perfect and is what I’d love to be using. It’s just a shame that only one of those browsers has a percentage of users in the double digits, and even then nothing compared to IE. Until that changes it’s just not practical to use. That pains me.

Any JVM bugs users experience automatically get blamed on my games (that is where the user saw them occur). It’s also not as cross-platform as I once thought (although still excellent at this). I’d ultimately love to have the same environment I have right now, writing Java code that uses OpenGL, but with no actual Java backend. That would be heaven.