Adding the Sprites to the Project
After setting all the colors, I closed the Sprite Editor window to begin adding the sprites to our current game project. The command incbin is used to load in binary files. So in Siggy’s project he set it up for the current sprites in use, so we had to modify this to incbin “Sprites.spt”,1,59,true to accommodate the 59 sprites that were edited earlier in this session. There were some issues loading the sprites, so close to an hour into the video, we commented out the incbin that loaded Siggy’s sprites to get ours on the screen.
The top sprite was controlled by the joystick (gamepad controller) and the bottom sprite was set to an animation sequence. So our goal was figured out how to control the sprite animation frames at the top so we could create an animated sprite as the controller was moved.
We were trying to understand the logic that Siggy developed, so Darren created a side project in his spare time to learn from it. The screenshot seen here extracted the sprites from Siggy’s Trump jump. Darren explained by saying, “There are 3 sprites. The body is 2 sprites, the tie and shirt are one sprite, and blue suit, hands, and feet were another sprite. They are laid on top of one another. The head is also one sprite.”
For the animation, he had the sprite shifting positions from the right to the left, depending on which way the player was moved. The idle animation made the sprite bounced up and down looking to the left or right. Again this is dependent upon the last sprite position that was retained. He clarified that the LAST_LOOK verified recalled the last direction the sprite was looking toward. If you study the code sample below, you can gain more of a grip on the logic.