Tilemap scroll laggy (but not always)
Posted: Tue Mar 24, 2020 2:59 pm
Hi all! In the last week i've been trying to develop a 2d jrpg with love.
After completing the tilemap scrolling system, i've noticed that sometimes it is laggy (without framerate drop) and i can't understand why. I've tried "flooring" tile and characters coordinates without results, so i've decided to post here my project to see if it's just an impression or if it's a real problem.
The first tilemap is as big as the screen, so you won't see problems there, but if you speak with the female npc with brown hair (with z, enter or spacebar) you will be teleported, after a couple of italian dialogues, to a bigger area where the scrolling problems occurs.
If you want to take a look at the code (quite a lot of files) i think you should look "game/Area.lua", "game/Player.lua", "game/Character.lua" and "game/Tilemap.lua" first and then main.lua.
Thank you in advance
PS.
i don't own the graphics used in this game
After completing the tilemap scrolling system, i've noticed that sometimes it is laggy (without framerate drop) and i can't understand why. I've tried "flooring" tile and characters coordinates without results, so i've decided to post here my project to see if it's just an impression or if it's a real problem.
The first tilemap is as big as the screen, so you won't see problems there, but if you speak with the female npc with brown hair (with z, enter or spacebar) you will be teleported, after a couple of italian dialogues, to a bigger area where the scrolling problems occurs.
If you want to take a look at the code (quite a lot of files) i think you should look "game/Area.lua", "game/Player.lua", "game/Character.lua" and "game/Tilemap.lua" first and then main.lua.
Thank you in advance
PS.
i don't own the graphics used in this game