approachcircle / Pong

a pong game written in LibGDX
GNU General Public License v3.0
1 stars 1 forks source link

make `Screen`s, `ShapeRenderable`s and `TextRenderable`s implement the `Disposable` interface #2

Open approachcircle opened 9 months ago

approachcircle commented 9 months ago

at the moment, Screens can either be rendering or not, which does not leave much flexibility for things that require game state to be saved in memory and set aside, and then retrieved at a later date. Screens should be able to be suspended and resumed to allow for saving and retrieving game state within a screen at will. they should also be Disposable (along with ShapeRenderables and TextRenderables) when we know a Screens instance will not be used again (resumed) so that it (and its BasicRenderables/TextRenderables) can be disposed, and its memory can be reclaimed.

approachcircle commented 9 months ago

screen state is now saved when another Screen is pushed onto the ScreenStack, just need to make them disposable now

approachcircle commented 9 months ago

this is pretty low priority considering we don't actually have that many Screens, so they aren't taking up that much memory, but may cause scaling issues later