Kevin Nelson Marshall
Other entries:
« The work of work...

So I finally got a chance to get started on BotFu Domination today! Actaully, if I'm being completely honest, I didn't have time to do much overall. But a start is a start right?

Wouldn't you know that the very first thing I started on for this project is already proving to be an interesting challenge. Before I get into my first challenge too much though, I think I need to dump a little inside knowledge.

BotFu domination is hopefully going to be a fun additional strategy based game for BotFu players. The game will more or less revolve around fighting with the point of building the most dominating Dojo, fight record, and things like that.

The first, and possibly most important, part of the game involves dominating other fighters. To dominate another fighter, you have to have KO'ed them at least five (5) times more than they've KO'ed you (which also means you have to have fought them at least 5 times as well).

Once you are dominating another player, you can start to earn pieces of wood based on how many players you are dominating and how long you have been dominating them. Once you collect enough wood you can start to build things like your own Dojo and such.

The game progresses from there, but that's enough information for now to talk about the first challenge. How do I determine who you are dominating?

Since the details of each knockout are stored in a table, this turns out to be pretty simple. Here's an example of the query that does this for me:

select * from (select count(attacked) kocount, attacked from knockouts where attacker = 'KEVIN' group by attacked) tmp, (select count(attacker) koed, attacker from knockouts where attacked = 'KEVIN' group by attacker) tmp1 where (kocount - koed) > 5 and tmp.attacked = tmp1.attacker order by (kocount - koed) desc


So that's all good, but it's not really everything I need for this first part. You see, in addition to knowing who you are dominating, I need to know just how long you've been dominating that person (ie. when you went 5 or more KO's up on the other person).

This will help to determine how many pieces of wood you get...the actual idea is to have you earn a percentage of a piece of wood for every hour you dominate someone (probably 1/12th of a piece of wood for every hour). Once you've dominated someone for 12 full hours you'll get your piece of wood. And to make it more user friendly, you should be able to earn those hours over time.

For example, let's say I am dominating Heath (which of course I am). Let's also say that I'm only 5 fights up on him, and that I stay 5 fights up on him for 11 hours. At that point, I should have earned 11/12ths of a piece of wood. Now let's say that (by some miracle) Heath beats me in a fight and I am no longer dominating him. Being that my ego couldn't handle that, I quickly go out and KO him two more times so that I'm once again dominating him.

Once I maintain that new domination for an hour, I should earn my last 12th of a piece of wood (and actually get said piece of wood). So basically, you don't have to dominate someone for a straight 12 hours, you can do it little by little until you've tallied a full 12 hours.

So to handle this, I need to know more than just who you are dominating (and by how much you are dominating them). I need to know how long you've been dominating them (or more technically, how long since you went 5 KO's or more above them)...so got any ideas?

I've got a few, but I haven't had a chance to fully work through it in my head just yet...so I'll reserve my answer until a future post. In the meantime, I would love to hear how you might try and tackle this issue...

posted by Kevin Marshall on 2008-04-03 00:00:00+00


Subscribe to my RSS feed »

BotFu feed with RSS reader

BotFu feed by Email


Search All Posts »


Kevin Marshall - Who's That?

I'm just your basic programmer. I can't spell to save my life, I'm not the greatest story teller, and I often ramble on about nothing. This blog showcases all of that!

If you're bored drop me an email at info at falicon.com or view my outdated resume.


Stalk Kevin on »

bit.ly
Delicious
Digg
Disqus
Facebook
Flickr
FriendFeed
Github
Last.fm
LinkedIn
StumbleUpon
Twitter (@falicon)

Archives by Category »

(28) Code »
(8) ColdFusion »
(15) Database »
(10) Factor »
(3) Falcons »
(321) General »
(13) JavaScript »
(18) Perl »
(17) PHP »
(20) Ruby »

Archives by Month »

(1) September 2010 »
(2) August 2010 »
(3) July 2010 »
(13) June 2010 »
(8) May 2010 »
(2) April 2010 »
(2) March 2010 »
(5) January 2010 »
(2) October 2009 »
(6) August 2009 »
(11) July 2009 »
(2) May 2009 »
(3) April 2009 »
(2) March 2009 »
(7) February 2009 »
(9) January 2009 »
(14) December 2008 »
(5) November 2008 »
(12) October 2008 »
(13) September 2008 »
(16) August 2008 »
(23) July 2008 »
(20) June 2008 »
(24) May 2008 »
(23) April 2008 »
(27) March 2008 »
(28) February 2008 »
(26) January 2008 »
(7) December 2007 »

Published Works »

Beginning Amazon's SimpleDB (Apress in dev.)
Pro Active Record (Apress 2007)
Web Services with Rails (O'Reilly 2006).

Contributed To »

Ruby Cookbook (O'Reilly 2006)
SQL Cookbook (O'Reilly 2005)
Various Reviews published in Computing Reviews

Free Code I've Created »

SimpleDB library in Python 3.0



This blog is powered by KickAssCode.