|
|||||||
This is a discussion on "How are directions (n, e, s, w) typically coded?" in the Top Mud Sites Newbie Help forum : Are directions typically a set of actual objects in each room, where, by entering 'look north' you actually 'look' at the object 'north'? Or is it usually designed more as a kind of contengency plan for when a simple 'look' function won't suffice? Or is it something else entirely? I don't have any code to look at first hand, as I doubt the college I compute at would look kindly on the downloading of an entire mud codebase. I need to keep my computing priveleges.... |
|
You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our MUD community today! If you have any problems with the registration process or your account login, please contact us. If you are a registered member of the old TMS forums, please click here
|
![]() |
|
|
LinkBack | Thread Tools |
|
|
#1 |
|
Member
Join Date: Apr 2002
Posts: 123
![]() |
Are directions typically a set of actual objects in each room, where, by entering 'look north' you actually 'look' at the object 'north'? Or is it usually designed more as a kind of contengency plan for when a simple 'look' function won't suffice? Or is it something else entirely?
I don't have any code to look at first hand, as I doubt the college I compute at would look kindly on the downloading of an entire mud codebase. I need to keep my computing priveleges. |
|
|
|
|
|
#2 |
|
Moderator
Join Date: Oct 2002
Name: Chris
Location: Wolverhampton, UK
Posts: 349
![]() |
When you type "look north" what you get is the exit description set for that direction. If you use OLC, this gets set when you're editing a room.
I'm not sure if this is what you were enquiring about, so if it isn't feel free to post back and say "No, I meant blah blah" and I'll try and answer that instead! |
|
|
|
|
|
#3 |
|
Member
Join Date: Apr 2002
Posts: 50
![]() |
How does scry work code wise anyhow? Especially in the SMAUG form.
It makes it if you were in the room you scried into, and you're dumped to the bottom of your real room's room list. How does it work? Thanks. |
|
|
|
|
|
#4 |
|
Member
Join Date: Sep 2002
Location: Canada
Posts: 73
![]() |
I'll answer Burr first, then Azhon afterwards.
Burr: I believe that in some versions of weird MUSH codebases, there are special objects called 'link' objects which usually (but not always) have two different names depending on which room you happen to be in. If there are any MUSH programmers/builders out there, I'm sure they could improve on my attempt at describing this. However, on all Diku- derivatives (like ROM, SMAUG, etc) all exit directions are converted to numbers (like 0=north, 1=east, ... 11 directions in all for SMAUG). Then, a piece of memory callled a 'exit_data' is filled in with the details like what room does the exit lead to, is it a closeable door, is it a hidden exit, etc. Finally this exit_data is inserted into a special list (sorted by exit number) - totally unrelated to the list of game-playable 'objects' in the room. When you type commands like n,e,sw,u - they are recognized by the code as meaning 'GO that way'. The command translates again to the direction number, and the list of exit_data is searched and (if one is found AND you can see it AND if it is open AND ...) then your character 'moves' to the next room. Otherwise, you get the famous 'Alas, you cannot go that way' message. In contrast, when you type 'LOOK whatever' the code searches a different list (actually two different lists, the list of room contents AND the list of other characters in the room, including you! I hope this was the type of answer you were looking for. Azhon: Your perceptions are correct. When you do scry, what happens in the code is you LEAVE the room you are in, ENTER the new room, LOOK, then return to your original room, all without sending any 'bamf' messages: "Azhon arrives from the east". So, after scrying, since you have now become the last character to enter your original room, you find yourself at the bottom of the heap! Which now brings me to a question of my own: If there is anyone out there who knows the history or etymology of the word 'bamf', I'd much appreciate hearing about that. In which code base did it originate, who came up with it, and what were they thinking when they coined the term? |
|
|
|
|
|
#5 |
|
New Member
Join Date: Oct 2002
Posts: 14
![]() |
I'm not saying this the first reference of Bamf ever - but its the sound Nightcrawler made when he teleported waaaay back in early X-Men. Have to check out when X-Men Giant Sized 1 came out.
*shrugs* |
|
|
|
|
|
#6 | |
|
Posts: n/a
|
Burr: The idea you presented is actually how it works on my mud to say the least. I have a mapping/dictionary which holds the exit names and their corresponding room object.
When a player types a command (eg: look north / go north) the code runs a check to make sure such an object exists then runs the "can I" checks and either moves the player into the objects inventory or calls the objects short and long description methods. If it doesn't exist the mud attempts to create it. Quote:
bamf /bamf/ 1. [from X-Men comics; originally "bampf"] interj. Notional sound made by a person or object teleporting in or out of the hearer's vicinity. Often used in virtual reality (esp. MUD) electronic fora when a character wishes to make a dramatic entrance or exit. 2. The sound of magical transformation, used in virtual reality fora like MUDs. 3. In MUD circles, "bamf" is also used to refer to the act by which a MUD server sends a special notification to the MUD client to switch its connection to another server ("I'll set up the old site to just bamf people over to our new location."). 4. Used by MUDders on occasion in a more general sense related to sense 3, to refer to directing someone to another location or resource ("A user was asking about some technobabble so I bamfed them to http://www.tuxedo.org/jargon/jargon.html.") Jornel: As to which code base it originated in, I'm not quite sure. But there are references that go quite a bit back to some of the first muds , in fact it was even a teleport command on a few muds. BAMF! Kaylus@Solice |
|
|
![]() |
| Thread Tools | |
How are directions (n, e, s, w) typically coded? - Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Future MUD directions | erdos | Advanced MUD Concepts | 28 | 07-04-2007 03:15 PM |
| Six Basic Directions | NotL337 | MUD Builders and Areas | 19 | 12-02-2006 02:53 PM |
| I Just Coded In Ruby! | Rykkan | Tavern of the Blue Hand | 2 | 03-14-2006 02:40 PM |
| RP and Coded Systems | Brody | Roleplaying and Storytelling | 11 | 06-04-2005 07:52 PM |
| Look at what I just coded! | Sapphar | Advanced MUD Concepts | 7 | 09-10-2002 05:26 AM |
|
|