Networked Chat experiment
in OpenSesame
Hey all,
I am trying to build an experiment for simple chat between 2 participants.
One can be the server and other can be the client. I found some samples for OpenSesame 2 but couldn`t find enough data for version 3.2.
Are there any other person who made a similar experiment?
Regards
Comments
Creating an experiment like that is possible, but how easy it is depends on the details. What *exactly* do you want to do? How should participants interact? And does the experiment consist only of chatting, or is this embedded in other tasks?
Cheers!
Sebastiaan
There's much bigger issues in the world, I know. But I first have to take care of the world I know.
cogsci.nl/smathot
Hi Sebastiaan,
Thanks for the reply, actually it will be part of a larger experiment and connecting two users from separate computers will be part of the task.
Two users, will try to complete tasks by cooperating with each other. They will be shown different inputs (images, videos or texts).
They will communicate with each other by sending messages and try to find the answer.
Is it a bit more clear? I can give more details.
Regards,
NB
Hi Newbee,
This sounds like a fairly complicated experiment. Doable, but not trivial at all. Given that you don't seem very experienced in coding, I doubt that you'll be able to implement this, not without a large amount of help (more than you'll likely get on the forum). I may be wrong, but that's the feeling I'm getting.
So how experienced are you, and do you think you'll be able to manage an experiment that will require a considerable amount of Python coding?
Cheers,
Sebastiaan
There's much bigger issues in the world, I know. But I first have to take care of the world I know.
cogsci.nl/smathot
Hello Sebastiaan,
I am not very experienced on coding, but I found some walkaround and simplified the experiment.
A separate application will be used for chat and Opensesame will get input from only one user, which makes things a lot easier. I will work on it and ask for support for any obstacles I met.
Regards,
NB
Hello again Sebastiaan,
For last couple of days, I tried again to make this experiment work with client and server.
Now, server and client can make a connection, but they continuously send messages.
What I want is, when server sends a specific message, client to show screen1 and if server sends another value show screen2.
This way I try to change screens on client side with feedbacks from the server.
Attached you can find the simplified experiment, I can not go further than the inline script, because it crashes when I started it.
Do you have any idea to make it as simple as possible?
I think establishing the connection and following the steps in the experiment and sending messages when user submit response to the questions which will trigger actions in client side will be what I need. But I couldn`t do it.
Hello again,
I made some more changes and now both instances can make the connection but I want the message to be sent to change based on an internal variable (a form input). If this value (var1_1) equals to 33, it should send 30 and if it is some other value it should send 20. But when I run the application I get an error, which is shown below.
And also, even the input is correct, client always receives 20.
Hi,
I haven't look at your experiment, so I can't tell you whether you are on the right track, but the specific problem here is that you are overwriting opensesame's builtin
var
object. It is needed for the experiment to run properly, so it is really a bad idea to do stuff like that;var = '30'
. So, simply use different variable names and you should be fine.Good luck,
Eduard
Thanks Eduard,
Seems like it was one of the main problems, now I changed the name to var_sent instead of var.
and now it can correctly send the message and close the connection.