Skip to content

op_arcade How-To

In this document, I will put examples showing how to accomplish certain tasks in our game engine that have been requested.

Add a Background Image

Add this code at the top of on_create, and change the image string to something of your choice.

self.background = oa.Sprite(int(self.width/2), int(self.height/2), ":resources:/images/backgrounds/abstract_2.jpg", layer=cc.Layers.BACKGROUND)
self.background.scale_x = self.width / self.background.width
self.background.scale_y = self.height / self.background.height