• entries
740
957
• views
730314

# Yey blocks go boom!

86 views

Monday, Dec 18

Well this weekend was fun and relaxing. I chilled out all day Sat, slept till like 3:30 in the afternoon - but that was cause I was up till like 8am playing The Sims and SimCity. So I played games and chilled the rest of the day. I had workout at the gym on Sunday, made a cool $40 for 2 hours and went out to a huge mall up north and spent it all and then some on xmas presents. I figure I'm about 35% done with my shopping. Yep, right on sched, haha. I gotta have the ritual Xmas Eve mall run :P Yea I'm horrible... So today I did some catching up on emails and stuff from over the weekend and started in on the block interaction code. I went through two revisions before I settled on a routine I like. At first I was going to set up a switch() statement and say something like: switch(%srcBlock.type){ case$ATTACK_BLOCK:        switch(%dstBlock.type)        {            case $ATTACK_BLOCK: case$DEFENSE_BLOCK:            case $NEUTRAL_BLOCK: } case$DEFENSE_BLOCK:...

To explain, I was taking the block that had just landed on the stack, checking its type and then seeing what the block next to it was, and proceeding to take action. As soon as I finished the first case (Attack vs Attack/Defense/Neutral) I realized that to do the second case (Defense vs Attack/Defense/Neutral) I would just be copying and pasting code and reversing some outcomes. Well that would be a big waste of time. So I identified that there are really only three types of block interactions in the game (Attack vs Attack, Attack vs Defense, and Attack vs Neutral) and replaced the whole thing with three if statements and saved myself a lot of code. Then I further modified it by separating the check for chain reactions and normal block interactions. I still found myself copying and pasting a lot of the block interactions, which is a very good sign that I can wrap 6-7 lines of code from each block interaction into a single function, further optimizing the code (not performance, just the code). I had some time to test it out a bit, uncovered some early mistakes withe the design that still need some rectifying, but they're fixable without having to rewrite the system. So tomorrow I should be able to finish that up.

During testing under Blitz conditions (since that's the only mode of gameplay I have coded in right now - and it's hardcoded too ATM) I realized I was having a lot trouble finding blocks that had arrows pointing in a direction I could actually use. I found myself dropping lots of blocks just in random out-of-the-way places because I couldn't think of anyplace else to put them. Looks like I'm going to have to seriously consider adding some logic to the clip-loading routine that scans the board, determines what types of blocks would be viable for the player to have at his disposal, and then randomly choose one. A game where most of the time you're just dropping blocks with no purpose really isn't all that fun.

Up early in the 'morrow. So I bid you all goodnight...

Okay, dumb question. So, this Torque-game-maker-thingy is a combination game-making front end coupled with a scripting language, and it includes some kind of royalty free runtime interpreter that you bundle with the final product, right?

So what's preventing 'em from making the runtime engine into a browser plugin and then going after the Flash market?

Seems like a pretty obvious step. You'd need to make some kind of "sandbox" version of the runtime engine, obviously, that'd prevent people from making malicious applets, but that's really just a matter of throwing an exception when you try to something potentially "unsafe" (ala, read a file, write a file, open a socket, etc).

And you'd also need a little something that could stream in all of the app-bits, be they in several files or in one big archive.

Maybe it's me, but it seems like they're about 90% of the way to a Flash/Shockwave competitor and they just haven't taken the next step.

Maybe the lack of success of Wildtangent's browser-games is scaring 'em off. Although WT's web product has its own problems.

Funny you should mention that. I give you Exhibit A [smile]

## Create an account

Register a new account