Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

This week I worked on the primary method of transportation between levels: trams!

I've always had a thing for trams in video games. They evoke a feeling of progress and meaning.

I didn't know if they would even be possible at first; Bullet physics does not allow dynamic rigid bodies with triangle mesh shapes. It has to be convex, which would prevent the player from entering the tram.

Here's what I did in the end:

  • Created a box-shaped dynamic rigid body for the tram
  • Disabled collision between this body and the player
  • Created a static rigid body with a triangle mesh for the actual tram collision shape
  • Parented the static body to the dynamic one so that my engine automatically updates its position to match the dynamic body

Amazingly, it all worked.

This was the first version, trams 1.0:

Then I made the tram runners smarter, so they could accelerate, decelerate, and follow paths:

Finally I tweaked the model and added glass and animated doors.

That's it for this week. Will probably go back and work on the spider drone half of the game next week.