Watch the video!
In this episode we will be setting up a world for our creatures (specimens) and food (edibles) to live in! We will wire up Redux to handle the state, create some physics objects (Specimen, Food, and Entity) and use class inheritance to apply common functionality.
We will also create a Vector class from scratch to describe the Euler math to our game engine to handle the positioning and movement of our entities. Finally we will implement the seek behavior so our specimens will traverse across the world (canvas) to reach the food they want to eat!
- Start here - Basic create-react-app ready to go
- Building a Canvas for our entities to live in
- Setting up Redux for a single source of state
- Creating an Entity class to position objects on our Canvas
- Creating a Vector class for position/movement math
- Creating a Specimen class to live in our world
- Creating the Specimen Redux reducer, mappings, and actions
- Creating a Food class and adding it to Redux
- Implementing the seek behavior on the Specimen