Fog of waLL (hiding of enclosed areas) +anim

Thoughts on the further development of Haven & Hearth? Feel free to opine!

Re: Fog of waLL (hiding of enclosed areas) +pic

Postby theTrav » Thu May 13, 2010 6:03 am

Although the tiles give the appearance of a discrete system, I believe the objects are stored as more or less continuous...

You'd need to work out which objects are within the box and which are not, you'd need to do multiple boxes for every player, possibly many boxes for many fence tiles.

I'm not saying it isn't feasible, but it doesn't strike me as trivial either...
User avatar
theTrav
 
Posts: 3464
Joined: Fri May 29, 2009 11:25 pm

Re: Fog of waLL (hiding of enclosed areas) +pic

Postby Sever » Thu May 13, 2010 7:58 am

It would only really work for walls that are completely enclosed, as a partial wall or one that is completed using a ridge does not fit with this system (you can see down from the top of a ridge into the enclosure, resulting in line-of-sight calculations, bad)

Assuming the wall is a complete circuit -- meaning you have to avoid ridges entirely because they cannot be accounted for -- you can simply give all the tiles within the wall an enclosure ID or something akin which means that anyone standing on a tile with that ID can see inside that enclosure, and anyone outside (say, ID default #0) cannot see inside. It could, that way, be a one time calculation until the wall is altered. I have no idea how that would affect load, it could be better or worse. Further, an enclosure with more enclosures inside it would be more than a little problematic.

Up to this point, walls are square and complete circuits. Complex wall shapes, incomplete walls and debatable blocking objects only drive the system further into uncertain logic which would probably fail more than work.
Come back two hours earlier.
User avatar
Sever
 
Posts: 723
Joined: Fri Aug 28, 2009 8:38 pm
Location: Elsewhere

Re: Fog of waLL (hiding of enclosed areas) +pic

Postby Sidran » Thu May 13, 2010 8:06 pm

First, I made a small gif illustration:

Image


TheTrav and Sever, I am thankful for your constructive critique and assessment.
My system would not allow hiding of areas enclosed partly with ridges.
I illustrated only one way to implement this. Of course it depends on how currently tiles get addressed and how system works. I believe that we could find a solution in any case.

Does it all sound simpler now? Arent benefits obvious?
User avatar
Sidran
 
Posts: 101
Joined: Wed Mar 17, 2010 2:41 am

Re: Fog of waLL (hiding of enclosed areas) +anim

Postby theTrav » Fri May 14, 2010 4:52 am

Nice pic Sidran, I get it, if the world were stored as a big grid and objects existed in that grid it would work.

Unfortunately I do not believe that to be the case (this is an assumption I make based on the data the client gets)

Only the ground is a grid, everything else in the world is just an object with a position.

I doubt there is a trivial way of saying "get me all the objects within this set of tiles". It could probably be done, but I imagine it would come with a hefty computational cost, especially if it's done frequently.


Another issue that just occurred to me now, is that if you have someone opening and closing the gate frequently to an enclosure with lots of stuff in it, there would be a large amount of data that had to be sent to the client, I can see some odd popup effects happening in that case as objects are sent individually, not in single bundles.
User avatar
theTrav
 
Posts: 3464
Joined: Fri May 29, 2009 11:25 pm

Re: Fog of waLL (hiding of enclosed areas) +anim

Postby theTrav » Fri May 14, 2010 4:58 am

Actually, Loftar is really the one to say whether it's computationally expensive or not...

He obviously already has some sort of "get me all the objects that are close enough for me to see" algorithm.

So he'd need to implement something to turn those enclosures into arbitrary shapes/polygons, and then he'd basically need to cull any of those objects that collide with/fit within those arbitrary shapes/polygons.

It basically adds another lot of collision detection every time the server thinks about sending the player object data...


Separate from technical considerations, do we really WANT to hide what's behind walls? I kind of like looking into other peoples gardens/towns etc, also seeing what is outside my little fort
User avatar
theTrav
 
Posts: 3464
Joined: Fri May 29, 2009 11:25 pm

Re: Fog of waLL (hiding of enclosed areas) +anim

Postby Sidran » Fri May 14, 2010 5:04 pm

theTrav wrote:Nice pic Sidran, I get it, if the world were stored as a big grid and objects existed in that grid it would work.

Unfortunately I do not believe that to be the case (this is an assumption I make based on the data the client gets)

Only the ground is a grid, everything else in the world is just an object with a position.

I doubt there is a trivial way of saying "get me all the objects within this set of tiles". It could probably be done, but I imagine it would come with a hefty computational cost, especially if it's done frequently.


Another issue that just occurred to me now, is that if you have someone opening and closing the gate frequently to an enclosure with lots of stuff in it, there would be a large amount of data that had to be sent to the client, I can see some odd popup effects happening in that case as objects are sent individually, not in single bundles.


Thanks. I fully agree that it depends on actual implementation. Its up to Loftar to say if its feasible or not.

theTrav wrote:Actually, Loftar is really the one to say whether it's computationally expensive or not...


Thats beyond agreeing. Loftar is tech papa of H&H. Knowing that he previously replied to this thread without fully understanding what I meant, it would be interesting to see some feedback at this stage.

theTrav wrote:Separate from technical considerations, do we really WANT to hide what's behind walls? I kind of like looking into other peoples gardens/towns etc, also seeing what is outside my little fort


No. Permanent hiding would be gameplay choke bit time. Thats why I proposed watchtowers which would allow disabling of hidden areas for those players inside them. They should be easy to construct and even easier to destroy. But do need some effort. Player exiting his/her palisade could first check in watchtower if there is anyone outside, or risk being ambushed in front of gate. Many other interesting situations come to mind: Village is expecting raiders. Villagers visit watchtower in shifts in order to see approaching enemies and prepare themselves (or maybe surprise attackers in a way). Attackers, depending on their power and intentions, would need to build another watchtower nearby to see what is happening inside. Archery would naturally be blocked and useless without watchtowers (around enclosed walls)....
User avatar
Sidran
 
Posts: 101
Joined: Wed Mar 17, 2010 2:41 am

Re: Fog of waLL (hiding of enclosed areas) +anim

Postby Blxz » Sat May 15, 2010 5:35 am

theTrav wrote:Separate from technical considerations, do we really WANT to hide what's behind walls? I kind of like looking into other peoples gardens/towns etc, also seeing what is outside my little fort


I agree with this. I don't want it. Its just an extra hassle to have to check in a watchtower before going out my gate.
User avatar
Blxz
 
Posts: 421
Joined: Mon Apr 05, 2010 12:03 pm

Previous

Return to Critique & Ideas

Who is online

Users browsing this forum: No registered users and 30 guests