Bullfrog: Improving AI

I’ve been steadily plugging away at my list of bugs and enhancements for the upcoming release and finally tackled one area that I had been avoiding: improving the AI of some of the bugs.

Most of the bugs had a pretty random set of behaviors depending on how close to the edge of the screen they were moving. But other than keeping them from getting stuck in a corner or wandering off screen, their decision trees were pretty simple.

  1. “How long since the last time I turned?”
  2. “Which direction do I turn this time?”

The only bug that had any intelligence to speak of was the feared mosquito. Since the whole purpose of the mosquito’s life is to harass the player and steal valuable time off the ticking clock, it needed to chase the frog and buzz him. So the mosquito’s decision tree looked something like the following:

Unfortunately, I didn’t have time during the contest to really give any of the other bugs any convincing artificial intelligence. I made a crude attempt at making the Horsefly flee the Bullfrog if it ever came too close, but I was unable to get it to work without the fly trapping itself in the extreme corners of the screen.

With this upcoming release, more of the bugs finally have some “intelligence” to them. I revisited the Horsefly code and was able to rewrite the AI code to give the fly some simple evasion behavior, but it’s now smart enough not to get trapped. Well, okay not quite smart, but it falls back on its random behavior if it gets too close to the edge of the screen. This completely eliminates the trapped fly problem.

With this small success, I also attacked the bee’s AI. In this case, I didn’t want to add any intelligence, but to cause the bee to go into a frenzy when approached by the frog. My approach was to simply increase the bee’s movement speed when the frog came near. This gives the illusion that the bee is agitated by the frog’s presence.

Granted, these changes aren’t rocket science but they do break up the repetitious pattern of random movement at constant speeds.

With these changes “in the can”, I’m down to four items left on my list. Hopefully, I’ll have the time to get these coded and tested in the next week.

The only real hurdle left is finding a way to test the Universal Binary so that I can include that as part of the release.

Site Changes

Finally, I have replaced the default WordPress header image with something a bit more appropriate to this site’s content.

I’ve also added by email addy to the sidebar for easy reference. Sorry for the lack of an easy “mailto” link (stupid spammers).

A nice new Bullfrog icon now adorns the top of the sidebar. Maybe, I’ll get more click through traffic to the game’s free download page.

I’ve relegated the Google Adsense stuff down to the bottom of the page. I have a feeling the ads will eventually end up in the great circular folder in the sky. As I start pushing my own games as products the need and distraction of the advertisements will be minimized.

Bullfrog: Top Priority Bugs Resolved

Tonight, I completed the last of my top seven prioritized “cases” for the next release of Bullfrog.

I have twenty total issues assigned to this next release, though a large portion of them are of the nice-to-have type. Depending on time, we’ll see how many of them actually make it into the release.

As part of the development going into this release, I’m putting FogBugz through its paces. So far it’s performing very nicely. I’ve been looking for an easy to use bug tracking tool and everyone seems to rave about FogBugz, so I decided it was time to give it a shot. I’ll be sure to let you know if I decide to stick with it.

Bullfrog: Next Release

I started work on the next release of Bullfrog this weekend.

There was a short list of bugs and features that I didn’t have time for prior to the OMG Cup deadline. So, while I’m brainstorming on what the next project will be I thought I may as well try and knock some of the items off the list.

One of the top items on my list was to build Bullfrog as a Universal Binary. This turned out to be pretty easy to do, but the hard part is getting my hands on an Intel Mac so I can test the build prior to releasing it.

I’m considering the “big upgrade” from my 800Mhz Titanium PowerBook to the new MacBook Pro. But, the financially prudent approach would be to head over to the local Mac retail store and give Bullfrog a test run on a display model.

I’m also considering making the jump to submitting the game to VersionTracker and similar download sites. I’m very interested in what kind of traffic this would pull in, especially for a simple freeware game. It seems like this would be a good test and learning experience.