XNA RPG Engine WIP Update 2011-8-25
Uploader Comments (NayusDante)
All Comments (10)
-
@FactoryEight After a little bit of fiddling I found out a way that worked like a charm. Thanks! :D:D
-
@Jurgen5586 Give your player object a CheckForCollisions function that returns a boolean. If it returns false, let the character move. In the function, you need to determine what tile the character is standing on, and check the properties of the tile that they'd be on if they were to move. Just play around with the xTile functions and get an idea of what properties there are in a map that you can check. There's also some good code snippets on the tIDE forums to explain Tile/TileIndex properties.
-
@FactoryEight Yeah.. About that.. To be honest that didn't make much sense to me. If it does not take too much time, could you write me a simple guide or make a video? :)
-
@Jurgen5586 You need to use tile attributes. I set attributes for BlockedNorth, BlockedSouth, etc and check them when the player is moving. If the player is about to move north, the game checks if the tile one north of the player's position has a BlockedSouth property. I do the properties on the tileset, so you check the map's layer's tile's TileIndex. If the player is at (4, 3), you check if Map.Layer[int layerumber].Tile[4, 2].TileIndex.ContainsProperty(
BlockedSouth) == true. -
Is there by any chance a possibility for you to make a tutorial on how you can make collision in xTile like that?
I've been trying to learn XNA and xTile and I always get stuck on the collision part.
I would be grateful if you did. :D
-
teh old final fantasys
What are they supposed to be, monkeys? Cavemen? Nudists?
theotherther1 6 months ago
@theotherther1 Ignore the art, those are just placeholder sprites. That's a sprite template from OpenGameArt, and won't be final art in whatever I end up making. Right now, focus is on the engine itself.
NayusDante 6 months ago