Open
Description
Goals
After completing #17, participants have now joined a game session which is about to start. This epic continues from there.
Once the game starts, display participants move to the Game view, which displays the current game state. Regular participants ( i.e. players on their phones ) are redirected to the Control view, which displays available actions.
The initial goal is to display a simple game map, in which players spawn and move around.
Ideas
Map is made of tiles. The game is viewed in an isometric angle. Maps may contain holes and walls.
Characters stand on tiles. Characters may pass eachother, but can't end the turn with multiple characters on the same tile. Optional: impassable characters.
Out of scope
- What if display is still animating when a new list of events arrive?
- Later on we could track display participants' readiness too
Breakdown
- Implement Game view skeleton
- Create a full-screen canvas
- Initialize a three.js scene
- Add a cube and a camera
- Implement Control view skeleton
- Connects over WebSocket to session on load
- Implements layout specified in design doc
- Implement dummy map generator
- Generates a single, fixed size room
- Implement map mesh
- Receives a map
- Generates a BufferGeometry
- Add generated map mesh to Game view
- Note: rendering system is out of scope, this is just a component of it
- ❗ Pair programming
- Implement Game Renderer
- Takes a map and a set of entities
- Uses the map mesher to generate map mesh
- Creates three.js Sprites for entities and places them on map
- Implement player movement
- Control view can be used to specify a move direction
- Control view can be used to indicate move readiness
- When a participant becomes ready, validate its move
- When all player participants are ready:
- Server creates a list of events
- Simulates next game state
- Broadcasts events and game state
- Renderer in Game view throws away previous sprites and creates new ones based on new state
- Implement event playback
- Renderer receives a list of events
- Renderer plays events in sequence
- Resulting state must be the same as simulated by server