Hello simple newbie question here
If you were making the game pacman
There are say 20 badguys (ghosts)
Should i be creating 20 different sprites
sf::Texture txBadPlayer;
if (!txBadPlayer.loadFromFile("badplayer.png"))
{
return 0;
}
sf::Sprite spBadPlayer;
spBadPlayer.setTexture(txBadPlayer);
sf::Texture txBadPlayer2;
if (!txBadPlayer2.loadFromFile("badplayer.png"))
{
return 0;
}
sf::Sprite spBadPlayer2;
spBadPlayer2.setTexture(txBadPlayer2);
times 20
or should i use arrays or something ?
ps.. all bad guys have the same picture, but different movement
please could someone point me in the right direction
thanks