Conception question

Hi,

I trying to do a multiplayer space game. Not a really a persistant game, but something similar.
So I got a galaxy, with multiple zone. A player can be in a zone, and there are some NPCs.
I got a server, to manage connexion, and I think it will manage also the AI, and the move of the NPCs. But to manage collision, I don’t know how to make. Must I render thoses NPCs, and all in the zone, to use collision utilities from Panda? But in this case, how to render multiple zone, to manage all the galaxie on the same time?

if you got some experience and good idea, I think it can help me.

thanks a lot

you could use (your own) spheres for collision - thats quite fast and you just need the positions of the ships plus their sizes.
but maybe you should think about totally different calculations for invsisble sectors as it makes no difference where ships are as long as noone sees them (same thing with quantum physics :wink: in real world)
here is a not running collision function which is quite fast

hit(ship1,ship2):
   if (ship1.positionVec-ship2.positionVec).lengthSquared() < ship1.radiusSquared + ship2.radiusSquared:
      return True
   return False

looks nice. But how to do with the rotation of the ships.
Actually Iwas using the lookAt function to determine how many I have to rotate the ships. But without nodepath, How can I do?

you can also use nodepaths not being children of render
eg one nodepath for each sector which is only reparented to render when visible. instead of to render you could reparent the sector-nodepaths to hidden or keep them as roots.