Blade Edge

Computer software | Video production | My life in general

Blade Edge main header

Teh Video!!11one!! – TGB is my Bitch

December 8th, 2006 · No Comments · Software

Transposed from Gaiiden’s Scroll

Yes, as you can see by the time on this post – I have been up all night determined to get this stuff finished. I went waaaaayy beyond what I had planned on accomplishing tonight – so much so that it was hard to find a place to stop and be satisfied with the day’s work. Wow. I actually just had to put my wireless mouse back in its charge stand a few minutes ago because the battery was running low

Techno mumbo jumbo time. If you want the video, skip to the bottom

So what’s done? Well, I started as I had planned, with getting the blocks to drop properly onto the playing field. I used the level editor to test all this rather than scripting the block creation at that time. I had wanted to apply a constant force to all the blocks, and then they would collide with each other and stop, then when a block was deleted the constant forces applied to the above blocks would cause them to automatically drop down. Awesome right? Unfortunately TGB’s collision system doesn’t work the way I had hoped. The constant force caused all the blocks to constantly collide with their neighbors. It wasn’t a visible effect, but the engine would have ended up generating hundreds of unused collision callbacks and possibly dragged performance. So I had to implement my own drop system, where when a block collided with another, it would cancel its constant force and collision callback call. When a block is deleted (destroyed) I used the onRemove() callback to search above for a block. If found, I apply a constant force on that block and re-enable its callback. Then that block looks above it, and so on and so forth up the stack. It was amazingly simple to set up in TGB actually. Even still, I made a suggestion on the GG forums about modifying the collision detection a bit.

So after I got the blocks dropping properly, my next step was to actually generate the blocks in script and drop them into the player’s clips while displaying the countdown banner to the game start. I got hung up for a while here because I had forgotten how the schedule() function works, since I use that to drop blocks onto the clip at a steady pace. Finally I made it so the blocks were randomly generated, so the same type of block wasn’t dropping down all the time, and each clip generated the blocks belonging to its player.

Banged that out, and moved on to implementing dropping blocks from the clip onto the playing field, first with just one player’s input keys, and then once that was ironed out I added in the second player’s input. Then I had to add some debug tools, namely the ability to move the drop cursor anywhere on the board I want and then destroy blocks manually, since I don’t have the block interactions programmed in yet.

Now that I could destroy blocks I was like, well why not implement the special blocks? These are blocks players get as rewards for taking out opponent blocks. For each 10 blocks you kill, you get a special block, which pops up under your clip Mario Kart-style (even sounds like it too ) cycling through till you hit your special block release key (it’ll also be auto-selected after 10s in the near future – simple schedule() add). Then you hit the key again to release it onto the play field, where it lands and has a certain effect depending on the type of block. if you hold on to your special block, the meter fills up red and if you pass 10 kills again, you lose the chance at earning another block and the meter resets to full yellow (this is all demonstrated in the video).

Last but not least I added in sound effects for all the actions going on during the game.

Now, I had a few bugs show up while developing this latest build – blocks seemed to get hung up for no apparent reason while dropping if I dropped them too fast from their clips. For some reason I didn’t come across this problem while making the video, using a release version of the game. Huh. Works for me

So! That’s enough of the techno mumbo jumbo – on to the video!

Okay, the dearth of comments is starting to annoy me Now you got some real candy, I want opinions!!

I might take a break this weekend, I’m not sure. But by Monday I plan to at least have some minor block interaction going on. There will definetly be another video released sometime next week showcasing full-on block battles.

Okay I guess I’d better go nap. Along with other stuff, I have to go get my car’s window reset tomorrow afternoon. The dealer wanted $90 to fix it cause I’m out of warranty, luckily one of the dads of the girls on the preteam at the gym works as a mechanic at an Infiniti dealer up the road, and he told me to just bring the car over his house and he’d take care of it. Awesome!! I love connections.

Don’t forget those comments people! I’m dying for some feedback here!

Tags: ··

No Comments so far ↓

There are no comments yet...Kick things off by filling out the form below.

Leave a Comment