Search found 4 matches
- Thu Oct 24, 2019 1:14 am
- Forum: Support and Development
- Topic: [SOLVED] Tiled collision maps help
- Replies: 6
- Views: 5725
Re: Tiled collision maps help
What is the difference between the map pixels that STI requires and the screen pixels that I was passing in? Your player coordinates are expressed in screen pixels, but STI requires map pixels, therefore you need to convert them, by dividing them by your scale factor, before sending them to STI's d...
- Mon Oct 21, 2019 7:11 pm
- Forum: Support and Development
- Topic: [SOLVED] Tiled collision maps help
- Replies: 6
- Views: 5725
Re: Tiled collision maps help
OK, found the issue, thanks for attaching the project. The problem is that the coordinates that STI requires are map pixels, but you're passing screen pixels to it. Dividing the coordinates by mapScale does the trick: map:draw(-dx/mapScale, -dy/mapScale, mapScale, mapScale) You my friend, are a lif...
- Sun Oct 20, 2019 10:31 pm
- Forum: Support and Development
- Topic: [SOLVED] Tiled collision maps help
- Replies: 6
- Views: 5725
Re: Tiled collision maps help
Here I have attached the entire project file plus some images that were supposed to go into the post above. Have a look and don't hesitate to ask if anything is unclear to you. I really appreciate any help
- Sun Oct 20, 2019 1:57 pm
- Forum: Support and Development
- Topic: [SOLVED] Tiled collision maps help
- Replies: 6
- Views: 5725
[SOLVED] Tiled collision maps help
Hello dear forum users. Please have mercy on my soul if you dare to help me, as I am new to both Lua and Love2d. I am currently working on a top-down rpg zelda clone-ish. I will try to only show relevant pieces of code so you don't have to look at all of it :P Importing the map is done via STI. It i...