Need help in editing the map

Post here your questions about the OpenSpace 2.x or notify bugs and suggestions.

Moderators: Lapo, Bax

Madhav
Posts: 78
Joined: 27 Nov 2012, 04:41

Re: Need help in editing the map

Postby Madhav » 13 Aug 2013, 09:37

Thanx for the reply Bax,
Im sure im sending avatar to duplicated map becoz if i save the changes(leaveEditMode(true)) everything is fine, but when leaveEditMode(false) is executed it results in avatar joining the old room(i.e the room avatar was in b4 joining this room).
User avatar
Bax
Site Admin
Posts: 4337
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: Need help in editing the map

Postby Bax » 13 Aug 2013, 10:18

Can you please make a test? When you successfully update the map you receive the MAP_UPDATED event.
The event parameters contains a "room" parameter. Can you please trace it and check if it is referencing the correct Room? (so the one to which you sent the user and whose map was updated).
Thanks.
Paolo Bax
The SmartFoxServer Team
Madhav
Posts: 78
Joined: 27 Nov 2012, 04:41

Re: Need help in editing the map

Postby Madhav » 14 Aug 2013, 05:34

Hi Bax,
U were right, sorry for the wrong info :(
when a user avatar successfully updates the map the other users on the map are not getting the correct room in MAP_UPDATED event.

here's the server side log,
[OpenSpace] Map 'Home3#m0_Map_Anu' modified by user Anu [181]; now updating data
[OpenSpace] Map 'Home3#m0_Map_Anu' updated successfully; total time: 9ms
[OpenSpace] 'extensions/openspace/data/Home3#m0_Map_Anu.map' map file saved
[OpenSpace] Map 'Home3#m0_Map_Anu' update confirmation sent to user Anu [181] and reload event sent to other users in the same room
[OpenSpace] Map load request received from user Madhav [183]
[OpenSpace] Room with id 0 doesn't exist

Not getting how to proceed,,,, Plz help... :(
User avatar
Bax
Site Admin
Posts: 4337
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: Need help in editing the map

Postby Bax » 14 Aug 2013, 08:12

There might be a bug in the code.
We will need to make more tests on this. Unfortunately the summer holidays will make this take a little longer.
Let's get in touch again at the end of the first week of September. Sorry for the inconvenient.
As a temporary workaround you might try to simply reload the map instead of calling the leaveEditMode(false) method. Not sure if it works, but give it a try.
Paolo Bax
The SmartFoxServer Team
User avatar
Bax
Site Admin
Posts: 4337
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: Need help in editing the map

Postby Bax » 03 Sep 2013, 16:32

We are able to reproduce the issue with the avatar joining the wrong map when canceling the editing after the sendAvatarToMap server side method is used.
A fix is now being tested and we should be able to release a new version of OpenSpace within a couple of days.

About the other issue, users receiving the wrong room id in the MAP_UPDATED event, we are not able to reproduce it. Everything seems to work as expected.
Can you please list the exact steps you take with users A and B starting from the very beginning?
We would like to close this too before releasing the new version.
Paolo Bax
The SmartFoxServer Team
Madhav
Posts: 78
Joined: 27 Nov 2012, 04:41

Re: Need help in editing the map

Postby Madhav » 04 Sep 2013, 11:49

Here's the scenario,

1. user A connects to smartFox and joins a room(a openspace map).
2. user A clicks home icon on stage- a extension request is sent which duplicates a map, creates a dynamic room(as userA's_home) and sends user A's avatar to that map(user A's home) with user A as owner using sendAvatarToMap cmd.

3. Now the user B connects to smartFox and joins a room(a openspace map).
4.user B clicks a icon on stage- a extension request is sent which checks for room named " userA's_home " and sends user B's avatar to user A's home using sendAvatarToMap cmd.

5.Now both user A and user B are in same room with user A as owner.
6.user A edits the map by dragging a movieclip from inventory and saves by clicking done button on stage (everything works fine for user A).

7.user B gets MAP_UPDATED event. The code is,

Code: Select all

private function onMapUpdated(evt:OpenSpaceEvent):void
{
   trace("OpenSpace.MAP_UPDATED event received");
   trace(evt.params.mapLoadingParams);
   
   //openSpace.addEventListener(OpenSpaceEvent.MAP_RENDERED, onOpenSpaceMapRendered);
   //openSpace.loadMap(evt.params.mapLoadingParams)         
}


output for user B is,
OpenSpace.MAP_UPDATED event received
undefined



hope the scenario is clear...
User avatar
Bax
Site Admin
Posts: 4337
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: Need help in editing the map

Postby Bax » 04 Sep 2013, 13:00

Much more clear now.
First of all the mapLoadingParams parameter doesn't exist for the MAP_UPDATED event (check the ASDoc), so your code is wrong.
But even if you correct it, it still won't work because of the other issue you reported in this thread. The bug was corrected and we should be able to release the new version (which also brings the latest version of the AS3 API embedded) today or tomorrow.
Thank you for your help.
Paolo Bax
The SmartFoxServer Team
Madhav
Posts: 78
Joined: 27 Nov 2012, 04:41

Re: Need help in editing the map

Postby Madhav » 04 Sep 2013, 13:18

Thanks for your support Bax,
Happy that the bug is fixed.... :D

Waiting for new version.
I have the licensed version of OpenSpace, So how could I upgrade it with new version(after its release :) )
User avatar
frcol
Posts: 96
Joined: 22 Aug 2010, 09:26
Location: Brazil
Contact:

Re: Need help in editing the map

Postby frcol » 27 Oct 2014, 14:03

Each player will have their own .map ?

if I have 100000 users, the folder will have 100000 files?
Fabio Colombini
Brazil
User avatar
Bax
Site Admin
Posts: 4337
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: Need help in editing the map

Postby Bax » 27 Oct 2014, 15:47

frcol wrote:Each player will have their own .map ?
if I have 100000 users, the folder will have 100000 files?

Not sure what you are referring to. If you are talking about the user's home in a virtual world, the answer is yes. An the reason is simple: each user can customize the map in different ways, so each map must be saved separately.
Paolo Bax
The SmartFoxServer Team

Return to “OpenSpace v2 discussions and help”

Who is online

Users browsing this forum: No registered users and 6 guests