OpenSpace 2.0 officially released

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

Moderators: Lapo, Bax

dorkbot
Posts: 7
Joined: 02 Feb 2010, 05:30
Location: Oakland, CA USA
Contact:

where do I enter my server's IP address?

Post by dorkbot »

in version 1 it's in the sfsClient.xml file, where do I change it for version 2?

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

Re: where do I enter my server's IP address?

Post by Bax »

dorkbot wrote:in version 1 it's in the sfsClient.xml file, where do I change it for version 2?
The subject you entered in your reply is not visible here; it was "where do I enter my server's IP address?".
This is not strictly related to OpenSpace, but to SmartFoxServer client configuration. Anyway you will find the same file in the config folder of the provided OpenSpace example.
Paolo Bax
The SmartFoxServer Team
dorkbot
Posts: 7
Joined: 02 Feb 2010, 05:30
Location: Oakland, CA USA
Contact:

Post by dorkbot »

I've downloaded the example again, and there is no sfsClient.xml in the config folder. How do I change the ip address? Or have you accidentally hardcoded it somewhere?

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

Post by Bax »

dorkbot wrote:I've downloaded the example again, and there is no sfsClient.xml in the config folder. How do I change the ip address? Or have you accidentally hardcoded it somewhere?
The file is in the Flex example. For the Flash example the IP is set in the SmartFoxBits' Connector properties.
Paolo Bax
The SmartFoxServer Team
ffourcad
Posts: 130
Joined: 25 Feb 2010, 10:26

Post by ffourcad »

Hello,

I was trying to use the OS2 b2 to load maps and avatars using Flash IDE.
Your example is working fine, but there is no avatar, so I decided to create mine. But I failed to load it. I made a swf, my avatar class extends the openspace Avatar class comprised in the AvatarLibrary, that I added to library. I created an applicationDomain that I used in the loader context, and in the avatarAppDomain.
When I call createMyAvatar, I have the followinf warning :
[WARNING] An error occurred while creating avatar '0': Invalid main avatar class definition for 'poncho' avatar type: class must extend Avatar
Everything seems right to me, my avatar class extends Avatar.
Can you help me on this ?

thanks in advance
User avatar
Bax
Site Admin
Posts: 4626
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Post by Bax »

When the avatars library SWF file is loaded inside a separate application domain (and then passed to OpenSpace 2 using the OpenSpace.avatarAppDomain property), that application domain must have its parent domain set to the current domain in which the code is executing.
In order to do this, use this code:

Code: Select all

var customAvatarAppDomain:ApplicationDomain = new ApplicationDomain(ApplicationDomain.currentDomain)
Paolo Bax
The SmartFoxServer Team
ffourcad
Posts: 130
Joined: 25 Feb 2010, 10:26

Post by ffourcad »

Thanks a lot, you solved my problem.
warhell
Posts: 199
Joined: 18 Aug 2007, 16:49
Location: Silicon Valley, CA
Contact:

Post by warhell »

Do you plan on implementing in-map rotation for items in the near future? e.g. being able to rotate an item (in edit mode) after selecting it without having to remove it.

I actually was able to implement this feature myself, though it took a ton of work and is quite hacky =/. Seems like it would be a very common request feature.
User avatar
Bax
Site Admin
Posts: 4626
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Post by Bax »

warhell wrote:Do you plan on implementing in-map rotation for items in the near future? e.g. being able to rotate an item (in edit mode) after selecting it without having to remove it.
No we don't. While rotation of items of type "tile" would be quite easy to achieve, rotation of supertiles can cause a lot of issues.
Paolo Bax
The SmartFoxServer Team
warhell
Posts: 199
Joined: 18 Aug 2007, 16:49
Location: Silicon Valley, CA
Contact:

Post by warhell »

Is there anyway to have tiles replace other tiles instead of just stack? Example, a project I'm working on contains tile items (floor tiles). I would like it such that if a user places a tile on top of another tile, the old tile is replace by the new tile, instead of having them stack.
User avatar
Bax
Site Admin
Posts: 4626
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Post by Bax »

warhell wrote:Is there anyway to have tiles replace other tiles instead of just stack? Example, a project I'm working on contains tile items (floor tiles). I would like it such that if a user places a tile on top of another tile, the old tile is replace by the new tile, instead of having them stack.
This is not possible. Can you better describe the reason behind this request, so we can evaluate it.
Paolo Bax
The SmartFoxServer Team
laxersaz
Posts: 50
Joined: 30 Nov 2009, 16:19
Contact:

Post by laxersaz »

Actually that would be a good idea. If tiles could be replaced (either manually or by api calls at runtime), there would be less memory consumption since no stacked tiles need to be saved.
By the way, i checked the objects in memory that are created by openspace 2 and it seems like every single tile on the map is an object of its own. Would it be possible to define a default tile for a map so openspace wouldn't have to keep references to thousands of tiles (e.g. walkable) that are exactly the same.
User avatar
Bax
Site Admin
Posts: 4626
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Post by Bax »

laxersaz wrote:Actually that would be a good idea. If tiles could be replaced (either manually or by api calls at runtime), there would be less memory consumption since no stacked tiles need to be saved.
The ability of replacing tiles can cause a number of issues: for example, what if the new tile has a different elevation? what if the removed tile had a stacked tile? what if the removed tile itself or the stacked tile was part of a supertile? Etc.
The Editor does something like this (to avoid wasting memory with useless tiles), but under strict conditions only (for example the removed tile must have no elevation and no skin, etc.).
In the Engine, map editing is supposed to add a limited number of tiles (usually furniture in the player's home), so the benefits due to this kind of optimization would be minimal.
laxersaz wrote:By the way, i checked the objects in memory that are created by openspace 2 and it seems like every single tile on the map is an object of its own. Would it be possible to define a default tile for a map so openspace wouldn't have to keep references to thousands of tiles (e.g. walkable) that are exactly the same.
You can't have 1 sprite in memory and instantiate it on the stage many times. So what you are asking is impossible in Flash.
Paolo Bax
The SmartFoxServer Team
laxersaz
Posts: 50
Joined: 30 Nov 2009, 16:19
Contact:

Post by laxersaz »

No I think you misunderstood my question. I was wondering if it was possible to define a default behavior for empty map tiles. Wouldn't it be better to have a default walkable map instead of having thousands of walkable tiles on the map?
User avatar
Bax
Site Admin
Posts: 4626
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Post by Bax »

laxersaz wrote:No I think you misunderstood my question. I was wondering if it was possible to define a default behavior for empty map tiles. Wouldn't it be better to have a default walkable map instead of having thousands of walkable tiles on the map?
No, it is not, otherwise OpenSpace would be a different product with a lot less features :)
Paolo Bax
The SmartFoxServer Team
Locked