Map isn't shown

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

Moderators: Lapo, Bax

frette59
Posts: 3
Joined: 22 Sep 2010, 14:14

Map isn't shown

Postby frette59 » 22 Sep 2010, 14:22

hello

I am currently testing your engine.

I created a map in the editor. When I try to show thanks to the example provided (by just changing "osExample1" in main.as) this one is blank.

Yet I am connected to the room, and I have no error message.

Can you tell me where I have erred?
User avatar
Bax
Site Admin
Posts: 4522
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Postby Bax » 24 Sep 2010, 11:36

Quite difficult to help, very few details.
What about the client side shown in the trace console?
Is the map received by the client? Maybe the map is rendered, but OpenSpace simply isn't able to find the skins.
Please show the server side log portion where the map request is received and the map is sent to the client. Then show the client log, from map request to map rendering.
Paolo Bax
The SmartFoxServer Team
frette59
Posts: 3
Joined: 22 Sep 2010, 14:14

Postby frette59 » 04 Oct 2010, 11:35

Hi,

Log from the server side :
14:07:00.594 - [ INFO ] > [OpenSpace] Map load request received from user kok [0]
14:07:00.595 - [ INFO ] > [OpenSpace] Joining user kok [0] to Room 'Test' [42]
14:07:00.596 - [ INFO ] > [OpenSpace] Room 'Test' [42] joined; now loading associated map 'test#m0_Map
14:07:00.597 - [ INFO ] > [OpenSpace] Loading assets library for map 'test#m0_Map'
14:07:00.626 - [ INFO ] > [OpenSpace] 'openSpace/data/test.lib' library file loaded
14:07:00.659 - [ INFO ] > [OpenSpace] 'openSpace/data/test#m0_Map.map' map file loaded
14:07:00.721 - [ INFO ] > [OpenSpace] Map 'test#m0_Map' sent to user kok [0]



Log from the client side :
Avatars external library loaded
Go button clicked; Connector will now load SmartFoxClient configuration and connect to SmartFoxServer
Connection successful, now performing login
Successfully logged in as kok
Roomlist received, now a map can be loaded
[INFO] Configuration loaded: config/OpenSpace_client.xml
[INFO] Requesting initialization data to OpenSpace Extension
[INFO] Initialization data received from OpenSpace Extension
[INFO] Initialization completed
OpenSpaceEvent.INITIALIZED event received
[INFO] Requesting map to OpenSpace Extension
[INFO] Map received from OpenSpace Extension
[INFO] Map parsing completed (3 ms)
Map loaded, now assets swf files can be loaded
External swf files to be loaded: Sans nom-1.swf,Sans nom-2.swf
External libraries loaded, now the loaded map can be rendered
[INFO] Tiles creation progress: 100%
Map generation progress: 100%
[INFO] Map generation completed (9 ms)
[INFO] Avatar '0' created in (0,0,0)
[INFO] Avatars creation completed
[INFO] Map rendering completed
OpenSpace.MAP_RENDERED event received
User avatar
Bax
Site Admin
Posts: 4522
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Postby Bax » 04 Oct 2010, 20:27

Are you loading external SWF files called like this??

Code: Select all

External swf files to be loaded: Sans nom-1.swf,Sans nom-2.swf
Paolo Bax
The SmartFoxServer Team
frette59
Posts: 3
Joined: 22 Sep 2010, 14:14

Postby frette59 » 05 Oct 2010, 06:57

Yes !

These files are in my "localhost" and I have change the setting in the main.as
User avatar
Bax
Site Admin
Posts: 4522
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Postby Bax » 05 Oct 2010, 07:41

What if, after loading those swf files, you try to create an instance of one of the skins manually, using the getDefinitionByName method? Are you able to create the display object and add it to the stage?
Paolo Bax
The SmartFoxServer Team
gl0om
Posts: 54
Joined: 30 Mar 2010, 17:39

Postby gl0om » 05 Oct 2010, 07:55

I've got the same issue with the same logs.
Everything seems to be fine, but occasionly map doesn't shown after render event. But! But after resizing the map it appears, so avatar can walk on it, edit it etc.
I noticed that I meet such issue only on the first time, when client tries to load the map, next attempts to load the map during the session are comes without problems. But after reloading the client I can meet this issue again, or maybe not to meet...
User avatar
Bax
Site Admin
Posts: 4522
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Postby Bax » 08 Oct 2010, 13:59

If it happens occasionally, it might be an issue with the viewport size. Has it the exact same size of the map? If yes, try making it 1 pixel smaller.
Paolo Bax
The SmartFoxServer Team
whornak
Posts: 86
Joined: 22 Sep 2009, 11:05

Postby whornak » 19 Oct 2010, 22:25

Having similar and intermitent issues but tried to find this viewpoint size to see its effect on my issues and am not able to.

Can you tell where this setting is?
User avatar
Bax
Site Admin
Posts: 4522
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Postby Bax » 20 Oct 2010, 09:50

whornak wrote:Having similar and intermitent issues but tried to find this viewpoint size to see its effect on my issues and am not able to.
Can you tell where this setting is?

The viewport size is given by the width and height properties of the OpenSpace component on the stage.
Paolo Bax
The SmartFoxServer Team
li_ramen07
Posts: 34
Joined: 16 Feb 2011, 06:01
Location: Philippines

Postby li_ramen07 » 29 Mar 2011, 02:22

I am having the same problem. The map background doesn't show on first load. All other map assets/skins, including the avatar, are displayed though. After hitting the refresh button once or twice, the background gets shown.

viewport size: 800 x 600;
map background: 2400 x 1200;

Is this issue related to having a large map or something?
Li Ramen


on sleepless roads the sleepless go
User avatar
Bax
Site Admin
Posts: 4522
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Postby Bax » 29 Mar 2011, 06:15

Do you use a single 2400x1200 image as a background?
If yes you should probably split it into smaller parts.
Paolo Bax
The SmartFoxServer Team
li_ramen07
Posts: 34
Joined: 16 Feb 2011, 06:01
Location: Philippines

Postby li_ramen07 » 29 Mar 2011, 06:25

bax wrote:Do you use a single 2400x1200 image as a background?
If yes you should probably split it into smaller parts.


No. I had it split into several parts, with each one having a size of 800x600.
Li Ramen





on sleepless roads the sleepless go
User avatar
Bax
Site Admin
Posts: 4522
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Postby Bax » 29 Mar 2011, 09:15

Are you sure you wait for you game to complete the loading of the swf containing the background parts?
Paolo Bax
The SmartFoxServer Team
li_ramen07
Posts: 34
Joined: 16 Feb 2011, 06:01
Location: Philippines

Postby li_ramen07 » 29 Mar 2011, 09:49

Yes, the SWF files are completely loaded before calling the openspace renderMap() method.
Li Ramen





on sleepless roads the sleepless go

Return to “OpenSpace v2 discussions and help”

Who is online

Users browsing this forum: No registered users and 1 guest