Python Forum
[PyGame] Tilemap 3 squares too tall
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[PyGame] Tilemap 3 squares too tall
#1
Hi all,

Very new, learning python for fun.

I've been mostly following this a youtube tutorial by KidsCanCode on youtube for making a tile based game.

Long story short, I have a player centered camera and a scrolling background (just coloured sprite Rects now). It all looks and works like it should except when scrolling down it seems that the map thinks it is 3 squares too tall; as if my "map.txt" has three extra lines to it.

"1"s = a wall tile, "."s = blank tile, on a 32x32 pixel grid. Right, left, top, the camera works fine, but going down there are 3 rows of blank tiles displayed on the outside of my walls, which are the lowest line in the .txt file.

I used "strip" like in the tutorial to remove the spaces at the end of each line, but it did nothing for the extra "phantom" lines.

Changing display window size changes nothing.

Does this sound familiar to someone?

Many thanks,
m.
Reply


Messages In This Thread
Tilemap 3 squares too tall - by michael1789 - May-26-2019, 04:32 PM
RE: Tilemap 3 squares too tall - by metulburr - May-27-2019, 01:27 AM
RE: Tilemap 3 squares too tall - by michael1789 - May-27-2019, 08:57 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Infinite generating tilemap pygame Kolterdyx 2 3,866 Jun-14-2020, 09:22 AM
Last Post: buran

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020