## Creatures bumping into each other

### Creatures bumping into each other

What do you think of creatures bumping onto each other ? It is bad IMHO. To solve that we could either a) add a physics to our game ( add a barrier for each ) or b) use spatial tree ( like mine quadtree https://en.wikipedia.org/wiki/Quadtree) c) use spatial subdivisions. f.e. divide map into size R grid squares. then for each square, compare the content of the square to its surrounding squares and do n^2 check on all elements in those buckets for collision

paul424
OD Moderator

Posts: 643
Joined: 24 Jan 2012, 13:54

### Re: Creatures bumping into each other

Dealing with creature collision is very hard and much more complex than what you seem to think. What would happen if creatures collide in a corridor one wanting to go up and the other wanting to go down ? What will the other creatures will want to do ?
You can divide the tiles as much as you want, there is no solution. At most, you can try to add something smarter than the random offset I added when creatures are walking but that's it. Going further is an enormous work for a, IMHO, not that usefull feature.
hwoarangmy

Posts: 567
Joined: 16 Apr 2014, 19:13

### Who is online

Users browsing this forum: No registered users and 1 guest