Pygametemplate

Latest version: v0.9.2

Safety actively analyzes 682361 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 3 of 3

0.3.0

* [**Backwards incompatible change**]<br>
Add the concept of "views" to pygametemplate.
`View`s are classes which represent a "section" of your game.
Every view should inherit from `pygametemplate.View`.
All `View`s have a `self.game` member for accessing the main `Game` instance.
To switch to the next view in your game, you can call `self.game.set_view(NextViewClass)`.
**`pygametemplate.Game` now takes `StartingView` as its first argument.**
`View` classes are expected to implement the following methods:
* `View.load()`: load all the assets/other things needed for the view to work.
This means you only load images (for example) into RAM when you need them.

* `View.unload()`: unload assets that were used by the view,
but aren't needed after the view is no longer the current view.
Should mostly do the opposite of what `View.load()` does.

* `View.logic()`: run the logic for the view.

* `View.draw()`: run all drawing code for the view.

* Change `_inputs()`, `_update()` and `_check_quit()` to be "private" methods
of the `Game` class by prepending an underscore to their names.

* Add `toggle_fps_hotkey` parameter to `Console.__init__()`
(defaults to `ctrl+f`) so that it can be customised.

* Add 1280x720 as the default window resolution if one isn't passed in.

0.2.0

* Add Python 3 support.

* [**Backwards incompatible change**]<br>
Create the `pygametemplate.exceptions` module and move `CaughtFatalException` there.
This module will contain all exceptions added from now on.

Page 3 of 3

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.