-
Software idea response
Hi.
I have developed a (free) Windows software which allow you to create "server engines" with just actionscript programming on your internet-connected computer.
Communication is done by simple functions for client connect/disconnect/groups and broadcasting etc and you send over 'whole' objects (compact no XML) without worrying about the format beneath. Fast development in other words. With the package its included source for chat, avatarchat, whiteboard and a 1vs1-game.
Actionscript is not the most efficient language but with computer of today it perform quite well and users often have room for 10-30mb without problem.
Is it great or not unique at all..?
/Tomas
-
Examples?
I think this is in the wrong forum
-
1 Attachment(s)
The result is just what your doing of it, and the demos is just the regular look, but its more the concept.
For example this is the code of writing a chat with multiple rooms, at server side, which I think is quite few lines:
Code:
#include "FlashServer.as"
var users; // ordered list of users
var lookupUser; // lookup user by userID
var count;
var server = new FlashServer('fbchat', 'secret', true);
server.onClientConnect = function(userID, ip) {
status.text = "Clients: " + ++count;
users.push(lookupUser[userID] = { userID: userID, ip: ip, groupID: -1 });
}
server.onClientClose = function(userID) {
status.text = "Clients: " + --count;
// Notice users in room
server.sendGroup(lookupUser[userID].groupID, { action: "delete", userID: userID });
// Remove you from list of users
for(var c = users.length - 1; c >= 0; c--) {
if (users[c].userID == userID) {
users.splice(c, 1);
break;
}
}
delete lookupUser[userID]; // Delete lookup
}
server.onClientData = function(userID, obj) {
if (obj.action == 'msg') { // { action: "msg", msg: <msg> }
server.sendGroup(
lookupUser[userID].groupID,
{ action: 'msg', msg: lookupUser[userID].name + "> " + obj.msg }
);
}
if (obj.action == 'login') { // { action: "login", name: <name> }
lookupUser[userID].name = obj.name;
}
if (obj.action == 'enter') { // { action: "enter", groupID: <groupID> }
server.setUserGroup(userID, obj.groupID); // Set room
if (lookupUser[userID].groupID != -1) // Notice previous room users
server.sendGroup(lookupUser[userID].groupID, { action: "delete", userID: userID });
for(var c = 0; c < users.length; c++) { // Retrieve list of users
if (users[c].groupID == obj.groupID)
server.sendClient(
userID,
{ action: "add", userID: users[c].userID, name: users[c].name, ip: users[c].ip }
);
}
lookupUser[userID].groupID = obj.groupID; // Set your new room
// Notice all
server.sendGroup(obj.groupID, { action: "add", userID: userID, name: lookupUser[userID].name, ip: lookupUser[userID].ip });
}
}
server.onConnect = function(success) {
if (!success) { server.onClose(); return; }
disconnectButton.enabled = true;
users = [ ];
user = { };
count = 0;
status.text = "Clients: 0";
}
server.onClose = function() {
connectButton.enabled = true;
disconnectButton.enabled = false;
status.text = "Disconnected";
}
function connect() {
connectButton.enabled = false;
server.connect('localhost', port.text);
}
function disconnect() {
server.close();
server.onClose();
}
disconnectButton.enabled = false;
-
hi, can we see whats going on in FlashServer.as? This looks quite interesting. Is the xml based on SOAP or compatible with SOAP? Is this open-source by any chance?
What is the idea behind "server apps" (looking at the screen shot). Is this just a relaying server or is there an active way to dynamically (eg. by script or loading of additional .dll's) contol/manipulate communication server-side.
lots of questions there :p
-
flashserver.as is just including the socket and some minor control characters for my application, so the programmer can concentrate on the clean API.
Its handles TCP/IP-sockets, the reasons why I'm not using XML as base format is that I think its unnecessary overhead, though I thought it was ok to serialize the objects with some extra characters for easy using. Shortly the server-flash-apps is your server flash code.
The real logic you doing yourself in the actionscript. The application was built for all needs that you can't do in Flash or for speed. Maybe there can be some extensions to the software but it was not the base thing.
And finally about the open-source... is it "evil" in this world to not have it? Its healthy for many things but one thing that I think is that people needs often advanced knowledge when dealing with most of "free softwares" out there. And my point of view, make it easy for people, but of course with enough freedom.
-
is it in the same frequency as other game server? for example: www.electrotank.com/electroserver
-
What do you mean by frequency as other game server?
Actually I hadn't read about version 3 in detail before and saw they had some equally features. Though I had no plans of limit it in some way like connections.
My key things was free, small, easy to run with Macromedia environment and good examples of applications. Maybe a "pro" version but no limits really in base software.
Shouldn't it still be some need or interest for my kind of software?
-
sorry, i mean isn't it similar with electrotank.
-
Yes, except that my download take 200-300kb instead of 22MB and is more userfriendly GUI in general than their DOS-boxes.
I believe in simplicity, all people are not used to complex configurations, installations and programming models.
Just wanted to see the response, but I guess its easier if I show something visible for people to understand it better.
-
I personally think that this is rather cool. I see how you could facilitate other webservices, but at this moment my questions involve what ports do you need, are those ports configurable, and can you incorporate Base64 encoding to send multi-part MIME attachements via SOAP?
I have some other questions, but I seriously think that this did not get the attention it deserves due to it being posted in the Coffee Lounge instead of the more pertinent Flash Help or Scripting and Backend forums where they chat less, but seem to talk a bit more technical.
I personally like the, from what I see as possibilities.