I'm following the 2D Roguelike tutorial, which can be seen here. I don't want to get fancy, just follow the existing steps.

I've reached the part where all it's supposed to do is draw the playfield. But it looks like this: enter image description here and I don't know why.

Some of the floor tiles are appearing beyod the outer wall, and others are missing (or maybe they're stacked on top of other tiles).

(EDIT: I discovered that the "missing" tiles are because I had the sprites in the wrong layer, and fixed them. I still have several appearing to the left of the outer wall, though.)

I tried to debug it in Visual Studio. The plan was to step through it line by line to see how the tiles are put down, but the debugger doesn't show the playfield until the whole thing is complete.

  • \$\begingroup\$ Please provide a minimal complete verifiable example: the shortest set of code and scene setup instructions that will allow a reader to reproduce the problem you're experiencing in a new empty project, without guesswork. \$\endgroup\$
    – DMGregory
    May 10 '20 at 18:54
  • \$\begingroup\$ I can paste the script code, but what if the problem is because of what I did in the Unity editor? How do I display that? \$\endgroup\$ May 10 '20 at 19:44
  • \$\begingroup\$ Create a new empty project. Try to reproduce the problem in as few steps as you can, writing down each step as you go. Once you reproduce the problem, your list of steps is what you need to share. If you cannot reproduce the problem, then it's solved. ;) \$\endgroup\$
    – DMGregory
    May 10 '20 at 19:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.