I was thinking about how I could pull off a tile based RPG with multiple players. The key problems are:

1) How do I handle 2 or more players trying to move onto the same tile at once?

2) If each player take up a tile, 20-30 players takes up A LOT of tiles. Assuming they can attack a little further than people on adjacent tiles, they will be very spread out.

3) A gang of players can block a narrow passageway by taking up all the tiles.

Before we have MMORPGs, there were "multi-user dungeons" or "MUD"s that gives each tile its own "room". 50 players could all squeeze/move onto a tile/room. The content of each tile is displayed in a separate area of the client, and players interact only with people in the same tile/room. I think there are severe drawbacks to this method:

1) Since you only interact with people in the same tile/room, there are no ranged attacks that can reach players in other rooms. (simply because there isn't a way to display the content of surrounding rooms easily)

2) Players have no geographical location or facing within a tile/room. They are just generically there.

Are there any other ways to handle a multi-user tile based RPG? Or is this just impossible?

1) how about allowing multiple characters on same tile.
2) how about tiles not being your limitation. E.g characters dont move 1 tiles per turn but 0.1 tile per turn,
thus 1 tile could be divided in many fragments.
3) how about saving position in float variable ? for the above reason. instead of integer.

I was thinking about how I could pull off a tile based RPG with multiple players. The key problems are:

1) How do I handle 2 or more players trying to move onto the same tile at once?

If they try to do so at about the same time then let them both move onto it, unless there is a very important gameplay reason why they shouldn't.Alternatively, let them both move onto it, and push the second one back to his original tile.

2) If each player take up a tile, 20-30 players takes up A LOT of tiles. Assuming they can attack a little further than people on adjacent tiles, they will be very spread out.

20 or 30 players takes up 20 or 30 tiles. I'm not sure what your question is here.

3) A gang of players can block a narrow passageway by taking up all the tiles.

So give players the ability to:A) Hop over another player.B) Push/pull other players.C) Vote kick other players.

And make players that stand still for longer than 2 minutes turn transparent and be walk-through-able.

[Edit:] Another option is having your grid set up so players move along routes inbetween the tiles, and when they stop, they stop on a tile. They can't stop on a tile another player is stopped on, but they can walk between two players, walking between the two tiles. Players in motion between tiles don't collide with other players in motion between tiles. Then no matter how many griefers line up in a wall, players can still walk through as easy as they please.

1) how about allowing multiple characters on same tile.2) how about tiles not being your limitation. E.g characters dont move 1 tiles per turn but 0.1 tile per turn,thus 1 tile could be divided in many fragments.3) how about saving position in float variable ? for the above reason. instead of integer.

How would we graphically represent having multiple characters on the same tile, or having multiple characters each sharing 0.1 of the same tile? Would the avatars all stack and overlap each other on the tile? Or will only 1 avatar be shown per tile?

Also, while I can allow players to click on a tile to reveal a list of who is in it, I can't think of an easy way to represent who is at which tile on one screen. This affect things like PvP, when you're trying to shoot down a moving, he will be gone by the time you click through a bunch of tiles to see if his name is in it.

If they try to do so at about the same time then let them both move onto it, unless there is a very important gameplay reason why they shouldn't.Alternatively, let them both move onto it, and push the second one back to his original tile.

See my reply to "n00b0dy" about why I don't know how to pull off multiple characters on the same tile. I don't think pushing players back is a good idea. Might end up causing a lot of frustration.

2) If each player take up a tile, 20-30 players takes up A LOT of tiles. Assuming they can attack a little further than people on adjacent tiles, they will be very spread out.

20 or 30 players takes up 20 or 30 tiles. I'm not sure what your question is here.

Was trying to point out that 25 players standing side by side would take up 25 tiles, if one tile can only have one player. Might be spreading out players too much, and would require a huge tile map to give enough space for everyone.

See my reply to "n00b0dy" about why I don't know how to pull off multiple characters on the same tile.

It really is a gameplay specific problem. One solution for one game might not work for another game - and we don't know the details of your game.If it's turnbased, selecting a player from a menu is no problem. Even if he moves, he should stay "selected" by you.Or if there are friendlies and enemies, just hit the first enemy in the stack and ignore the enemies.Or if it's action, don't select, just fire and who it hits is who it hits.

I don't think pushing players back is a good idea. Might end up causing a lot of frustration.

In a really really small (20 players) 2D ORPG I was working on with some other fellas online several years back, we allowed pushing and pulling. It was actually more a matter of humor than anything (we didn't allow players to 'pull' or 'push' beyond map boundries, so nobody was 'pulled' into a PVP zone. If they already were in a PVP zone and went AFK, well, being pulled is not as bad as being killed).Pulling/pushing was simply a way to prevent people from blocking areas and going AFK. It worked like this: Player A initiates a 'pull' on PlayerB. PlayerB sees a message saying, "PlayerA is pulling you...", after 15 seconds if PlayerB still hasn't moved, he was pulled one block - so it really only affects AFKers, griefers, or players having fun.

Or you could skip the pulling/pushing, and just let a player "Move past" another player (one shifts to the left 1/3rd a tile, the other to the right), but not allow him to stop on an occupied tile (You can think of this as "jumping" over another player if you like). Basically, the player is just moving through a crowd and the crowd shifts around him and he around the crowd.

Alternatively, you could use hexadecimal tiles, which wouldn't completely solve the issue, but it would make it harder to block routes.

Was trying to point out that 25 players standing side by side would take up 25 tiles, if one tile can only have one player. Might be spreading out players too much, and would require a huge tile map to give enough space for everyone.

Well, if you're maps are too crowded they are too crowded - the only solution is to make the maps larger. The same thing happens in any game, such as online FPS games - If you take 30 players and put them in one room, that one room is too crowded... but the levels are large enough that more than 5 or 6 players never end up in the same room at once.

It really depends on your gameplay needs. A crowded area might be a problem for some games, and a nearly empty area might be a problem for others.One thing you could try is scale the same map area up if too many players happen to congregate in one location.

Example: The maps might be designed as 20 by 20 tiles, but with 10 extra tiles horizontally and vertically that are cleverly placed to expand outward (one by one) only as needed. It'll make your mappers have to do more work, but if that's what your game requires, it's doable. Plus, you can isolate which maps are the 'problem maps' (in a online persistent world, it's usually not that many), and only bother with the extra work for those areas.

You mentioned MUDs in your first post. That was before my time, but I've read up on some history of them. Didn't the early MUDs even have "Overflow" rooms that open up when too many players were online in one area? I think MUD itself (the original MUD-type game) had those.

However, referring to my previous post, does "walking between" tiles not work in your situation?

Was trying to point out that 25 players standing side by side would take up 25 tiles, if one tile can only have one player. Might be spreading out players too much, and would require a huge tile map to give enough space for everyone.

Players "spread out too much" in what sense?Nethack, which is a positively ancient game, is capable of simultaneously displaying 1680 tiles. 25 players in Nethack's world would barely fill one small room. You could show just 10% of the amount of tiles Nethack does, and 25 players would still only cover 15% of the available screen space, nowhere near making the screen feel cramped.

Assuming frequent logic ticks, most cases of players trying to enter the same tile can be trivially resolved by allowing the first player to move and blocking the rest. The case where their movement commands occur on exactly the same tick is rare and you can use some form of pseudorandom to handle it.

Servant of the Lord: hex tiles barely make it harder to block than square tiles with 4-way movement, and make it easier to block than on square tiles with 8-way movement.

I am making something like Urban Dead: http://www.urbandead.com/screenshot.html. Their system is the same as the Multi-user Dungeon system: the 3x3 tiled map on the top left corner of the screenshot represents the "world map". Each tile is a room that contains players and objects, shown in a separate window on the top right hand area of the screenshot.

I was thinking if it would be possible to do away with the separate window telling players what is in the room, and instead display all that information on the tile "world map". Perhaps by restricting it to 1 player per tile.

If it's turnbased, selecting a player from a menu is no problem. Even if he moves, he should stay "selected" by you.

Brilliant! I will be using this. Thanks!

Or you could skip the pulling/pushing, and just let a player "Move past" another player (one shifts to the left 1/3rd a tile, the other to the right), but not allow him to stop on an occupied tile (You can think of this as "jumping" over another player if you like). Basically, the player is just moving through a crowd and the crowd shifts around him and he around the crowd.

However, referring to my previous post, does "walking between" tiles not work in your situation?

Wow! Thanks for the diagram!

The way my game works now is that when the player press a direction button, say the up arrow, he moves 1 tile in that direction. Walking between the tile or jumping over another player would allow him to move more than 1 tile in the direction with 1 key stroke. Also, since the game is in real time, he/she might unintentionally jumped over players who are just passing through, resulting in frustration if he/she is trying to get to a particular tile.

I don't remember MUDs having dynamically expanding areas ("overflow rooms") to accommodate more players. But I have really only checked out the more popular MUDs.

Nethack, which is a positively ancient game, is capable of simultaneously displaying 1680 tiles. 25 players in Nethack's world would barely fill one small room. You could show just 10% of the amount of tiles Nethack does, and 25 players would still only cover 15% of the available screen space, nowhere near making the screen feel cramped.

Are you referring to ASCII tiled maps? If o = empty tile, x = player on tile, we can indeed represent 25 players in a very small space:

Even if you make the passageways wider, all griefers have to do is block the narrowest part. This happens in towns and cities too - a doorway might be camped by a single griefer, not letting players get into a shop.

Servant of the Lord: hex tiles barely make it harder to block than square tiles with 4-way movement, and make it easier to block than on square tiles with 8-way movement.

Good point. =)8-way movement doesn't help with a straight wall/line of players though. If there is a wall, there's a wall - the only way you can keep this from becoming an issue is to let players somehow get past other players: move between tiles, walk through players, double-tap forward to initiate walkthrough but normally collide, push/pull, jump over, teleport to mouse pointer, or something similar.

Are there any design logs, blogs, or demos still around? Looks like I can learn a lot from this.

My point was that lots of space is blocked off by the terrain itself, even if you have 20 by 20 tile maps ("400 whole tiles! 25 users can fit easily into that!" -> Not when half of it is taken up by the walls and terrain, and all a griefer has to do is stand on the chokepoints).That game doesn't implement the 'walk between tiles' thing I mentioned, though it does implement the pull/push method. Also, if two players walk onto the same tile at the same time, they both occupy that tile.

The game was discontinued - the forum is still up though, so you can kinda see some history there over four years. The design-related posts are hidden in a locked portion of the forums, so you can't get at that, but the map editor, script engine, and unfinished game world has been made available as a 'single player' version of the old online game. Source code is not available.The game was an action-RPG, not a turn-based one, so I'm not sure how much it'll help you - plus, as mentioned, it's no longer 'online'. After the project collapsed, the lead developer released a single-player version for the 20 or so active players to mess around with.

I didn't program the game - I was an artist/mapmaker/scripter/community-manager/whatever-hat-was-needed, so don't ask about specific implementation details, because I don't know.

Also, if two players walk onto the same tile at the same time, they both occupy that tile.

So, 10 players could occupy 1 tile?

Question: How did the game display graphically that, for example, 10 players were on the same tile? And display who is in that tile?

The game was discontinued - the forum is still up though, so you can kinda see some history there over four years. The design-related posts are hidden in a locked portion of the forums, so you can't get at that, but the map editor, script engine, and unfinished game world has been made available as a 'single player' version of the old online game. Source code is not available.The game was an action-RPG, not a turn-based one, so I'm not sure how much it'll help you - plus, as mentioned, it's no longer 'online'. After the project collapsed, the lead developer released a single-player version for the 20 or so active players to mess around with.

Thanks. It would have been nice to see the multi-player. Been checking out a lot of other games to learn stuff from them.

Have any of you guys played World of Warcraft (WoW)? (I have never played it )

You should. It's the same grinding as all MMOs, but Blizzard has managed to cram some very good game mechanics in there, particularly the interactions in player vs player combat.

I read that there is no player collision in WoW. That is, 10 players can stand on the same spot, and they'll all just mesh together.

Sounds like they would have the same concern I am having. For example: if a healer stands on a spot, and a warrior go stand on the same spot, is there a way to see or target the healer?

Players tend to naturally fan out instead of standing right on top of each other, so it's not usual that you have trouble clicking on what you want to target. That said, you can target anything in a cone in front of you by pressing tab; additional keypresses cycle through the possible targets. You can also directly target anyone in your own group via group portraits which are constantly visible, or hotkeys. This is enough to handle 99% of situations that actually occur in game.

Advanced players can also use a "focus" feature to mark a particular target (whether friendly or hostile) so they can immediately select that particular target again. And group leader may place visual markers, visible to the whole group, on particular enemies to help selecting them and to ease coordination ("okay, warrior delays the mob marked with skull, rogue disables the mob marked with crescent, all others kill the mob marked with star").

Also, if two players walk onto the same tile at the same time, they both occupy that tile.

So, 10 players could occupy 1 tile?

Theoretically, yes, in actuality, no: They have to move at nearly the exact same time onto the tile, otherwise if a player is 'already' on the tile, it treats that tile like a wall. Only if they move at the same time, do they both occupy the same tile - A bug, but such a harmless one we decided to leave it as is. At maximum, this would mean only players on the four adjacent tiles would have a chance to move at the same time, though it'd be hard to time all four at once (and maybe be even something players might attempt for fun when bored).

As a staff member, I could teleport players to me, or me to them, and so I sometimes for fun, when just messing around with the fanbase would teleport five or six players onto a single tile. I'd also sometimes teleport/spawn monsters ontop of my location for players to fight (we were really casual, since we had so few players, so I constantly ran 'events' to entertain people).

Question: How did the game display graphically that, for example, 10 players were on the same tile? And display who is in that tile?

It'd just draw them on top of each other, sprites and names overlapping. Since it was an action-rpg, you don't 'select' people to attack, you just attack in that general direction.

Random thought: How are you storing players? This might be the source of your confusion.There are two different ways that are occurring to me in this situation:1) Each tile-struct on the map knows what player is on it.2) Each player-struct knows what tile he is on.(both methods are server-controlled)

If you go like this:

struct Tile
{
Image *image;
bool isWall;
Player *player; //If null, no player is on this tile, otherwise it's a pointer to the player.
Item *item; //If null, no item is on this tile, otherwise it's a pointer to the item.
Monster *monster; //If null, no monster is on this tile, otherwise it's a pointer to the monster.
}

Then yea, you'll have difficulty handling multiple players on a single tile.

//Layers of tiles beneath the player.
MapLayers[0].Draw();
MapLayers[1].Draw();
MapLayers[2].Draw();
//Draw all the items on the map (beneath the player - the player walks over them).
MapItems.Draw();
//Draw all the monsters.
MapMonsters.Draw();
//Draw all the players. Nothing prevents more than one player from drawing over the same tile or being on the same location.
Players.Draw();
//Draw all the magic effects.
Effects.Draw();
//Layers of tiles drawn over the player (tree tops, roofs, etc...)
MapLayers[3].Draw();
MapLayers[4].Draw();
MapLayers[5].Draw();

Don't let the tiles of the map dictate what they can or cannot contain. Let the map itself, at a higher level, do that.You may sometime in the future want five items to be on the same tile, and a monster ontop of that guarding the items.

Tiles don't need to know what players are ontop of them, since it doesn't change (or rarely changes) the behavior of the tile.Players do need to know what tile they are on, since the tile might effect their (the player's) behavior (lava damage, slippery ice, wall, etc...).

I'm surprised nobody mentioned Ultima Online. It was fully tile-based. If something else was on a tile, you could move on the tile, but it would cost you a lot of stamina. Players on the same tile would get drawn on top of each other. If 2 players tried to move on the same tile, whoever moved there first moved and the other player didn't move. Movement speed depended on lag because everything was checked server-side instead of relying on the client like new MMORPGs.

I have an idea, which although does not allow infinite people in one tiel, it could if you want to.

The system i though (although it probably exists in some way already) is to divide the tile in X spots, let's say 10.

So, the tile is there, with 10 empy spots, when something or someone steps on that tile, it fills the first spot, if someone stops in the same tile, it would fill the second one. You can display whatever is filling the first spot or alternate between whats there and you have to make sure you make some interface to link to things in other spots.

Depending on some things, this could be a good idea to use, though i can't really grasp the memory use in large maps.

So, the tile is there, with 10 empy spots, when something or someone steps on that tile, it fills the first spot, if someone stops in the same tile, it would fill the second one. You can display whatever is filling the first spot or alternate between whats there and you have to make sure you make some interface to link to things in other spots.

That's a good idea. It could show one of the players, it doesn't matter who, and when you hover over the tile, that player shrinks back, and all the players on that tile shrink down to all become visible.If there are twenty or so characters, they'd get too small (unless the tile expanded vertically and horizontally to accommodate more), but for any number of players less than 10, it'd work fine.

Dwarf fortress solves this by blinking through the various sprites on a given tile, at least to show you what is there. If your interface supprts it, you could mouse-over the tile and then spiral-out a rotary menu or a push-out menu with all the sprites on that tile, allowing you to select which one individually. You could also use the scroll-wheel to cycle through the sprites as well.