Robust character collision!

Robust character collision!

Player character collisions work well now!

Collision works. It’s fast. It’s simple.

Player position is mapped directly to it’s position within it’s local hexagon with a small handful of arithmetic operations and Math.floor() calls. All collision cases can be handled with a couple of if branches, dot products and scalar vector multiplies. Nice.

The physics sim is as simple as I could make it. Simplicity over accuracy here because an authoritative server needs to perform physics calculations for every player in the game.

Simplicity also matters because an identical result by the server calculations must be achieved even when this simulation is implemented in a different (faster than javascript) language server side.

The player has a little bit of inertia, which will slightly ease the burden of the multiplayer server to provide an immediate change in position broadcast to all players when a player stops moving or changes direction.

Bean

Bean
I'm Bean. From BeanstalkBlue.
https://beanstalk.blue

Collision beginnings

The player character can detect basic collision, though its a work in progress. Continue reading

Collision beginnings

Published on March 24, 2017

Input Manager

Published on March 23, 2017