Python sprite sheets
I need to know how to grab tiles from a sprite sheet in Pygame. I have looked and looked, never finding an example or function for grabbing certain parts of an image in Python.
If it matters the image is .png
Surface.subsurface might be what you're looking for, and I think it's what I used to do sprite sheets. Just call that with a rect of the area of the single sprite to get from the sheet and it'll return just what you want.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement