Using Tiled to specify position of Python Arcade sprites that are larger than a tile

preview_player
Показать описание
Recorded one take, live in class!
Sprites imported from Tiled are always the size of a single tile, which is a problem when we want a sprite that is larger than a tile! We can always create a sprite separately in the __init__, but it can be annoying to specify the exact position, and if you have lots of large sprites this will be cumbersome.

My solution here is to have a layer in Tiled that we use to specify position. We just put placeholder images in the places where we want our large sprites. Then in our __init__, we import the small sprites, and create a new Spritelist full of sprites that use the large image we wanted, but at the position of the placeholder images.
Рекомендации по теме
visit shbcf.ru