CleanCut / invaders

Open source terminal arcade game with audio - based off of the classic "Space Invaders"
201 stars 102 forks source link

When shooting, the bullet is displayed instead of the player, erasing… #21

Closed foqc closed 6 months ago

foqc commented 6 months ago

When shooting, the bullet is displayed instead of the player, erasing the player's position in the frame, to fix this character height is calculated to avoid to print the shot over player's position.

image

CleanCut commented 6 months ago

I cannot reproduce the problem you report. I think you have some fundamental misunderstanding about what is going on.

  1. The bullet appears in the space above the A.
  2. If it weren't, the way to fix it would be to change its location, not render the bullet in a place it is not.
  3. There are no "pixels" in terminal layouts. This PR has the bullet appear several rows higher than it is for the corresponding amount of frames.
foqc commented 6 months ago

I did not explain well the issue. So I left here a video to better understanding. My solution only change the position of bullet to not overlap whit player. I mentioned about pixels, but it was only to refer to the dimension unit of frame. issue001.webm

CleanCut commented 6 months ago

How large is your terminal window? Are you certain it is large enough?

I cannot reproduce the problem you are experiencing. I wonder if it is a side-effect of using a terminal window that is too small?

foqc commented 6 months ago

The problem was because the size of my terminal. So this fix it's no necessary. thank you!