EverEnding DevBlog 117: Intersection

EveHeader

I got a decent little effect working for the hair and such, though I ended up putting off the registration point chore for now since there was some other stuff I really should get working lest I risk putting in a bunch of time putting in metadata that later ends up changing. After that, I started thinking about creating a basic enemy, and in fairly short order realized that in order to get something decent to test with I’d need to go back and develop my collision detection so that enemies could use it to perform basic terrain navigation.

As things stood, up until a few days ago, my collision detection was basically performing two tasks at once: First, placing the entity against the terrain, finding all places where they overlap, and resolving those overlaps in a reasonably consistent and predictable way. This is the main collision detection, and pretty much what one thinks of when the words ‘collision detection’ are mentioned. The second system tracked the surface of the ground the character was standing on and made sure that all movement was adjacent to this ground surface, so that the character didn’t pop off of the tops of hills when she ran quickly or otherwise behave inconsistently with the terrain. It occurred to me that this latter could, and probably should, be expanded significantly, so that an enemy could, for instance, use it to crawl along all of the edges of the wall, or detect when the tile it’s about to step on is a gap and turn around. So I’ve split them into two separate behaviors, and the last few days have been spent making that split, fixing each behavior so that they work again, and finding any final inconsistencies that make them perform poorly before I do any requisite expansions.

This is definitely the nicest the basic collision has ever looked, both in terms of reading and performance. Collisions seems pretty much 100% consistent, with slope collisions getting resolved smoothly and pretty much exactly how I, as a player, would expect them to be. Ground tracking has still got a ways left to go, unfortunately, and I’m still seeing a number of weird and inconsistent results. It’s likely I’ve completely missed some important aspect of this system in developing its code – still, overall these systems are working as well as they’ve ever worked, and promise to improve significantly with a bit more work. I’m hoping to have these done within a few days, develop a new PatrolBehavior based on the changes I’ve made, and implement a new basic enemy type using that behavior within the week.

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: