Super Mario Bros. Deluxe wrapper

class pyboy.plugins.game_wrapper_super_mario_bros_deluxe.GameWrapperSuperMarioBrosDeluxe(*args, **kwargs)[source]

Bases: PyBoyGameWrapper

Wrapper for Super Mario Bros. Deluxe.

The optional level argument to start_game() uses the game’s unused level selector for normal gameplay. For the original game, levels 0 through 31 are World 1-1 through World 8-4. Set super_player_levels=True for the For Super Players levels.

mapping_minimal
mapping_compressed
object_id_mapping
reset_game(timer_div=None)[source]

After calling start_game, you can call this method at any time to reset the game.

Parameters:

timer_div (int) – Replace timer’s DIV register with this value. Use None to randomize.

object_slots()[source]

Return active game objects with WRAM data and game-area coordinates.

game_area_annotations()[source]

Return (x, y, text) annotations in native screen-pixel coordinates.

game_area()[source]

Return the camera-relative background interaction types with sprites overlaid.

Background values are the stable interaction codes used by the game, rather than graphics-dependent 8x8 VRAM tile IDs. The codes are defined by Tile16_InteractTypes in the game’s ROM.

game_area_background()[source]

Return the mapped background without sprite overlays.

set_lives_left(amount)[source]

Set Mario’s lives to a value between 0 and 99.

set_time_left(time)[source]

Set the level timer to a value between 0 and 999.

set_world_level(world, level, super_player_levels=False)[source]

Select a world and level to start from.

World and level numbers are one-based, matching the game’s display. The standard game has worlds 1-8 with four levels each.

start_game(timer_div=None, world_level=None, level=None, super_player_levels=False, challenge=False, unlock_level_select=False, custom_level_sequence=None)[source]

Start a game from the title screen.

world_level selects a one-based (world, level) tuple, matching Super Mario Land. level remains available for selecting a raw Deluxe level ID. Normal gameplay is the default; challenge=True uses the game’s Challenge selector. unlock_level_select=True is retained as an alias for entering the Challenge selector without launching a level. custom_level_sequence optionally overrides the normal level order with a sequence of one-based (world, level) tuples.

game_over()[source]

After calling start_game, you can call this method at any time to know if the game is over.