Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I am designing a game, but I am having some trouble implementing a decent score system. Basically I have nodes with two different possible characteristics: color and shape. Since the player click from node to node, I want to award more points to the players which hit the same shape, same color or both, like: (SAME SHAPE x 3! AWESOME!, SAME SHAPE AND COLOR x 5! ARE YOU A WIZARD?!).

However I am having a lot of trouble implementing this. Can someone point me in the right direction or show me algorithms that can do this?

share|improve this question
1  
possible duplicate of Designing score system: Combos, chains, multipliers and bonuses –  bummzack Dec 22 '12 at 8:41

1 Answer 1

To do this, your game has to keep track of the previous nodes clicked by the player, and check the sequence for the combos that you care about.

The usual approach is to just keep adding things to your record of what the player has done until they break the combo chain (however your game defines that), at which point you clear the record and start over again, building up a new chain of actions.

share|improve this answer
    
My question was how to do exactly that? Could you describe a quick example? –  NewbGamer Dec 22 '12 at 0:19
    
@NewbGamer imagine you have a List/Vector. On click, just append the clicked item to it. When the newest item doesn't match the previous item, the combo is broken, and you're done; clear it out. –  ashes999 Dec 22 '12 at 1:51

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.