Plugin base classes¶
- class pyboy.plugins.base_plugin.PyBoyGameWrapper(*args, game_area_section=(0, 0, 32, 32), game_area_follow_scxy=False, **kwargs)[source]¶
Bases:
PyBoyPluginThis is the base-class for the game-wrappers. It provides some generic game-wrapping functionality, like
game_area, which shows both sprites and tiles on the screen as a simple matrix.- mapping_one_to_one¶
1
- Type:
Example mapping of 1
- shape¶
The shape of the game area. This can be modified with
pyboy.PyBoy.game_area_dimensions.Example:
>>> pyboy.game_wrapper.shape (32, 32)
- start_game(timer_div=None)[source]¶
Call this function right after initializing PyBoy. This will navigate through menus to start the game at the first playable state.
A value can be passed to set the timer’s DIV register. Some games depend on it for randomization.
The state of the emulator is saved, and using
reset_game, you can get back to this point of the game instantly.
- reset_game(timer_div=None)[source]¶
After calling
start_game, you can call this method at any time to reset the game.
- game_over()[source]¶
After calling
start_game, you can call this method at any time to know if the game is over.