BB Update, Demo Night V, GGE

posted in Gaiiden's Scroll
Published February 21, 2007
Advertisement
Tuesday, Feb 20

Blitz Blox Update

I coded the first special block action tonight, and it went very smoothly. The first block I implemented was the Clip Block. When a player deploys a Clip Block, it lands on the stack and then every single block residing in the clip of that player's opponent is destroyed. Since player clips take 12 seconds to fully reload, that's quite an impact! Here's the code for the Clip Block:

//---------------------------------------------------------------------------------------------// Name        :  takeSpecialAction// Object      :  Blocks//// Arguments   :  type        - the kind of special block (see globals.cs)//             :  position    - the coordinate location of the block//             :  player      - the player this block will affect (sometimes the opposite)//             :  iteration   - used to track multiple instances of this call for a single special block//// Description :  based on the type of block, decides what action is to be carried out//---------------------------------------------------------------------------------------------function Blocks::takeSpecialAction(%this, %type, %position, %player, %iteration){   if (%type == $SPECIAL_BLOCK_CLIP)   {      // which player?      if (%player == $PLAYER_ONE)         %clipColumn = $P2_CLIP_COLUMN;      else         %clipColumn = $P1_CLIP_COLUMN;               // destroy the next block in the clip      %block = bbSceneGraph.pickPoint(%clipColumn, $P_CLIP_TOP + ($BLOCK_SIZE * %iteration), BIT(0), BIT($BLOCK_LAYER));      if (isObject(%block))      {         Player.changeKillCount(%player, 1);         eval("alxPlay(sfxBlockExplosion" @ getRandom(1, 3) @ ");");         %explosion = new t2dAnimatedSprite() { config = "playfieldBlockExplodeConfig"; };         %explosion.setPosition(%clipColumn, $P_CLIP_TOP + ($BLOCK_SIZE * %iteration));         %block.safeDelete();      }            // keep going till we reach the end of the clip      if (%iteration < $MAX_CLIP_COUNT)         %this.schedule(mFloor(1000 / $MAX_CLIP_COUNT), "takeSpecialAction", %type, %position, %player, %iteration++);   }   } // end takeSpecialAction


As you can see, I take advantage of iterative function calling (sort of like recursion, but without the stack unwind) via the schedule function in order to destroy each block in the clip one a time, instead of all at once, in a single second and allow the game to continue to progress in the meantime. It works perfectly. I was going to make a video, but I'm going to wait until all the special blocks and the chain reactions are in before I do.

Demo Night V

It was good to attend a Demo Night for the first time in 5 years. I showed off Galaxy Conquest (then built with my SDL-based Katana Engine) at the original Demo Night back in 2002. Scheduling conflicts have hampered me ever since. But tonight I was able to get up to the city to see what my fellow developers are working on in the NYC area. The highlight of the evening for me was Large Animal Game's Snapshot Adventures: Secret of Bird Island, since it was developed using TGB and also using TGB's 3D modeling capabilities to great effect. I was also impressed by the editors they had made for the game as well. I'll be posting full coverage of the event on GDNet sometime next week, so stay tuned for that!

GGE

Just a quick blurb that I continue to be impressed by the GGE site. It's cool to find new features almost every time I login to fudge with my account (which is daily, for the most part), and they're certainly listening to feedback I've been offering. If you're not signed up yet, get up off your ass and join already. It's a great resource for getting your name and your games out there for public consumption, helping other devs by commenting on their games and finding players for your games - to name a few! Just do it.
Previous Entry Good start to the week
Next Entry Scheduling Goodness
0 likes 1 comments

Comments

Ravuya
I would love it if there were a local 'demo night' I could go to, but alas.
February 21, 2007 09:39 AM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement
Advertisement