Dynamic NPC Collisions (Tile-based map)

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
Valentio
Prole
Posts: 6
Joined: Mon Sep 05, 2016 10:29 am

Dynamic NPC Collisions (Tile-based map)

Post by Valentio »

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
User avatar
deströyer
Prole
Posts: 32
Joined: Thu Jun 27, 2013 7:59 pm
Contact:

Re: Dynamic NPC Collisions (Tile-based map)

Post by deströyer »

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.
Post Reply

Who is online

Users browsing this forum: No registered users and 194 guests