[Kde-games-devel] Kapman conception : need advices !
Jeremy Wick
jwickers at gmail.com
Wed Nov 7 11:20:39 CET 2007
On 11/7/07, Ian Wadham <ianw2 at optusnet.com.au> wrote:
> a) Centre Characters on their direction of motion within a cell,
> especially when changing direction. So if a Character moves
> to the right and then down, he must continue moving right, even
> as he starts to move down, until he is in the middle of the
> downward path.
I has a slightly different implementation, when colliding a wall i
checked the Character second cell. If the Character was in only one
cell then it would not move (no second cell), else i checked if that
second cell connected to a free cell in the movement direction, if yes
i moved the character into the second cell.
This is important on grid based games when players are moving very
quickly in opposite direction, if you miss a turn by 1 or 2 pixels you
don't want to go straight for a whole cell if going down those 2
pixels could make the turn possible.
--
WICKERSHEIMER
Jérémy
More information about the kde-games-devel
mailing list