Ok, so this might be a bit confusing for me to describe.
I’ve got a character/player class named Chara. Inside it is a public Map that holds a Sprite class, which holds the Image, offsets and such. Which is nice, because I can refer to a sprite frame by name. To draw a sprite, I’m doing something like this:
Player1 is a Chara class, btw…
g.drawImage(Player1.getSprite("faceLeft"), Player1.getX("faceLeft") - Player1.getOffX("faceLeft")+ mapOffX, Player1.getY("faceLeft") - Player1.getOffY("faceLeft") + mapOffY, null);
The Chara class gets the Sprite class from the Map by using the string passed to the procedures. I do that to draw the body, and then something similar to draw the arm('cause it rotates separately) and the graphic of the weapon the sprite is holding, Which is fine right now, but I’m worried that after I get to the point where I’m adding other players and NPC into the mix, this might be really slow. Are Maps something I should try to avoid? I’ve seen some articles on speed tests with Maps, they don’t scare me, but they’re not game related either. Is there something else I should be doing instead?