I'm trying to lessen the number of files I need for my pygame project by instead of having a folder with for example 8 boots files, I can make 1 bigger image that has all of them 8 pictures put next to each other and depending on animation tick, that specific part of the image gets blitted.
Currently, I utilise lists.
right = ["playerdesigns/playerright0.png","playerdesigns/playerright1.png","playerdesigns/playerright2.png","playerdesigns/playerright3.png"]
my code then just depending on animation tick, takes on of those files and blits it
but I wish to make it into one playerright.png image file that 0-100 Xpixels of the picture has playerright1.png, 101-200 Xpixels has playerright2.png etc, and then depending on need, I can blit 100 wide image from any point.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…