• Register

Pixel art platformer with greedy old barbarian, plenty of creatures and treasures of gold!

Post news Report RSS Work in progress - Traps

Work in progress - presentation of three new traps.

Posted by on

New WIP video bellow shows three new traps - crumbling platforms, falling stalactites and spiked block.

Crumbling platform is new element in game from gameplay point of view as well as from code view. We implemented two new interfaces into code. First one has only one method OnLanded() and it is called when player lands on platform, that implements this interface. Second has single method OnGrounded() and this is called every frame if player is standing on platform.
From rendering point of view, we are using Tiled draw mode, which allows us easily extend platform to needed width. Number of small dirt particles falling of it is based on its width.

WIP 07   Crumbling platforms

Stalactites and spiked block have similar code. Both share the same base class. But they have some slight differences in behavior. Stalactites are randomly shaking to attract player's attention. When fall on ground, they get broken and disappear in cloud of dust. Spiked block does not disappear, but turns itself into one-way platform and player can walk over it. Both traps have detector, that detects, if player is near to trigger the fall:

WIP 07   Falling traps


Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: