Jump to content
  • Advertisement
  • entries
  • comments
  • views

Blitz Blox gets some smarts

Sign in to follow this  


Friday, Feb 16

Yesterday and today I spent some time coding some basic AI into Blitz Blox. The AI really doesn't do anything right now except
  1. Pick a random column

  2. move cursor to that column

  3. drop a block

Rinse, wash, repeat. While that may not seem like much, it's actually just the foundation on which I'm going to build the more advanced AI. See the AI has two functions, Planning and Execution, which occur simultaneously as scheduled function calls (remember I'm dealing with TorqueScript here). When the Planning function is called, and the AI is in a planning state, the AI determines its move. The more complex its thinking (the harder the difficulty is set) the more times this function is called before a decision is reached. When the Execution function is called, it moves the AI's cursor one column and checks if that's the column the AI wants to be in. If so, and the AI has made a decision on what to do, it drops a block onto the play field.

Simple enough, the hard part is going to be making it appear smart. To do that I still have a few changes to make to the gameplay. In my last entry about Blitz Blox, I was wrestling with the problem of how blocks should interact once they are on the playfield (which I refer as the "stack"). I've decided to take Emmanuel's suggestion, as it really is the only way to keep things under control in various situations. I'm also going to apply a discharge precedence - when a block is first dropped onto the playing field, it discharges before being affected by any surrounding blocks. When a block on the stack drops to a lower row, it is first affected by surrounding blocks before being allowed to discharge.

After that's done I'm going to get all the special blocks implemented, and then I can begin cracking hard on getting the AI up to snuff. We'll see what I can get done next week. Hopefully by Wed I'll be well into getting the special blocks working, and by the end of the week starting to bulk up the AI some more.

In other news, my car is stuck in the damn ice that we didn't shovel the first day it snowed (Wed). And while it was like a 1/4 in of ice, 2-3 in of snow and like 1/2 in of ice layered back then - now that it's thawed and frozen again and again these past two days it's pretty much just a solid sheet of ice now.

Freakin great. [flaming]
Sign in to follow this  


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!