Page 2 of 4
where do I enter my server's IP address?
Posted: 12 Feb 2010, 19:48
by dorkbot
in version 1 it's in the sfsClient.xml file, where do I change it for version 2?
Thanks!
Re: where do I enter my server's IP address?
Posted: 13 Feb 2010, 08:04
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.
Posted: 15 Feb 2010, 18:59
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!
Posted: 15 Feb 2010, 19:38
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.
Posted: 25 Feb 2010, 10:42
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
Posted: 26 Feb 2010, 10:29
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)
Posted: 26 Feb 2010, 15:10
by ffourcad
Thanks a lot, you solved my problem.
Posted: 26 Feb 2010, 18:07
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.
Posted: 01 Mar 2010, 08:49
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.
Posted: 02 Mar 2010, 20:59
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.
Posted: 03 Mar 2010, 08:25
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.
Posted: 03 Mar 2010, 08:57
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.
Posted: 03 Mar 2010, 09:17
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.
Posted: 03 Mar 2010, 09:33
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?
Posted: 03 Mar 2010, 10:28
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
