User Tools

Site Tools


jill:algo:playerdie

This is an old revision of the document!


Table of Contents

How player die ?

Two background kill player : water, lava (die1) and other SPIKE, STALACBR… (die2).
Ennemy kill also player (die0).

Die0

When ennemy kill player, iState set to 5, iSubState set to 0, iYD set to -12 and iInfo1 set to 1.
At each cycle, iStateCount increase to know picture to displayed.

iStateCount valuePicture
0 →3 8/48
4 →7 8/49
8 →11 8/50
12 →15 8/51
16 →19 8/52
20 restart game

Die1

When player hit background, iState set to 5, iSubState set to 1, iYD set to -12.

Die2

When player hit background, iState set to 5, iSubState set to 2, iYD set to -10, iInfo1 set to 1 and player bottom set to background kill bottom.

At each cycle : if iStateCount < 14
→ add iYD to iY, and add 2 to iYD.
→ image displayed is 8/66.

When iYD is 14 :
→ align bottom player on bottom background under background that kill player.

When iYD is greater or equal 14 :
→ add 1 to iStateCount
iStateCount < 15, displayer 8/72 (when iStateCount odd) 8/73

iStateCount > 15 and < 20, displayer 8/74

iStateCount is 20, restart game

jill/algo/playerdie.1402753402.txt.gz · Last modified: 2014/06/14 15:43 by emeric