www.jpct.net

jPCT - a 3d engine for Java => Support => Topic started by: zammbi on September 12, 2008, 11:42:22 am

Title: Breaking maps into zones
Post by: zammbi on September 12, 2008, 11:42:22 am
I'm trying to figure out how to break up a map into zones for the server so it can work out when to send positions of players to another.
I need the map to be broken into equal squares on all maps. But since there is no kind of get width method of a world/object3D, how am I meant to do this?
Title: Re: Breaking maps into zones
Post by: EgonOlsen on September 12, 2008, 12:03:36 pm
You can get the bounding box from the mesh and calculate the width from that, but i don't know how this really helps you in sub-dividing a mesh!?
Title: Re: Breaking maps into zones
Post by: zammbi on September 12, 2008, 05:13:25 pm
Oh I see bounding box might be what I want.
Er don't need to do anything with the mesh.
Zones will just hold a list of names of people currently in them.

Also I could just use an arraylist and just create zones when needed. How do other people divide there map into zones?