Hi everybody! I'm developing a game of pokemon in love2d, and i'm blocked with the issue of dynamic NPC/Player collisions. I made a two-dimensional array of collisions in order to the player couldn't go through of NPC's. This runs, but only in NPC-static cases. The bug of NPC-dynamic collision usually evolve to character movement error. I called them the bug outside the grid (the character stops moving correctly in tiles).
I think the mistake is not to consider the real time, there are many possibilities of dynamic collision between NPC and player.
I think that there is an specific algorythm that makes the dynamic collision correctly. I need help. Thanks
PD: Sorry for my bad English
Dynamic NPC Collisions (Tile-based map)
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Re: Dynamic NPC Collisions (Tile-based map)
Check out Axis Aligned Bounding Box collisions (eg. https://www.youtube.com/watch?v=ghqD3e37R7E ) - your player and NPCs will probably be square-ish, and this is one of the simplest and cheapest collision checks you can run in terms of processing power.
Who is online
Users browsing this forum: Bing [Bot] and 7 guests