The way camera boundaries are defined in a room can be confusing as it requires developers to calculate the background offset relative to the game's viewport size. Instead, it should be enough to define the room size (which in most cases should match the background dimensions) so that Popochiu can take care of the calculations and set up the camera.
Solution description
Instead of having the current:
@export var limit_left := INF
@export var limit_right := INF
@export var limit_top := INF
@export var limit_bottom := INF
Use:
@export var width := E.width
@export var height := E.height
Exclusions
None.
Implications
Changing this will require adding a step to Migration 2 (or Migration 3 if we decide to move this change to Popochiu 2.1) so rooms from previous versions are updated to use this approach.
Benefit description
The way camera boundaries are defined in a room can be confusing as it requires developers to calculate the background offset relative to the game's viewport size. Instead, it should be enough to define the room size (which in most cases should match the background dimensions) so that Popochiu can take care of the calculations and set up the camera.
Solution description
Instead of having the current:
Use:
Exclusions
None.
Implications
Changing this will require adding a step to Migration 2 (or Migration 3 if we decide to move this change to Popochiu 2.1) so rooms from previous versions are updated to use this approach.