Codesters FAQ is the official FAQ site for codesters.com. We will continue to update this blog with the most common questions we receive form teachers using Codesters.

Add a Custom Background

You can use a custom background by uploading a custom sprite and using its image label as the background.

Tips:

  • Use a square image to fit the stage.

  • Resize your custom background by using stage.set_background_scale(2). Values greater than 1 increase the size. Values less than 1 decrease the size.

  • Position your custom background by using stage.set_background_x(0) and stage.set_background_y(0). The background’s position is set based on the top left corner.

Click Run below to see the results of this code.

stage.set_background("earth_ad9")
stage.set_background_scale(.65)
stage.set_background_x(-250)