Could you make a bot user? Something you can create on serverside that looks JUST LIKE a user, but isn't really a user. That way you could create bot users that show up in rooms and you can control on serverside. This would be HIGHLY useful for my program, and I'll be using an alternate means until something like this happens. I would SO love to see this!
P.S. It's not THAT hard, right Lapo?
Bots
- goodguy20k
- Posts: 71
- Joined: 10 Jan 2006, 23:58
- Location: Texas, USA
- Contact:
- goodguy20k
- Posts: 71
- Joined: 10 Jan 2006, 23:58
- Location: Texas, USA
- Contact:
If you mean totally severside, that's what I'm workin' on right now. But it would be so nice if I could do a _server.loginUser("bot"+randomId, null, null) type thing. Something that just automatically shows up in userlists and stuff. That would just be so nice... But unless you do this, I'll have to hard code it...
- goodguy20k
- Posts: 71
- Joined: 10 Jan 2006, 23:58
- Location: Texas, USA
- Contact:
Well my point was that as long as you want to code this properly you don't want to consider them users. Users are Clients. For a bot to work the same as your client you will need to write client code.
You can overide some of the SFS methods but... well... I don't know.
Users are identified by communications chanels. They represent a connection estabilished between the server and some swf.
This is how I would do it but maybe you are just trying to avoid writing extra code.
You can overide some of the SFS methods but... well... I don't know.
Users are identified by communications chanels. They represent a connection estabilished between the server and some swf.
This is how I would do it but maybe you are just trying to avoid writing extra code.
function onJoin(usr) {if (usr.getName() == "Lapo") trace ("All Hail Lapo");}
- goodguy20k
- Posts: 71
- Joined: 10 Jan 2006, 23:58
- Location: Texas, USA
- Contact:
Well, yes and no. (Correct me if I'm wrong, though.) Users are a data object. Yes, on serverside, it handles connection information, but clientside, you can't find it's IP, ping time, etc. For the most part, it is just a data object. Variables are stored in it, such as position, color, etc. It gets passed to everyone in the room.
Kind of. But I'm building my movement engine serverside. This is part of where I think a bot user type could be nice. My function takes in a user object, works with it, and by the end of the function, the user has been moved around, or is moving. Right now, I have to either write two seperate functions or seriously modify my code.
Also, thanks to the power of serverside, you can do MOST of the client code on serverside.
So you need a "bot" user type. The server code should be smart enough to spot a flag that says "I'm a bot" and not send data anywhere. Back to the, I just want to use the user as a data object.
You got it man! But the truth is, right now I have to write extra code because this ISN'T availible. But if I could find it useful now, who else could find it useful LATER?
For a bot to work the same as your client you will need to write client code.
Kind of. But I'm building my movement engine serverside. This is part of where I think a bot user type could be nice. My function takes in a user object, works with it, and by the end of the function, the user has been moved around, or is moving. Right now, I have to either write two seperate functions or seriously modify my code.
Also, thanks to the power of serverside, you can do MOST of the client code on serverside.
Users are identified by communications chanels. They represent a connection estabilished between the server and some swf.
So you need a "bot" user type. The server code should be smart enough to spot a flag that says "I'm a bot" and not send data anywhere. Back to the, I just want to use the user as a data object.
This is how I would do it but maybe you are just trying to avoid writing extra code.
You got it man! But the truth is, right now I have to write extra code because this ISN'T availible. But if I could find it useful now, who else could find it useful LATER?
Return to “Features Wish List”
Who is online
Users browsing this forum: No registered users and 21 guests