Top Mud Sites Forum Return to TopMudSites.com
Go Back   Top Mud Sites Forum > Mud Development and Administration > Advanced MUD Concepts
Click here to Register

Reply
 
Thread Tools
Old 07-09-2006, 12:40 AM   #1
John
Senior Member
 
Join Date: Aug 2002
Posts: 252
John is on a distinguished road
So how do you get rid of blind spots? An example is in a traditional mud you have 6 directions n, e, s, w, u, d. However With that you have four blind spots, which are
[code]
S = can see
B = blind spot so I can't see there.
P = Where the character is standing.
--------------
| B | S | B |
--------------
| S | P | S |
--------------
| B | S | B |
--------------
[/quote]That's easy fixed though, just add the directions ne, se, sw, nw so you can see in all of those blind spots. But let's say you want your player to be able to see 2 rooms away instead of just one, you then get more spots.
[code]
----------------------
| S | B | S | B | S |
----------------------
| B | S | S | S | B |
----------------------
| S | S | P | S | S |
----------------------
| B | S | S | S | B |
----------------------
| S | B | S | B | S |
----------------------
[/quote]Now if your character is on a deserted plains or something, there is no logical reason they can't turn in a full 360 degrees and see if someone is standing in any of those rooms. So how do you fix the problem of the PC not being able to see in those rooms? What code do you add?
John is offline   Reply With Quote
Old 07-09-2006, 05:02 AM   #2
KaVir
Legend
 
KaVir's Avatar
 
Join Date: Apr 2002
Name: Richard
Home MUD: God Wars II
Posts: 2,052
KaVir will become famous soon enoughKaVir will become famous soon enough
You'll have to fill in all the blind spots with something, otherwise you might end up with blanks where a room should be. Most muds that want a map like you describe will place their rooms on an x/y grid.
KaVir is offline   Reply With Quote
Old 07-09-2006, 01:14 PM   #3
Amnon
Member
 
Join Date: May 2002
Posts: 140
Amnon is on a distinguished road
If you're making your world room-based, you could have some problems: Main one is that rooms don't always point to where they logically should.

You could have five rooms, for example, that go:
Room A has an exit west leading to room B.
Room A has an exit north leading to room C.
Room B has an exit north leading to room D.
Room C has an exit west leading to room E.

So which room would you show as being northwest of you: room D or room E?

If your whole world is built in a way where this situation is not possible, then you'd have to set up an array (or list) of "view directions" similar to the exits (movement directions). Room A has a view west to room B, for example. Then, when someone looks inside room A, they see that room, and if that room has a view direction to room C, they'll also see that one... up to a certain range (Not a problem do to with a recursive function).

I don't think it'll work in a normal room-based world, and I agree with KaVir that you should consider an X/Y grid for that.
Amnon is offline   Reply With Quote
Old 07-24-2006, 01:21 AM   #4
durt
New Member
 
Join Date: Jul 2006
Posts: 2
durt is on a distinguished road
You can use additional cardinal directions such as north northwest (nnw), east southeast (ESE), etc. The result would be

[code]

----------------------------
| S | NNW | S | NNE | S |
----------------------------
| WNW | S | S | S | ENE |
----------------------------
| S | S | P | S | S |
---------------------------
| WSW| S | S | S | ESE |
----------------------------
| S | SSW | S | SSE | S |
----------------------------
[/quote]

and no blind spots.
durt is offline   Reply With Quote
Old 07-24-2006, 11:59 AM   #5
the_logos
Moderator
 
the_logos's Avatar
 
Join Date: Sep 2002
Location: Mill Valley, California
Posts: 2,299
the_logos will become famous soon enough
Adding more directions is just a temporary fix and leads, if you want to expand the radius-of-sight, to requiring directions like north north north north north northwest, etc.

In a typical grid system, each room is assumed to be the same size (vs in a typical node-based room system where the room size in the world fiction may vary dramatically from 1 room = a closet to one room = section of forest). So, assign an arbitrary unit to the length and width of each room (say, 1), and then simply calculate if a given room's center is within the radius of line-of-sight that you want to use.

Or, hell, cheat and just make it a 'square' radius if you want. That makes it even more trivial to check.

--matt
the_logos is offline   Reply With Quote
Reply


Thread Tools


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off

All times are GMT -4. The time now is 12:57 AM.


Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Style based on a design by Essilor
Copyright Top Mud Sites.com 2014