Pretend there is no such thing as "not being in an area" or "being in two areas at once" so there is no concept such as a "door way". The door way would be part of the area. Also forget about the confusion, "which area does the door way belong to" and trust that I have a design method that will work around that. Not being in an area would just result in seeing nothing at all.
This is for multiplayer. If I'm in an area 1x1 next to you, and you're in a different area next to me also 1x1, I can't see you, you can't see me.
1
2
if theres no thin wall between the 2 of u, it hardly makes sense to me why their 2 different areas, especially if you walk and suddenly a lot more is visible...
The best I can tell you is...make them all teleport everywhere linking the oddly shaped areas however you want, and define them as much as you want, because what your saying makes no sense to me... We've tried to help you, gave you many suggestions, at this point, i'd suggest you look through them, choose the best, and create whatever it's your working on & not wasting time on us to figure out this apparent odd game of yours. |
I don't think there's a way to do it in the current state of BYOND.
If I were writing this game in Java, I'd just have the server keep track of which clients can see which tiles. Unfortunately, byond's solution for this is is a number system that allows you to see anything below the setting, and only goes up to 101. |
In response to Xooxer
|
|
Xooxer wrote:
What's wrong with images? It would require thousands of images, and they'd have to be able to move / animate. |
Images do have movement states & animate as well as they link to objects that already move...
Anyways, if you use it in Move() procs you only need to mess with objects in range. Generally you'd want to use override & set a blank image() for stuff not in the right view... I have tested it, it works quickly in this manner as well, so the effect isn't noticed even. |
That's an interesting way to look at it... black out areas not visible. Considering most screen space will probably be visible to the person occupying the room, this makes a lot of sense because the bandwidth won't be too bad, just extra cycles for the server to keep track of it (which would need to take place anyways).
Cool! |
If I'm not mistaken, when applied to an area, only one image needs to be used. Have you looked at Shadowdarke's roof lib? I can pretty much assure you, you won't find a more elegant solution anywhere else.
|
I'll have to take a second look at it. I got discouraged at the idea of bandwidth and speed being an issue when doing this in mass quantities and too many unique areas (every single space in the game would have its own unique area, and every unique area would require its own visibility.) But I suppose I haven't given it a chance by not testing it yet.
|
Try my Stealth Library. I've made a demo just for you.
Take note that for areas on the map, all squares with the same area type belong to the same instance of the area. This means that every /area/type1 you place on the map is a single instance of /area/type1. Here's a tip! Refer to the image below There are 16 area types, each one having a different color. I have placed them in such a way that wherever the view goes, no rooms with the same area will be visible to the client's screen. This suggests that with a client view of 6x6, I can map any size of world with just 16 area instances with the condition that each room have a minimum size of 2x2 tiles. For a 20x20 view, the worst case scenario is to have 121 unique area instances. (Assuming that you won't have a room smaller than 2x2) |
In response to Jemai1
|
|
Jemai1 wrote:
Try my Stealth Library. I've made a demo just for you. This is exactly what I was trying to do. Now I've gotta dig in and see what's going on behind the scenes here! There would probably never be more than 2 area's or rooms on the screen at once. The idea was to cut off sections of the map that weren't active or relevant to certain players (like tile by tile instancing, for example). It looks like you nailed the implementation but I'll have to have a look to double check! Thanks again for showing me this. =D |
1
2
And how do you want to handle being in the doorway itself? See both areas at once?