h1

A romantic evening on the landing pad

April 29, 2008

Yes, Biff and I just spent a very romantic evening together. And by “romantic” I mean, of course, full of infuriating debugging.

There are landing pads now. Well, there’s one. So you can fly up to it, slow down, and land your plane to get back to the plane selection/arming screen. Relaunch!

The nasty debugging came in when I noticed that after relaunching, your plane is much faster. Faster acceleration, faster turning rate, etc. This is bad. I was led on a wild goose chase thinking that somehow the plane entity was having its turning rate and whatnot added onto itself, hence getting faster with each relaunch.

Of course, incredibly incorrect. I stared blankly at the wrong code for a while. Sort of watched a movie (The Man From Earth: definitely not recommended) while I did the staring. Run more tests. No luck.

Once the [hokey] movie was over, I had a sudden realization. The launching caused the player entity to be respawned, meaning there are two references to it in the sprite manager (or three, or four, etc depending on how many times I landed and relaunched). Only one instance, but two references. So the sprite got updated twice every frame rather than just once, thus doubling the acceleration, etc. Always obvious in hindsight.

Anyway. I set up the entities so each instance can only be spawned once. This might come back to bite me later.

h1

Parsing booleans: a new-fangled invention

April 16, 2008

I’ve made an effort when writing Biff to keep it compatible all the way back to Java 1.4.2. A lot of people still have this old version installed, since it was so popular back in its day (also, GTGE is 1.4.2 compatible, so I thought I’d stick with the engine). I’m running 1.6, but I’m quite aware that not everyone is.

For the most part, this means no enums and a lot of casting objects stored in Vectors. A lack of enum is a bit silly (from the beginning, if you ask me), but can be worked around. And Vectors don’t get used a whole lot, so overall I haven’t regarded this as a big deal.

Take, however, these two extremely similar methods: Integer.parseInt() and Boolean.parseBoolean(). They each take a String and return the equivalent primitive. Obviously very handy when you’re reading sprite data files or whatever as text and you want actual values.

parseInt() has been around forever, and I’ve used it many times, so I was not surprised to find an equivalent in the Boolean class. Except I just noticed that parseBoolean() has only been included since Java 1.5. Why it hasn’t been there from the beginning, I don’t know. Did Sun think that integers are the only values that might occasionally be stored as strings?

The dumb thing, of course, is that as a result Biff needs Java 1.5 to run, despite my attempts to the contrary. And the thing gumming up the works is, of all things, parsing a text file.

h1

2008-04-14 build available

April 16, 2008

It’s been a couple of weeks since I released a new version of Biff. I attribute this mostly to my transition from one continent to another. A thirteen-hour timezone change does not help one’s coding brain.

That’s not the only reason for the delay, however. There’s a bunch of new stuff to gawk at. Arming interface, new menus, limited (but recharging) weapons … etc. She ain’t pretty, ’cause a certain graphics man I know went and took off to Japan, but it works.

Biff Hawkins: now with slightly fewer bugs!tm

The download page.

h1

Biff says, “It’s time to save the world.”

April 3, 2008

This is a website that will tell you how things are going in the amazing, edge-of-your-seat-exciting world of Biff Hawkins and the Space Whales from Outer Space!

I’ll put up a download here soon, once I’ve got some bugs ironed out. It’ll be fun. I promise. I’ll also put up any neat pictures or music or whatever whenever it gets created.