jonoxia / rpgbase

Generic Node.js/HTML5 role-playing game client/server
8 stars 6 forks source link

If two people start walking into same empty square at same time, both will occupy it #28

Open jonoxia opened 11 years ago

jonoxia commented 11 years ago

since the square is empty when they start walking, both characters see it as a valid square to walk into. When the walk animations finish, they're both there, and now we have two people occupying same square, which shouldn't happen. What needs to happen is that just before any character starts walking into a square, they tell the map screen to put a lock on that square. they release the lock when they're done moving. this way, the first one who starts moving will lay claim to the square, and the second one won't be able to start moving into it.