Interactive items in tilemaps
BlitzMax Forums/BlitzMax Beginners Area/Interactive items in tilemaps
| ||
I'm writing a Sokoban-style game, but with some extras like oneways, keys, doors, etc. Player can move through the maze without problems and collision with the walls work also. Now I wonder, how you store collectable or movable objects in tilemaps. Are they part of the tilemap and just controlled by the player or do you use them as objects with their own methods? |
| ||
I don't know whether this is what you're looking for, but it's an idea. I've not tested the code but hopefully you get the idea. I don't know how Sokoban works, but you should be able to push a long line of objects at once with this code. A wall can be a special item which does not move when pushed. |
| ||
Sorry for answering so late. :-/ Yes, that helped me a lot, thank you. Makes it much easier than my idea (making the player object test everything). |