Jump to content
  • Advertisement
  • entries
    740
  • comments
    957
  • views
    731746

BB Update, Demo Night V, GGE

Sign in to follow this  
Gaiiden

85 views

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.
Sign in to follow this  


1 Comment


Recommended Comments

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!