Game (Feeding Frenzy) juga punya algoritma

ga cuma program, tapi game juga bisa dibikin algoritmanya loooh. nih aku cuma share beberapa algoritma yang ada di Feeding Frenzy dalam bentuk pseudocode. tapi di pseudocode ini, stage nya aku ganti level yaa hehehe



Procedure Menurunkan Tahta “Shark King” sebagai King of The Sea {menjadikan “shark king” sebagai santapan/makanan}

Cara Bermain
int main fish, level, life;
Int small fish, medium fish, large fish, king fish;

Repeat
If main fish
for main fish>small fish to main fish>medium fish step main fish
                                If main fish>small fish
                                                Do eat small fish;
                                                Then main fish++;
                                Else if main fish>medium fish
                                                Do eat small fish and medium fish;
                                                Then main fish++
                                Else main fish>large fish
                                                Do eat small fish, medium fish and large fish;
                                                Then levelup;
                                Endif
Endfor
Then if life>0
                                Then continue the level;
                Else Game Over;
                Endif
Else Winning the game;
Endif
Until level !=40;
Endgame



Generasi ikan di setiap level
Int main fish, level;
String angel fish, lion fish, angler fish, dory fish, orca;

for level  !=40 to level/8 step change main fish
If level<=8
                                Then angel fish;
Else if level<=16
                                Then lion fish;
Else if level<=24
                                Then angler fish;
Else if level<=32
                                Then dory fish;
Else if level<=40
                                Then orca;
                Endif
Endfor
Bonus point
Int point, main fish;
Int pearl, star ball, 1up ball, target, bite king fish, combo, time bonus;

If main fish get the pearl from the oysters
                Then point+50;
Else if main fish get the star ball
                Then point+40;
Else if 1 main fish get the up ball
                Then life+1;
Else if main fish get the target
                Then if time bonus
                                Then point++;
Else if main fish bite king fish’s tail
                Then if combo
                                Then combo*point;
Else point = 0;
Endif

Karakter tambahan
String green fish, main fish, direction, condition
Int mermaid, starball, oysters, pearl

If mermaid come
                Do get more starball;
Else if Oysters come
                Do get pearl;
Else if green fish come;
                Then if main fish headech
                                Then out of direction;
                Else normal condition;
                endif
Else point normal;
Endif
 



  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • RSS
Read Comments

0 comments:

Post a Comment

 
Trollface / Problem? / Coolface  - Rage Face Comics