About Store Forum Documentation Contact



Post Reply 
Multiple worlds
Author Message
Rofar Offline
Member

Post: #1
Multiple worlds
I have been attempting to implement managing multiple worlds and teleporting the player to a new location within the current world and I'm having an issue that I am unable to solve. In order to easily reproduce the problem, I made a simple modification to the multiple worlds tutorial that will demonstrate the problem.

The problem occurs when trying to insert the player into the world at a location that is far from the previous center of action. To reproduce this in the tutorial, I simply extended the terrain in the -x direction until I had it extended to around x = -200 world position. Then I commented out the saving and loading of the world in the ChangeWorld method because I just wanted to move the player in the current world. The on objInject, I supplied a positon of -200,2,10. When I do this, the player never updates in the new position.

I have tried many different ideas to get this to work. I have also tried the above example by modifying both Teleport worlds the same way and actually allow it to load the new world and try to insert the player at those same coordinates in the new world.

As long as I insert the player in a close range near the current center of action, it works fine. Any suggestions how to get this to work?
02-06-2010 04:13 PM
Find all posts by this user Quote this message in a reply
Myx Offline
Member

Post: #2
RE: Multiple worlds
It sounds to me like you're placing your player in an inactive area.

If that's the case I suppose you could try changing the code in Update() a bit to update depending on your player's position instead of the point where the camera's looking .

Code:
if(Players.elms())
      Game::World.update(Players[0].pos());
else
      Game::World.update(Cam.at);

Like so.
02-06-2010 05:10 PM
Find all posts by this user Quote this message in a reply
Rofar Offline
Member

Post: #3
RE: Multiple worlds
Thanks for the suggestion. I have tried to do just that with no success.
02-06-2010 06:43 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #4
RE: Multiple worlds
this is ok
Code:
if(Players.elms())
      Game::World.update(Players[0].pos());
else
      Game::World.update(Cam.at);

but you need first to set the camera to the desired position where the player should be located
02-07-2010 10:03 PM
Find all posts by this user Quote this message in a reply
Rofar Offline
Member

Post: #5
RE: Multiple worlds
I have tried this again and still the player object memory container never gets a player added it to it after attempting to inject the player into the world. You should be able to easily reproduce my attempt from the description above where I tested this with the Multiple Worlds tutorial.
02-08-2010 11:55 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #6
RE: Multiple worlds
I'm checking this
02-09-2010 12:40 AM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #7
RE: Multiple worlds
there was a bug, I'll upload the fixed version in few minutes.
02-09-2010 12:59 AM
Find all posts by this user Quote this message in a reply
Rofar Offline
Member

Post: #8
RE: Multiple worlds
Thanks smile
02-09-2010 02:03 AM
Find all posts by this user Quote this message in a reply
Post Reply