Millisecond Forums

Embed online game

https://forums.millisecond.com/Topic26243.aspx

By MoritzBuhl - 1/10/2019

Hello everybody,

I am trying to design an experiment in Inquisit employing an online game. The link to this game is "http://www.2048game.com/".

A very basic version of the Inquisit code up to this point looks like this:
-----------------------------------------------------------------------------------------------------------------------------------------------------
<page intro>
^^Welcome to our experiment.
^^
</page>

<page finish>
^^Thank you for participating.
</page>

<html 2048>
/items = ("http://www.2048game.com/")
</html>

<trial mytrial>
/inputdevice = mouse; keyboard
/stimulusframes = [1 = 2048]
/timeout = 100000
</trial>


<block myblock>
/ preinstructions = (intro)
/trials = [1 = mytrial]
/postinstructions = (finish)
</block>

<expt neu>
/blocks = [1=myblock]
</expt>


-----------------------------------------------------------------------------------------------------------------------------------------------------

This results in a very weird presentation of the site. 

Do you have suggestions how I could insert the game into my experiment?

I would be very grateful for suggestions.

Moritz


By Dave - 1/10/2019

MoritzBuhl - Thursday, January 10, 2019
Hello everybody,

I am trying to design an experiment in Inquisit employing an online game. The link to this game is "http://www.2048game.com/".

A very basic version of the Inquisit code up to this point looks like this:
-----------------------------------------------------------------------------------------------------------------------------------------------------
<page intro>
^^Welcome to our experiment.
^^
</page>

<page finish>
^^Thank you for participating.
</page>

<html 2048>
/items = ("http://www.2048game.com/")
</html>

<trial mytrial>
/inputdevice = mouse; keyboard
/stimulusframes = [1 = 2048]
/timeout = 100000
</trial>


<block myblock>
/ preinstructions = (intro)
/trials = [1 = mytrial]
/postinstructions = (finish)
</block>

<expt neu>
/blocks = [1=myblock]
</expt>


-----------------------------------------------------------------------------------------------------------------------------------------------------

This results in a very weird presentation of the site. 

Do you have suggestions how I could insert the game into my experiment?

I would be very grateful for suggestions.

Moritz



I don't think it's possible due to (a) restrictions that IE has when running in embedded mode, and (b) possibly restrictions the site (to prevent embedding and force people to visit the site directly).
By Dave - 1/10/2019

Dave - Thursday, January 10, 2019
MoritzBuhl - Thursday, January 10, 2019
Hello everybody,

I am trying to design an experiment in Inquisit employing an online game. The link to this game is "http://www.2048game.com/".

A very basic version of the Inquisit code up to this point looks like this:
-----------------------------------------------------------------------------------------------------------------------------------------------------
<page intro>
^^Welcome to our experiment.
^^
</page>

<page finish>
^^Thank you for participating.
</page>

<html 2048>
/items = ("http://www.2048game.com/")
</html>

<trial mytrial>
/inputdevice = mouse; keyboard
/stimulusframes = [1 = 2048]
/timeout = 100000
</trial>


<block myblock>
/ preinstructions = (intro)
/trials = [1 = mytrial]
/postinstructions = (finish)
</block>

<expt neu>
/blocks = [1=myblock]
</expt>


-----------------------------------------------------------------------------------------------------------------------------------------------------

This results in a very weird presentation of the site. 

Do you have suggestions how I could insert the game into my experiment?

I would be very grateful for suggestions.

Moritz



I don't think it's possible due to (a) restrictions that IE has when running in embedded mode, and (b) possibly restrictions the site (to prevent embedding and force people to visit the site directly).

Another hurdle in getting this to work is the fact that a <trial> in Inquisit is restricted to a single input device (e.g. either keyboard OR mouse, never both at the same time), whereas the game would require input from several modalities (keyboard AND mouse). Moreover, the <trial> object and the embedded page would be competing for the input, and key presses would essentially not reach the embedded page (i.e. the tiles would not move). So unfortunately I really don't see a way to get this to work, even with a locally stored copy of the whole game (for which embedding works better) than with the live site.