Tile engine tweaks

I have fixed the collision detection in the tile engine. It feels much better now that he bumps up to objects correctly (or at least better). It's not perfect but it seems a lot better and I felt great when I finally figured it out.

It took about an hour of stepping through and changing variables and commenting out code out to see where it was. I was laughing at it though because I would comment out huge chunks of code to see what would break and nothing would change visibly. I pretty much left out all the check for diagonal tile collisions.

All I had to change was the value for PlayerPosition.CalculateMovement( Vector2.Multiply(userMovement, 4f), ref desiredTilePosition, ref desiredTileOffset); I changed from 15f to 4f and it allowed me to move closer.

I also changed the background image for the menus.
I think I will finally start adding the item/attack menus next.

Until next Thursday.

Comments

Popular Posts