[Home] [Downloads] [Search] [Help/forum]


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  SMAUG
. -> [Folder]  SMAUG coding
. . -> [Subject]  In room movement? Update

In room movement? Update

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page


Pages: 1 2  

Posted by Gadush   (92 posts)  [Biography] bio
Date Mon 02 Feb 2004 03:53 AM (UTC)
Message
I have searched for a long time for any information of a system I saw on a MUD a few years ago, to no avail. If anyone has any information on such a system, I would greatly appreciate it. Here goes:
The MUD had a command, like 'tactical', that allowed a player to move within a room. When the command was entered, a simple ascii map of the room you were in came up below the text description, with the player appearing as an 'X' and any other players appearing by the first letter of their name, i.e. Gadush would show up as a G. Once in tactical mode, the player could move north, south, east, or west, and their X would move accordingly within the map, which updated to show their movement.
This was an awesome system that promoted tactics in combat and incredible roleplay, and I have really missed using it.
Has anyone any information on such a system? It can't have been easy to code, as I have only seen it on that single MUD, which is now defunct.
Thanks,
Gadush
[Go to top] top

Posted by Greven   Canada  (835 posts)  [Biography] bio
Date Reply #1 on Mon 02 Feb 2004 04:35 AM (UTC)

Amended on Mon 02 Feb 2004 04:37 AM (UTC) by Greven

Message
I've never heard of it, but it does sound something like the overland code. And if its just recording where a player is in a room, and printing out the room in simple ascii, thats not that hard either. 2 variables for room coordinates for the size, I would think, and 2 vairables on character data for the coords. Moving within that would not be difficult either, if they move north, check if the spot is empty, if so, ch->ycoord++, or something similiar. Now to tie it into combat would be alot more tricky, but again it depends on how you would want it set up. You could use a simple distance formula, and depending on weapons/race/whatever, that would determine if you could hit or not, etc.

Nobody ever expects the spanish inquisition!

darkwarriors.net:4848
http://darkwarriors.net
[Go to top] top

Posted by Gadush   (92 posts)  [Biography] bio
Date Reply #2 on Mon 02 Feb 2004 02:43 PM (UTC)
Message
The MUD I played did not take into account empty spots. If a character passed 'onto' the same space as another, the symbol displayed to the PC changed from 'X' to '*' until they moved from that spot.
Also, interacting with anything, be it a fountain, chair, or goblin, required you to be within one 'space' of it. This made combat awesome, as the fighters could rush up front when a monster was encountered, while spellcasters dropped behind them. Meanwhile, the mob was moving toward them. It was a very great system.
The ascii map program shares some similarites, yes. I have been trying to dissect it and see what it does, but this is a project that is way beyond my current skill. (And likely will be for a very long time. =P )
I posted here in the hopes that someone else has already done such a thing, or knows where it could be found.
Thanks,
Gadush
[Go to top] top

Posted by Gadush   (92 posts)  [Biography] bio
Date Reply #3 on Mon 02 Feb 2004 11:47 PM (UTC)
Message
Heh. Although I say it is beyond my skills( and it is) that has not stopped me from trying. So far I have added the command to the code, and right now all it does is print out my message that will later, I hope, be an ascii map. Now I need to work out how to store x,y, and z numbers(with a new command for room editing/building)in each room file, and have my function retrieve those numbers. Then have the ascii map print out using the numbers as spacing for its symbols. This will at least give rooms varying sizes, and display a correspondingly sized map. I will use + for each corner, and ----- for top and bottom(north and south), and use | for the sides. No doors for now.
Whew.
I am trying to find applicable pieces of existing code in src to help me figure this out. Anyhow, that is my progress so far. If anyone has anything to offer, I am grateful in advance.
Gadush
[Go to top] top

Posted by David Haley   USA  (3,881 posts)  [Biography] bio
Date Reply #4 on Tue 03 Feb 2004 02:50 AM (UTC)
Message
You should also think about your game design, that is, not only how do you represent this problem, but what problem are you stating in the first place?

For instance it's all well and good to say "people should be able to move around" but then you have to take into consideration a ton of other factors, like how to navigate in this, how you see people navigate, can you walk past somebody? can you walk through somebody? etc.

This kind of feature has not only coding issues - which actually are the simplest of your problems - but also all sorts of game design and balance issues.

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
[Go to top] top

Posted by Nick Cash   USA  (626 posts)  [Biography] bio
Date Reply #5 on Tue 03 Feb 2004 06:36 AM (UTC)
Message
I have a question. Are you using this like some kind of tactical radar that shows doors, hallways and the like or some open area, such as a field or entire planet? If you were thinking along the lines of a radar showing the hallways and stuff I think it would be more difficult because the map that showed where the play was would have to show all exits and directions they could travel. This would be a great addition to a futuristic mud such as SWR or something like that. If you are interested in doing it like that then I would be very interested in the project and would like to help (e-mail me). However, if this is more of an overland map with mountains looking like ^ and rivers like ~ or something like that, just post and the forum and I'll help as I can.

~Nick Cash
http://www.nick-cash.com
[Go to top] top

Posted by Greven   Canada  (835 posts)  [Biography] bio
Date Reply #6 on Tue 03 Feb 2004 07:09 AM (UTC)
Message
I agree with Ksilyan. If your planning this, your gonna need to plan out alot more than just the code for this, which seems to be fairly easy. This will add a very distinctive, well, tactical feel to the game, which may be what you want, but it could also be abuse by PK and power players. However, thats your stuff that you need to decide.

As for the code: There are lots of post on saving/reading variables for the room sizes. What do you need a z coordinate for, BTW? That would making printing out the map alot more difficult. As for printing it out, you should need 2 loops, one for the x, and within the x loop, the y loop. Objects and characters need x and y's as well. If the x == obj->x and y == obj->y, then print F for fountain, or whatever. This method is a very poor one, and I'm sure other people have better methods. As for figuring out how far someone is, you can use the standard math distance formula, very helpful ( its used alot in SWR ).

Nobody ever expects the spanish inquisition!

darkwarriors.net:4848
http://darkwarriors.net
[Go to top] top

Posted by Gadush   (92 posts)  [Biography] bio
Date Reply #7 on Tue 03 Feb 2004 02:35 PM (UTC)

Amended on Tue 03 Feb 2004 02:45 PM (UTC) by Gadush

Message
Thanks for the input everyone. To answer a few questions:
This is not intended as a radar system(although that sounds very cool itself). It is only to be a simple ascii display of an individual room, so no overland map display. It would show relative positions within a room though, and that would influence whether things could be interacted with. An example is a fountain. The player enters the room as normal, and gets the normal text description. Then type 'fill skin fountain' and get the message 'You are not close enough.' Then they type 'tactical' to go into tactical mode. This brings up the ascii display which looks something like this (please excuse the ascii):

  +-----------------+
  |     f           |
  |                 |
  |           G     |
  |                 |
  |                 |
  |  X              |
  +-----------------+


The X is the player, the f the fountain, the G is Gadush, another player. Players are capitals, objects are lower-case.
Player then types north a few times, and gets the message:
'You move a bit to the north.' The map is updated for each move, showing the X farther north. When the X is within one move of the f(fountain) he can now type 'fill skin fountain' and get the normal message 'you fill a skin from a gushing fountain.'
Other players see themselves as the X, and other players as capital letters. When another player moves, such as X sees Gadush move, they see: Gadush moves a bit north, etc.

There is nothing in this system to stop someone from walking 'through' or 'over' a space occupied by another player or mob, which I think makes it simpler to exit rooms and such. When you get to an edge, you get the normal message of 'you cannot go in that direction' But if there is an exit in that direction, you simply leave the room, and are returned to normal movement. Thus, the map does not always display, cluttering the screen.

Adding anything to a game does introduce balancing issues, but I think the tactical advantages would apply to all classes, and indeed every level. Mobs too would move in tactical, and it is good to enter a room and see 'A towering figure of muscle is here.' And then:
'An ogre moves a few paces to the south.' right toward you! Heh.
Thanks for the interest and advice. I am really new to coding(probably obvious) and all advice is extremely welcome.
Gadush
[Go to top] top

Posted by Gadush   (92 posts)  [Biography] bio
Date Reply #8 on Tue 03 Feb 2004 02:57 PM (UTC)
Message
Oops, forgot to answer the z-axis question.
Z axis would be used for a number of things, mainly being flying, swimming, and climbing. Those things would take a long while to implement, but better to plan for the future at the outset.
Flying: With a z axis, differing messages would be sent to a flying player telling them how high they were. If they were flying (all flying must be in tactical) they could control their height with up and down commands, getting something like: 'You fly a bit higher. You are now <height> up.' Others in the room would get a message like: 'Gadush is here, flying twenty feet up.'
Swimming: All swimming would be in tactical. If you are able to swim you can use all the normal directions to move up, down, ect. Once in a 'surface' room, you could go down to beneath the surface or swim on top in normal directions. Below the surface you could swim all over, and even down to a 'bottom' room. Of course, you could drown too. Hee hee.
Climbing: Same as the other two examples. You could be climbing a cliff face, and each tactical move takes you farther up, until you climb to the next room. Unless you fall.
There would not be a separate elevation display for the z-axis. I had thought there could be, with an 'L' shaped line map giving height increments along the vertical, but I don't think it would be worth the coding, and might confuse players too much.
Thanks again for the help all.
Gadush
[Go to top] top

Posted by David Haley   USA  (3,881 posts)  [Biography] bio
Date Reply #9 on Tue 03 Feb 2004 05:04 PM (UTC)
Message
There are still a lot of questions that aren't answered here for gameplay issues. How fast can players maneuver on this map? What's the point of tactical movements, i.e. fighters rushing forward, if people can go through them to the mages behind anyways? How can I just traipse across the room in one command, e.g. just type "west", and take the west exit, if the people inside the room have to laboriously type "east east east east" in tactical mode to get to me? What if there are multiple people with the same first letter, e.g. Gadush, Grok and a goblin? How do you tell them apart on the map?

To be honest, I think having a graphical representation of rooms and combat would be one of the coolest things ever. That being said, due to the limitations of text-based engines, getting it "right" is extremely difficult. Of course, it would be very easy to implement it with just what you've described now, but personally I would feel that leaves too many questions totally unanswered and could make for broken gameplay and many possible exploits/cheats in the system.

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
[Go to top] top

Posted by Gadush   (92 posts)  [Biography] bio
Date Reply #10 on Tue 03 Feb 2004 05:23 PM (UTC)
Message
You raise some valid concerns about implementing this system. But I guess anything new must meet such concerns and try to overcome them.
How fast can players move right now, without tactical? It is totally arbitrary, as there is no distance involved at all from room to room. Type n,n,n,n,n and you zoom across 5 rooms. In the system I want, you can move one 'space' in tactical much the same way, as fast as you can type. I look at it thusly: Somebody in normal movement is not taking care to maneuver past a monster, or whatnot, while somebody in tactical is taking more care. And remember, unless you are fighting, climbing, swimming, or moving next to an object to use/interact, you don't need to be in tactical.
The use in tactical, besides roleplay, is that somebody trying to rush past a group of fighters to get to the mage will be attacked by the fighters and possibly killed, while the mage will get off a spell. It is just as the name says, tactical. There are other cool things. For instance, you are nearly out of movement and need to get to fountain/food/whatever. You need tactical, but you can't move until you gain movement. Some of the things are hard to put down like this, but I have seen tactical used, and it is very good.
The characters might have the same first letter, but mobs/npcs use a lower-case letter, making them easily identifiable. Also, aggressive mobs will begin moving toward you or casting, making them a dead giveaway.
I am glad to get the input on this, and you are undoubtedly right that there will be unforseen problems. But I think those can be dealt with as they crop up. I must say, I sure wish it was as simple for me to code this as it sounds like it is to many here. But I suppose that is why I am at this site, to try to learn from those who do know.
I am not sure of how somebody could abuse/cheat with such a system. How do you see this happening?
Thanks again for posting.
Gadush
[Go to top] top

Posted by Greven   Canada  (835 posts)  [Biography] bio
Date Reply #11 on Tue 03 Feb 2004 06:10 PM (UTC)

Amended on Tue 03 Feb 2004 06:13 PM (UTC) by Greven

Message
I can think of a couple of problem with this system that you might need to work out. In addition to the concerns that Ksilyan brought up, I can see someone to avoid a fight back away in tactical, switch to normal, and then just run, since the combat will be cancelled by moving out of range ( from what I understand, anyways). Also, will the tactical display replace what you would normally view with do_look? Will it replace exits, possibly, or just the description? Will it replace the list of printed objects and mobs? Will the combat spam be a problem, forcing the tactical display off of the screen, or will it be updated after each violence update? If so, this is an additional bit of processor time that you may want to consider if your on a restricted account.

You also need to consider what other system will be affected, as well as all the commands and skills you will have to change: spell_smaug, any non-self targetting spell, combat skill(throw, for example, would probably not need any distance restriction). Will you perhaps add skill->min_distance and skill->max_distance. Same thing with commands, you'll need to change look, get, put, drink, examine, etc.

Just some thoughts on things you would need to consider. While this system does seem to be coming along, you will likely want to actually plan something like this out, write down everything you want it to do(make it so people can't pick up an item if they are not tactically near it), then how you could go about doing it(modify the do_get code to check for distance using the distance formula), and then what you actually need to do in the code
if ( sqrt(pow(((int)(char->x - obj->x)), 2)+pow(((int)(char->y - obj->y)), 2) > 2) ){
send_to_char("You are not close enough to the object to pick it up!", ch);
return;
}


Something like that. It wil make things alot easier to do when you go to implement it.

Nobody ever expects the spanish inquisition!

darkwarriors.net:4848
http://darkwarriors.net
[Go to top] top

Posted by Gadush   (92 posts)  [Biography] bio
Date Reply #12 on Tue 03 Feb 2004 11:11 PM (UTC)
Message
True, somebody could attack, then back away in tactical. Of course, they can be followed as they back away too. And just as in normal movement, you cannot leave a room when in combat. You must flee out.
One thing I did not mention, but plays an important factor in many of these issues is that when a player attacks something, they are automatically placed in tactical mode. Likewise, if a player is attacked, they automatically enter tactical mode. You can try to go into normal mode while engaged, but you will immediately be placed back in tactical.
This stops somebody from standing at one edge of a room with an exit, using a bow, and leaving the room. As soon as they fire the bow, they go into tactical, and are engaged in fighting. They can try to flee out (indeed an important tactic is to move/be near an exit side to a room before trying to flee, as it increases the chance that your random flee direction will take you out of the room, and not just move you in tactical within the room) and they might make it too. But I don't see that as cheating, actually.
Tactical map will not replace anything you see now when entering a room. If a player is in tactical, and they move, the normal text disappears and the map updates with the appropriate message about 'You move a few paces <direction>' beneath it. When you type look, the map is gone, and the normal description is sent.
Battle spam is just the same as normal, except when somebody/mob moves. Then map is sent, updated, and message is sent. It will take more processing, but my idea is not to have a huge playerbase on at once, and I think the lag will be acceptable.(It was fine on the MUD I played with around 50 players)
You have hit the nail on the head too. It seems as though there are very few parts of the code that won't be affected. Wow. I feel like a tourist in a foreign land, just trying to find my way. =)
You have a good point about codifying exactly what I want this to do. I will take the advice offered here and try to get down on paper what I want this code to accomplish. Thanks for the pointers toward actual code too.
Gadush
[Go to top] top

Posted by David Haley   USA  (3,881 posts)  [Biography] bio
Date Reply #13 on Wed 04 Feb 2004 01:10 AM (UTC)
Message
So, what happens if somebody engages someone else in combat, but then never actually walks forward to engage? This sounds like a prime way to annoy people walking by; just force them into tactical mode and make them "flee". Nobody gets hurt in the process.

Also, sounds like somebody could totally confuse the battle by running around in random directions. If you really plan on having no speed limit (very bad idea, IMO) then someone just just have these long sequences of "west north east south" to just run in circles. By generating not only the text "so and so moves such and such", but ALSO generating the map every time, you could swamp out potentially important information by running in circles like that. In a real battle, or with a graphical display, the player chooses what to look at and what to ignore.

My main problem with this whole tactical issue is that it opens the door to abuse. For instance if you have a bow, you shouldn't be able to take one step left and be "out of range" suddenly because it's a different room. In fact, if you're going "tactical", the whole world should be tactical from a certain point of view; maybe you don't find that fire-then-step-out tactic cheap, but many others do and probably won't be happy campers.

So like I said, you open the door to abuse. Maybe this is all fine if you have nice players who play by the rules, but if you ever plan to have your game be seriously public, expect to have people looking (and finding) exploits in your system.

I'm really not trying to be discouraging here; this is a problem I've thought about for a very long time and as of yet I have not found a satisfactory solution (in my mind, at least.) I think that this kind of project runs up real hard against the physical medium of a MUD, and that is text only.

Again, the problem of having two players, Grok and Gadush. One is an archer, and one is a wizard. So they both fire from afar. On your map, how do you tell which is which?

There are just so many issues here that it's very difficult to make it "right". Again, it may not be an issue if all of your players "play fair" but in my experience, that is very rarely the case.

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
[Go to top] top

Posted by Gadush   (92 posts)  [Biography] bio
Date Reply #14 on Wed 04 Feb 2004 01:40 AM (UTC)

Amended on Wed 04 Feb 2004 01:49 AM (UTC) by Gadush

Message
I hear what you're saying. It is true that there will always be those who find/abuse the code. No doubt about that one. =(
But I would hate to just scrub a good system in favor of bad players. Remember, if the player attacks from the edge of a room, he still has to try to flee out, not just walk out. As for Grok and Gadush being told apart when both firing, who needs to know them apart? Each knows who the other is, right? And to an observer, they see each fire. If they want to join, they type the name, so that would tell them apart. It seems like a rare occasion when a player who wanted to interfere was to come into a room just as both G-men were firing, and not be able to tell who was where. If they were grouped with one of the Gs, they would be near them on the map, unless they had moved away in tactical. And if they did, they know where their pal is.
Being out of range by leaving a room does not bother me, as it is that way now. You can attack somebody, then flee and if you make it out, you are out of range.
I see what you are asking with the annoying idea of somebody 'dragging' another player into tactical, but it would not work that way. Just typing 'kill Pete' will not put Pete in tactical. Hitting Pete (first moving up to him if you need to) with your iron mallet will though, and he will respond. So no constant putting folks into tactical. When I earlier posted that when a player is attacked, I did not mean merely the attack command was input, I meant they were actually 'swung on'.
Combat happens too fast to just run in circles for very long. The monster will catch you and kill ya. I have run in circles and tried getting away. It is a bad idea. Remember, most rooms will not appear as huge maps. Each 'space' is about 5 feet and most rooms will be no more than 10 x 20 x 70. Very few rooms would have enough room to out run a mob.
In a real battle, important things are overlooked in the ensuing chaos. =) Some things might go by unnoticed, but as it is it seems pretty hard to read all the normal battle spam. The way things usually worked where I played was that once battle was joined, there was not that much time to run about. Players not in the fray can concentrate on getting into position to do whatever. I have moved my cleric right up behind the fighter and healed him as he was fighting the mob.
I am certainly not discarding your opinions, and you have a way better grasp of how hard things are to make work with many players and such. I just feel such a system would offset the bad with so much goodness. Hee hee.
I hope I am not breaking the rules to post so much stuff here that is not actually coding, but merely ideas and hoping for help with the code itself.
Gadush
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


59,821 views.

This is page 1, subject is 2 pages long: 1 2  [Next page]

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at HostDash]