Some Ideas

Post here your suggestions for new possible features in SmartFoxServer.

Moderators: Lapo, Bax

Menser
Posts: 111
Joined: 13 Nov 2007, 18:32

Some Ideas

Postby Menser » 14 Nov 2007, 01:29

Hello all-

So Here is my wish list of features for Smart Fox.

Zone Variables: Pretty self explanatory, they are the same as user variables. But for a zone.

Actionscript imports: I would love to be able to import actionscript classes in the server side extensions.

Loading & Saving of Rooms / Zones: It would be nice to dynamically create rooms and zones from a server side extension, and have those zones saved and loaded the next time the server restarts.

Maybe have the zones configuration separate from the rest of the config file and have the server rewrite it.

Load / Save user variables: Would be nice to be able to set it so that a user can have their variables saved when disconnecting, and loaded when logging back in. Obviously you might not want to save all of a users variables, so there should be some sort of way to define which are saved and which parent.

Granted this could be done as an extension, but i think it is something that many people would find useful and might like.

Would be nice if room variables could be saved and loaded with the rooms as well (Tying into my last idea of course)




Im sure more will come to me.

_-Menser-_
flarb
Posts: 131
Joined: 15 Oct 2007, 21:07
Location: Home of the Body Bag
Contact:

Postby flarb » 14 Nov 2007, 18:36

I like all of these ideas! They don't seem like they'd be very hard to add either?
User avatar
JarochoCity
Posts: 180
Joined: 01 Dec 2005, 01:22
Location: Mexico
Contact:

I Agree

Postby JarochoCity » 14 Nov 2007, 19:18

I totally agree with you in this idea:

Loading & Saving of Rooms / Zones: It would be nice to dynamically create rooms and zones from a server side extension, and have those zones saved and loaded the next time the server restarts.


I hope they release that in the future. :D
ethereal
Posts: 54
Joined: 02 Nov 2005, 18:26
Location: netherlands

most off them already there

Postby ethereal » 15 Nov 2007, 13:39

Most off your wishlist is already implemented as far as you need.
use the DatabaseManager on the serverside.

Zone variales
Thats a cool on indeed.



loading and saving rooms and zones
in a database could be done with a startup room witch loads a extension, that loads the rest off your server configs.
Zones Rooms, variables and all you ever need.


Loading and saving off user variables are the same.
Just use the login en disconnect events serverside.
Flex, Smartfoxserver, red5. and Linux Why does microsoft still exist?
User avatar
Lapo
Site Admin
Posts: 23009
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 16 Nov 2007, 14:24

Thanks for the suggestions, a few comments:

Zone Variables
How should they work? I wouldn't recommend to use them the same way of the RoomVariables. A Zone can handle thousands of clients, if each variable modified has to be broadcasted to all users you would waste tons of bandwidth and server resources.

If you mean Zone variables as static properties, then any global variable in your Zone extension is already a Zone Variable

Actionscript imports:
I don't get it... you can already import actionscript code with the #include directive. Additionally you can import any other Java class.

loading and saving rooms and zones
This can already be done. You can create Zones on the fly and dynamically add rooms to it. Since this is a pretty advanced feature, and it's used very rarely there isn't enough documentation about it. We'll try to add more resources.

About storing them in a DB this can be easily done in your extension

Load / Save user variables:
As said before, you should use the DbManager in your extension to store those values. We don't think of implementing a generic mechanism because every application/game is different and it's difficult to cover all needs.

Keep ideas coming :D

Meanwhile check this too -> viewtopic.php?t=2071
Lapo
--
gotoAndPlay()
...addicted to flash games
Menser
Posts: 111
Joined: 13 Nov 2007, 18:32

Postby Menser » 16 Nov 2007, 16:32

Hey Lapo-


Thanks for responding.

I did not realize that you could do #include for actionscript, i kept trying to import (filename).

Im also looking forward to some documentation on dynamic creation of zones , glad to hear that is already in.

As for my other two suggestions, im about to leave for work and dont have enough time for a full reply, so when i get back later tonight, ill post a bit on those.

_-Menser-_
User avatar
Lapo
Site Admin
Posts: 23009
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 16 Nov 2007, 16:56

Basically creating a new Zone from code is as simple as this:

Actionscript:

Code: Select all

_server.instance.createZone("MyZone", "true")


Java:

Code: Select all

SmartFoxServer.getInstance().createZone("MyZone", "true")


where the 1st param is the zone name and the second is a flag that specifies if it uses a custom login. (the flag is a String not boolean)
Lapo

--

gotoAndPlay()

...addicted to flash games
User avatar
Lapo
Site Admin
Posts: 23009
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 16 Nov 2007, 16:57

I did not realize that you could do #include for actionscript, i kept trying to import (filename).

Import is only available in Actionscript 2, while we support AS 1 on the server side, so you should use #include, just like in Flash
Lapo

--

gotoAndPlay()

...addicted to flash games
ethereal
Posts: 54
Joined: 02 Nov 2005, 18:26
Location: netherlands

Postby ethereal » 18 Nov 2007, 13:24

Lapo wrote:Thanks for the suggestions, a few comments:

Zone Variables
How should they work? I wouldn't recommend to use them the same way of the RoomVariables. A Zone can handle thousands of clients, if each variable modified has to be broadcasted to all users you would waste tons of bandwidth and server resources.

If you mean Zone variables as static properties, then any global variable in your Zone extension is already a Zone Variable

Actionscript imports:
I don't get it... you can already import actionscript code with the #include directive. Additionally you can import any other Java class.

loading and saving rooms and zones
This can already be done. You can create Zones on the fly and dynamically add rooms to it. Since this is a pretty advanced feature, and it's used very rarely there isn't enough documentation about it. We'll try to add more resources.

About storing them in a DB this can be easily done in your extension

Load / Save user variables:
As said before, you should use the DbManager in your extension to store those values. We don't think of implementing a generic mechanism because every application/game is different and it's difficult to cover all needs.

Keep ideas coming :D

Meanwhile check this too -> viewtopic.php?t=2071


Zone Variables

You could use them several ways, as static startup. But my personal idea is that not something to give some time to implement. many other ways to accomplish that.

What would be handy is a way to set variables. Some are only neede serverside but GLOBAL.
Other vars are ALSO needed on the client side.

A Boolean that says.

Yes this var has to be send to the clients.
No This var does not updated to clients.

What really could be interesting for many here is a way to register users WITHOUT the need of using a hidden account serverside witch login registers a users logs out, and send the response back.

Immidiatly i feel one question coming. The fields are different everywhere.
This could be handled in config.xml
to make them statis.

something like this.

<Zone name="Zpne" emptyNames="false" uCountUpdate="false" buddyList="20" maxUsers="4000" customLogin="true" Register="true" roomListVars="true">

And in the Db section.

Code: Select all

<DatabaseManager active="true">
         <Driver>org.postgresql.Driver</Driver>
         <ConnectionString>jdbc:postgresql://localhost:5432/Zone</ConnectionString>
         <UserName>Anything</UserName>
         <Password>SomePass</Password>
         <TestSQL><![CDATA[SELECT * FROM members]]></TestSQL>
         <MaxActive>10</MaxActive>
         <MaxIdle>10</MaxIdle>
         <OnExhaustedPool>fail</OnExhaustedPool>
         <BlockTime>5000</BlockTime>
<register table="members">
        <Name Length="10">
        <Pass Length ="10">
        <Sex Boolean="true">
        <...........>
        <...........>
</register>
       
      </DatabaseManager>




Its not a great problem but i REFUSE to use anything else then Flex and SFS.

Just a blank apache server ONLY serving static html pages.
Flex, Smartfoxserver, red5. and Linux Why does microsoft still exist?
Menser
Posts: 111
Joined: 13 Nov 2007, 18:32

Postby Menser » 29 Nov 2007, 00:51

Heya-

SO i know its been awhile, but im ready to post my response, lol.


Ok, so to cover my other two Suggestions.

Saving of Dynamic Zones and Rooms:

The reasons i think this should be included in the server itself, and not something that people do themselves through a DB are Centralization, and Simplification.

To me I think its better to keep things centralized. If I am creating a new room or zone, that i want to pretty much want to exist forever, it doesn't make sense to me to store those rooms in a separate location simply because i didn't add them in by hand.

The next reason is that it just makes using the server simpler overall as a end user. You dont have to worry about editing rooms/zones in two different places, and you dont have to write the any code to interface with a database, heck you dont even need a database unless other things you are doing require it.

If you were going to do this, to me the easiest thing to do i would think would be to remove zones and rooms from the config.xml, and make a seperate zones.xml that contains the room and zones data. Seems like it would make it easier on you guys since you wouldn't have to parse off and rewrite the whole config.xml, just the new zones.xml

Saving Room/User vars
I dont have much to say about this, except it would be nice. It to me would be a great feature for a server to have, as it would potentially eliminate time i (the end user) would have to spend writing code.

Granted as you said you cant cover every situation, but i think with a few simple changes to the current variable system, you could cover MOST situations.

Fist i would add one, maybe two new parameters to the creation of new variables.
Save and Type.

Save is a boolean that determines if the variable should be saved or not.

Type is a variable that determines the type of data stored in the variable position. This one is optional, and would simly be used when saving and loading data to make sure it was pushed into the variable at load time as the right type (Strings get pushed in as string, Numbers get pushed in as numbers and not strings, etc). Granted the Type field wouldnt really be needed since you could simple just treat everything as a string, and make the user worry about knowing what they are dealing with and making sure to cast things properly.

Once again i just think it would be something that makes things easier and quicker for the end user.


Question on the dynamic creation of zones
Is it possible to specify a zone extension when creating a new zone? I would assume so since it allows you to specify if a custom login is used. But in the brief example you gave it didnt appear to have parameters specifying a zone extension.



Yup, question, comments, etc?

_-Menser-_

Return to “Features Wish List”

Who is online

Users browsing this forum: No registered users and 14 guests