Adventures in A* pathfinding

A key part of nearly any video game involving things that move around in an intelligent fashion is an algorithm called A*.

Older games relied on fairly simple techniques for moving things around; patterns of movement, perhaps modified with random number generators, maybe moving towards the player’s position if an enemy or down the screen if a powerup. But once obstacles began to be introduced to the playing field it became necessary to figure out ways to move things around them, and A* fits the bill nicely. Give it a starting point and a destination, and it will happily build you a list of adjacent points between the two.

I guess I’m not really stating anything new here since the algorithm’s been around since the late 60s, but it’s really just an excuse to post some video of my own foray into implementing A*. It occurs to me that this could be the software developer’s equivalent of boring people with vacation pictures, but whatever.

[ ... 1960 more bytes remaining; click "Read entry" to view. ]

Inquisitor cheat codes

Inquisitor was recently published on There’s a bit more for me to play before I feel comfortable writing a review, but it’s a fun game so far. Anyway, a rather severe bug ended up permanently draining character stats that were (presumably) meant to be temporarily drained — something on the order of 25 points or around 6 levels worth. Easy enough to fix with the appropriate cheat codes.

Unfortunately, the cheat codes are still partially in Czech. But they work in the English version of the game. Here’s how you use them:

(Update Sep. 16: discovered a few more item codes and added them to the list.)

(Update Oct. 9: added “\addbeing_afriend” code and list of beings.)

[ ... 47799 more bytes remaining; click "Read entry" to view. ]

Will an old PC run Skyrim?

It’s not always easy to find out if an older PC is capable of running newer games, so in case anybody’s searching for it, I’ll throw this out there:

Skyrim runs acceptably on my Intel Pentium D 3.4GHz. The computer also has 4GB of memory and a newer graphics card, a two year old ATI Radeon HD 4850 GDDR3 512MB. Although the game got a bit of a reputation for being underoptimized, I thought it performed surprisingly well given my hardware specs.

A Scrollbar for JavaFX Mobile

I was somewhat surprised to find that JavaFX does not come with a scrollbar component out of the box (if you’re reading this from the future, I’m currently using JavaFX 1.1 with NetBeans 6.5.1.) There are some examples out there for rolling your own — which I haven’t personally tested — such as using a SwingSlider, a component sadly unavailable on the Mobile profile, or a customized mouse-aware Rectangle, but I wanted to create something as near to the desktop experience as I could (easily) manage. If you’re looking for a free vertical scrollbar solution for your JavaFX Mobile application, please read on.

Update: Good news! JavaFX 1.2 has built-in support for scrollbars (and a number of other controls) in the new javafx.scene.control package. These are available in the common profile as well as the desktop profile, so mobile developers now have a set of skinnable GUI controls that should work consistently across the desktop, the web, and mobile devices.

[ ... 4478 more bytes remaining; click "Read entry" to view. ]

Integrating JavaFX and Java

I’m just starting to learn how to use JavaFX, a new contender in the Rich Internet Application arena. In a nutshell, JavaFX is a Java-based technology that seeks to compete with platforms such as Adobe Flash and Microsoft Silverlight by enabling development for desktop-based applications, browser-based applications and mobile phones. One of the nicer aspects of JavaFX is that it easily integrates with Java libraries — you can reuse existing code or develop parts of your application in Java. This way, you can take advantage of the strengths of JavaFX script for graphics manipulation, GUI, and access to web services while continuing to benefit from Java.

Now, it seems clear enough to me how to create and use Java objects from within JavaFX script — basically, import them and treat them like JavaFX objects. However, I got curious about whether it was possible to call JavaFX from Java; happily, it seems that you can. I don’t know that you SHOULD, but you can.

[ ... 3665 more bytes remaining; click "Read entry" to view. ]