Author Topic: Breaking maps into zones  (Read 3757 times)

Offline zammbi

  • float
  • ****
  • Posts: 361
    • View Profile
Breaking maps into zones
« 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?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Breaking maps into zones
« Reply #1 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!?
« Last Edit: September 12, 2008, 12:39:24 pm by EgonOlsen »

Offline zammbi

  • float
  • ****
  • Posts: 361
    • View Profile
Re: Breaking maps into zones
« Reply #2 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?