[MUD-Dev] Spatial datastructures and their application (Was Re: Hilbert Curves)

Miroslav Silovic silovic at zesoi.fer.hr
Wed Nov 10 11:51:02 CET 1999


J C Lawrence <claw at cp.net> writes:

>   After trick #5:
>   #1[Shoehorn, 1, 2, 3, 4, rabbit2, rabbit3, rabbit5] -
>   #2[4, 5, 6, 7, rabbit1, rabbit3] -
>   #3[7, 8, 9, 10, 11, rabbit4] -
>   #4[11, 12]
> 
>   Character 7 starts attacking rabbit1.  Everyone in set #3 can see
>   the attack clearly.  The folks in set #3 can see that 7 is attacking
>   _something_.  Otherwise the room is too crowded for everyone to see
>   everything that is going on.
> 
>   Well, I've spent too much time on this message.  Some extensions
>   might deal with differently sized objects, or a clever method for
>   splitting up the neightborhoods.
> --<cut>--

Ummm. The size definitely matters. For example, if you were a human
with another human, in a room full of rabbits, you'd see the other
human attacking a rabit even with hundreds of rabbits - you're both
above the little critters.

I think sight should be resolved using raycasts, accelerated by
dynamically updated BSP or octrees. Any decent raytracer does
thousands of raycasts per second in scenes with much more than 100
objects (following Nathan's ideas, you'd just approximate rabbits with
spheres). All relevant algorithms can be found in Graphics Gems (guess
what I used for my raytracer :) )

--
How to eff the ineffable?



_______________________________________________
MUD-Dev maillist  -  MUD-Dev at kanga.nu
http://www.kanga.nu/lists/listinfo/mud-dev



More information about the mud-dev-archive mailing list