| This post has screenshots of some of the hottest maps for the computer strategy game Lux. Images below the cut (work-safe).|
Luxtoberfest is a series of tournaments and awards for my Risk inspired computer game Lux.
There are lots of maps (RSS) and people in the running for the Lux Awards. You have 1 month to send in your votes...
|Ancient Lux teaser screenshots|
| Here are a few screenshots from Sillysoft's upcoming game Ancient Empires Lux.|
|Dustin quoted in USA TODAY|
| I was quoted in a USA TODAY article that was just published. My thoughts are pretty inconsequential to the piece (written about Sun CEO Jonathan Schwartz's blog), but it mentions my name and Sillysoft (and Vancouver), so that's pretty cool.|
How did this happen? Well, I read Schwartz's blog (since my business is pretty heavily tied to Java I like to keep up-to-date with the big picture going on at Sun) and occasionally comment like the opinionated guy that I am. On May 22 I got an email from the USA TODAY article's author. He was contacting some people who had posted comments on Schwartz's blog with some questions he had. I whipped off a reply the next day and forgot about it. Then today voila, the article popped up in the Google alert I have set up for "sillysoft".
|Java 4k Games Contest Winners|
| I was just amusing myself with some of the winners of the Java 4k games contest. The requirement for the contest was that each game could only take up 4k of space. This is quite a drastic limit, and it makes for some interesting results. None of the games have great graphics or sound, as it would be impossible to fit. There are a few games that have interesting and/or fun gameplay though, and I think that's what this contest brings out best.|
The games that I liked the best were Miners4k (the number 1 winner - I wish it didn't crash on level 4 every time - I want to play more!) and Balls4K. A bunch of the others are cool too. As long as you have a decent version of java installed you can use the 'Play via Webstart' links to quickly run the games from your browser.
For comparison purposes, the main jar of Lux which contains all the game logic and some built-in graphics and sounds is 4,839 k in size. The installer, which includes map graphics and other stuff clocks in at 9,008 k.
|Apple is stopping cocoa-java enhancements|
| I just saw that Apple is freezing cocoa-java development. Good thing I already ditched it myself last year. You gotta think ahead of the curve to survive.|
|Mac OS X 10.4 java bugs|
| There seems to be a few problems with Lux (actually more like with Java) on OSX 10.4. |
Problem 1 is that drawing an image into Graphics clipped with a GeneralShape polygon draw ugly boxes on top (a screenshot). I have a workaround for this problem (use a TexturePaint to draw the image into the shapes), but it's slower then the clip method.
Problem 2 is that the menubar gets duplicated for a JFrame if the window gets hidden, disposed, and then showed again. Repeat this continually and the menubar will fill up with unlimited items.
Both of these things have been reported to the Bug Reporter and to the Apple java-dev list. How's that for a good time, eh?
|Fun with swing and java2d|
| Here's a cool article with some java2d/swing tricks including painting something in the corner of a JScrollPane so that it's visible no matter where they scroll to.|
| How did the creators of Lux make non-rect areas clickable?|
|The IGF finalists are 10% java|
| An interesting thing about the 2005 Independent Games Festival finalists is that 10% of them are written in java. I am keenly aware (in a good way) that my game Lux uses java. The other java game that I saw is War! Age of Imperialism. So out of the 20 different games there are 2 written in java. This gives a pretty solid 10 percent.|
In my view the independent scene is where java stands to make the most inroads in game development. All the big established game dev houses have a commitment to C++ in the form of their existing code, the associated tools and the accumulated experience of their coders. There is no way that they are going to ditch that investment by moving to a new platform.
The place where java can compete on a level playing field is with startup studios. These guys don't have a big investment in C++. Their choice of platform will be made based on the actual cost/benefit of starting from scratch with either language. In this situation java has a much better chance of being used.
Anyway, I am going to use this nomination as an opportunity to submit my game to java.com again. Maybe this time I will get a reply. They do say "the third time's the charm".
|Generate a random (alphanumeric) char in java|
| Today I got a nice use out of the Kodors search engine I previously mentioned. It gave me a nice java class to generate random alphanumeric chars (and Strings).|
Of course I actually found this page using google (out of habit), but I recognized Kodors when it gave the result. Cool.
|Hey cocoa-java, go $@%* yourself|
| When I first created the user interface (i.e. all the windows) for my game Lux I used the cocoa-java library that Apple provides. This allowed me to use all the native Mac OS X window components, to really act as a 100% mac application does. People who have macs really like it when their apps blend in to the scenery, and I am no exception.|
For a time it was good. OS X Lux grew in popularity until it became worthwhile for me to also write a java swing interface so that Lux could run on windows (and other java-boxes).
However, as of late the amount of strife that cocoa-java has been causing me has become unbearable. It used to be that sometimes there would be a rare crash from the bowels of the cocoa classes. The recent Mac OS X 10.3.5 update has amplified these by about 58 times. To such an extent that Lux is unusable.
I struggled for multiple days trying to figure out if I was doing something wrong so that I could fix it. No dice though. The crashes can be lessened, but not wiped out.
So I have decided to take the rather drastic step of ditching out on cocoa-java altogether, and modifying the java swing interface to be as nice on the mac as possible. It was a tough decision to make. The cocoa-java side of Lux is really very nice, at first I was filled with a significant amount of dread at the thought of replacing it with a shabbier look. Using swing means that I cannot use drop-down sheets anymore. The swing JTable is noticeably not-as-mac-like as the cocoa NSTableView. JComboBox is not a perfect match for a NSPopUpButton. There are many more little things like that, and they all add up.
However, to quote a user: "who cares what it looks like if you can't play it because of crashes?"
Goodbye cocoa-java. The time we had together was nice, but I have to move on. You've become too unstable for to deal with. Maybe if your parent gave you some more attention things would be different, but that is not the case, you seem abandoned from all sides. Well that's fine baby, Lux can survive just dandy without you. Just you watch.
|Some java humor|
| I just read a rather funny article about java's inner and nested classes. (It's informative too).|
|Getting the usable screen area from java|
| A while ago I declared that I was going to post regular updates on my work with Lux. So far I have failed miserably at that. I am going to try again starting now.|
Yesterday I changed some code for the Windows version so that I check the usable screen real estate when opening windows, rather than just the screen size. This way things don't overlap the start menu/taskbar (even if it's on the side or top of the screen).
The required java call is the the highly intuative (or not)
Rectangle usableRect = GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds();
|ResourceBundle files with foreign accents|
| I asked Luxers to volanteer to translate Lux into their language and have gotten some responces. I am using the Java ResourceBundle internationalization class to do the lifting. At first I was a little bit stuck by the file-encoding. By drfault Macintosh files are encoded in MacRoman (a superset of ASCII I think). For java to like all the accents they have to be replaced by their unicode escape sequence. This lovely FAQ told me that I could convert them easily using the native2ascii tool. It looks like it comes with the JDK too, because it was already on my puter. Yay!|