Hexworks / zircon

Zircon is an extensible and user-friendly, multiplatform tile engine.
https://hexworks.org/projects/zircon/
Apache License 2.0
755 stars 138 forks source link

Decouple Scrollable views from GameArea #419

Open LostMekka opened 2 years ago

LostMekka commented 2 years ago

Is your feature request related to a problem? Please describe. GameArea instances currently hold data about the world (GameBlock collection) as well as the view. (Scrollable) This means that if you need to change the view, you need to copy whole object with the complete GameBlock data.

Describe the solution you'd like I propose to separate GameArea from the Scrollable implementation:

Describe alternatives you've considered Making the visible part of a GameArea dynamically resizable would also mean that the world data does not have to be copied, but this would miss out on the cool features listed below. While making the views/cameras resizable would also not hurt, the decoupling makes it fairly easy to create a new view/camera, so the actual resizing support can go down in priority.

Additional context This separation would enable a lot of cool picture-in-picture game features, for example: