-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
Required Skills: C++
Difficulty: Hard
Since the implementation of #1682, the area the camera can move in can be limited by boundary coordinates. Currently, the boundaries are hardcoded into the initialization of the camera manager to exactly match the (also hardcoded) map size of our demo game. However, for the future, it would be nice if the camera boundaries would adjust dynamically based on the current map size. This requires that we can transfer the map size and coordinates to the renderer thread and the camera manager.
Passing the information to the renderer should follow the exact same flow as the other simulation -> renderer communication in the level 2 renderer (see the associated architecture documentation).
Tasks:
- Renderer thread:
- Create a new render entity subclass for the camera that can receive updates from the game simulation. The only update the renderer entity needs to receive for now is the 4 coordinates of the terrain map.
- Check for updates from the render entity in the camera manager and, if there are any, update the camera boundaries
- Simulation thread:
- Let the simulation thread create camera render entities via the
RenderFactory - Update the render entity with information from the simulation, i.e. pass it the map coordinates. For now, this only has to be done once, when the map is initialized first. Later, we can make this update more dynamic, so that the render entity is updated if the map size changes
- Let the simulation thread create camera render entities via the
Further Reading
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Status