tfe Homepage


Game creation: player die animation

Here is the article 12 about my series of posts about the game creation.

If you missed it, check out the previous part.

Video presentation

Here is a youtube presentation of the state of the project right now:

Die animation

The main character has now 4 animations:

  • Idle
  • Run
  • Fight
  • Die

Simple wall collision

I made a new mesh for the walls, with a lot more vertices. A texture and bump mapping texture are applyed to the mesh too.

Threejs game

To simplify the collision detection, i put simple boxes delimitating the walls, which contains only 4 vertices /wall.

Threejs game

Simple GUI

To update the life status of the player, i made a really simple gui, which contains only the life value of the player.

The GUI is made by html tags, which are rendered directly by the browser: When the player is hit by something, the node value is updated.

Game reload when die

When the player dies, a camera animation zoom to the player position.

When done, the player is respawned in the start position of the maze, and all the ennemys are respawned too.

You can get: the source code or View the demo directly.