I suggest changing the starting bullet position to the players center. So starX = xPos + width/2; startY = yPos + height/2; when my back was up against a wall facing right, it bullets registered as hitting the wall.

Another suggestion would be to make the player's collision box smaller, in width. To make it simple just make the width smaller and move back xPos of the image a few pixels.

I only played as a guest for a few minutes. I will play again when I have some time.

java-gaming.org is not responsible for the content posted by its members, including references to external websites,
and other references that may or may not have a relation with our primarily
gaming and game production oriented community.
inquiries and complaints can be sent via email to the info‑account of the
company managing the website of java‑gaming.org