-
Notifications
You must be signed in to change notification settings - Fork 207
Description
pgzero is currently very suited to making games that take up only a single screen.
I propose the addition of a world built-in to allow easy management and realization of games with content outside of a single screens space.
As a first idea, I think world could be an object of a class World which has two main features. A set of position offsets for X and Y and a list of Actors. The X and Y offsets would allow the "camera position" to move by changing the absolute X and Y positions of everything in the world. The X and Y positions of each individual actor in the world would instead refer to their position in the world. This is realized by having the world be drawn with world.draw(). This function would go through each actors, change their position by the world offset, call .draw() on them and then change their position back.
This would obviously be quite unperformant so a change to the .draw() function with an optional parameter or a modified new function to draw at a specific position could allow more optimized drawing for lots of actors in the world.
I'm happy to get any feedback or ideas on this. I think something along these lines could really expand what's easily possible with pgzero. A natural expansion might see the world being rotatable.