Tag Info

Hot answers tagged

1

For loading the images, you could do: std::vector<imagebatch> fotos; std::vector<SDL_Texture*> healerTexture; // Parts of filename string that occur multiple times. char* filenameBase = "DData/towners/healer/healer/Healer"; char* fileExt = ".png"; // This is 15 because of the number of images there are. for (int i = 0; i < 15; ++i) { ...


1

The sf::IntRect that you will use will be the same for both directions. What will need to be changed is the scale of the sf::Sprite variable. You will simply need to do something similar to this: // Assumes that the image side is 24x32 and it is the first frame of the sprite sf::IntRect test(0,0,24,32); playerSprite.setTextureRect(test); if( walkingleft ...


1

Yes, thats called dirty blitting. The Newbie Guide to pygame touches on this. The steps they recommend to implement it are: Blit a piece of the background over the sprite’s current location, erasing it. Append the sprite’s current location rectangle to a list called dirty_rects. Move the sprite. Draw the sprite at it’s new location. Append the sprite’s ...


1

If you are doing a classic 2d platformer (which you [the OP] are not [this answer is directed at people who are doing it]) then you could use something like DragonBones (open source). Even in your situation, you could make some considerations and implement something like this. If you must have the tool look perfect from a lot of angles and can't compromise ...



Only top voted, non community-wiki answers of a minimum length are eligible