Newbie

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

Moderators: Lapo, Bax

Post Reply
gates
Posts: 15
Joined: 15 Dec 2010, 19:48

Newbie

Post by gates »

I am trying to learn on how to use open space as a beginner.
But don't see any how-to, which can help me as a beginner to openspace.

Can anyone please help me, because the support + documentation of openspace engine is really of no help to me. I am unable to understand as in how to start using openaspace with flash or flex.

The provided example in and with openspace trial is a compiled jar file, which is not much of help either.

Regards-
User avatar
Bax
Site Admin
Posts: 4626
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Post by Bax »

Simply refer to the examples. Import the Flex example project in Flex/Flash Builder, and give a look at the code. It is fully commented.
The jar file is the extension you need to install on the server-side, you don't need to see its code.
Paolo Bax
The SmartFoxServer Team
gates
Posts: 15
Joined: 15 Dec 2010, 19:48

Post by gates »

yes. I have already done that. But I need the source code of JAVA as well to study. And a step-by-step how to for beginners will be good like they have for SmartFox2.

I am also facing problems on how to use the open space editor? how does that work?
User avatar
Bax
Site Admin
Posts: 4626
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Post by Bax »

The source code of the server-side extension of OpenSpace is not available because you wouldn't need it. You can only extend the OpenSpace extension to add your own logic, following the tutorials on the OpenSpace support page (you will also find the source code of an extension).
About the Editor, the full manual is available here. What is not clear in how it works?
Paolo Bax
The SmartFoxServer Team
gates
Posts: 15
Joined: 15 Dec 2010, 19:48

Post by gates »

Thank you for the help bax

but now I m stuck in a new problem

i load map on client side using command

Code: Select all

openSpace.loadMap(room);
and on the server side i have written to print all the request it is suppose to recieve

Code: Select all

        String cmd = params.getUtfString(SFSExtension.MULTIHANDLER_REQUEST_ID);
        Gates ext = (Gates) this.getParentExtension();
        try{
            trace(cmd + " = command sent by user");
            trace(ext + " = extension sent made by class");
        }catch(Exception e){
            e.printStackTrace();
            trace("error occured");
        }
i dont see anything being executed, neither does it execute any of the following event listeners on client side

Code: Select all

		private function onMapFailure(evnt:OpenSpaceEvent):void{
			this.main.txtTrace.text = "map failure";
		}
		private function onMapLoaded(evnt:OpenSpaceEvent):void{
			this.main.txtTrace.text = "map loaded";
			loadMapAssets(evnt.params.skinSwfFiles, evnt.params.backgroundSwfFiles);
			//this.openSpace.renderMap();
		}
		private function onMapError(evnt:OpenSpaceEvent):void{
			this.main.txtTrace.text = "not loaded";
		}
		private function onMapRendered(evnt:OpenSpaceEvent):void{
			this.main.txtTrace.text = "rendered";
		}
		private function onMapCreationProgress(evnt:OpenSpaceEvent):void{
			this.main.txtTrace.text = "creating";
		}
		
please guide me...
gates
Posts: 15
Joined: 15 Dec 2010, 19:48

Post by gates »

OK!!

I tired this

1. i created a button to trigger load map extension after openspace was initialized.

2. when i click on the button... this is the error i get

Code: Select all

0090 - OpenSpace Extension is unable to load the map: No map associated with Room 'RoomName' [1]
this is my room schema

Code: Select all

<room>
      <name>RoomName</name>
      <groupId>default</groupId>
      <password></password>
      <maxUsers>100</maxUsers>
      <maxSpectators>10</maxSpectators>
      <isDynamic>false</isDynamic>
      <isGame>false</isGame>
      <isHidden>false</isHidden>
      <autoRemoveMode>DEFAULT</autoRemoveMode>
      <permissions>
        <flags>PUBLIC_MESSAGES</flags>
        <maxRoomVariablesAllowed>10</maxRoomVariablesAllowed>
      </permissions>
      <events>USER_ENTER_EVENT,USER_EXIT_EVENT,USER_COUNT_CHANGE_EVENT,USER_VARIABLES_UPDATE_EVENT</events>
      <badWordsFilter isActive="false"/>
      <roomVariables>
        <variable>
          <name>south_city_01</name>
          <value>room_name#m0_South_city_01</value>
          <type>STRING</type>
          <isPrivate>false</isPrivate>
          <isPersistent>false</isPersistent>
          <isGlobal>false</isGlobal>
          <isHidden>false</isHidden>
        </variable>
      </roomVariables>
      <extension>
        <name></name>
        <type>JAVA</type>
        <file></file>
        <propertiesFile></propertiesFile>
        <reloadMode>AUTO</reloadMode>
      </extension>
    </room>
can you please help... why is the map not loading?

.map, .inv, .lib all files exists in the folder :(
User avatar
Bax
Site Admin
Posts: 4626
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Post by Bax »

The value of the room variable associated with the room in your configuration is room_name#m0_South_city_01, so the expected map filename is room_name#m0_South_city_01.map.
Paolo Bax
The SmartFoxServer Team
Post Reply