Hi to all the avid developers/programmers out there
I’m currently in the process of developing a game(in a 2D, top-down view) which involves the animation of a man walking around, and has the ability to pick up a sand bag.
With that off my chest, I have a variable to detect which key is pressed to change the direction which the character is facing, and therefore alters the image loaded, as there are animations for every direction he faces. (ie. 4 pictures for moving up, 4 for moving left… and you get the idea.)
What im querying is how I would go about animating the sand bag in his hands? I feel creating a bunch of new pictures for the sprite and have a boolean variable to detect whether he has a bag in his possesion is going to unnecessarily increase the size of the executable, as I would like to keep it small.
Is there a possible way to instead draw the image x pixels infront of the character?
Thanks in advance for any help.
Keep it Java