Add Updating Time

This commit is contained in:
bigJIU 2022-12-14 20:07:02 +08:00
parent 5628f9e9b1
commit 928d98b23f
22 changed files with 130 additions and 81 deletions

41
.idea/workspace.xml generated
View File

@ -2,10 +2,23 @@
<project version="4">
<component name="ChangeListManager">
<list default="true" id="c32bfd4e-6189-47f3-9d6c-c1825d3d7e5f" name="Changes" comment="">
<change beforePath="$PROJECT_DIR$/IDManager.py" beforeDir="false" afterPath="$PROJECT_DIR$/IDManager.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Mario-AI-Interface.jar" beforeDir="false" afterPath="$PROJECT_DIR$/Mario-AI-Interface.jar" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Mario-AI-Interface.jar.js" beforeDir="false" afterPath="$PROJECT_DIR$/Mario-AI-Interface.jar.js" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Mario-AI-Interface/reps/f_l_sav.rep" beforeDir="false" afterPath="$PROJECT_DIR$/Mario-AI-Interface/reps/f_l_sav.rep" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Mario-AI-Interface/src/Play.java" beforeDir="false" afterPath="$PROJECT_DIR$/Mario-AI-Interface/src/Play.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Mario-AI-Interface/src/engine/core/MarioGame.java" beforeDir="false" afterPath="$PROJECT_DIR$/Mario-AI-Interface/src/engine/core/MarioGame.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Mario-AI-Interface/src/engine/core/MarioWorld.java" beforeDir="false" afterPath="$PROJECT_DIR$/Mario-AI-Interface/src/engine/core/MarioWorld.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/data/annotation.csv" beforeDir="false" afterPath="$PROJECT_DIR$/data/annotation.csv" afterDir="false" />
<change beforePath="$PROJECT_DIR$/data/questionare.csv" beforeDir="false" afterPath="$PROJECT_DIR$/data/questionare.csv" afterDir="false" />
<change beforePath="$PROJECT_DIR$/main.py" beforeDir="false" afterPath="$PROJECT_DIR$/main.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/templates/GameAnnotation.html" beforeDir="false" afterPath="$PROJECT_DIR$/templates/GameAnnotation.html" afterDir="false" />
<change beforePath="$PROJECT_DIR$/templates/GameAnnotation2.html" beforeDir="false" afterPath="$PROJECT_DIR$/templates/GameAnnotation2.html" afterDir="false" />
<change beforePath="$PROJECT_DIR$/templates/GameOver.html" beforeDir="false" afterPath="$PROJECT_DIR$/templates/GameOver.html" afterDir="false" />
<change beforePath="$PROJECT_DIR$/templates/GamePlay.html" beforeDir="false" afterPath="$PROJECT_DIR$/templates/GamePlay.html" afterDir="false" />
<change beforePath="$PROJECT_DIR$/templates/GameQuestion.html" beforeDir="false" afterPath="$PROJECT_DIR$/templates/GameQuestion.html" afterDir="false" />
<change beforePath="$PROJECT_DIR$/templates/GameWelcome.html" beforeDir="false" afterPath="$PROJECT_DIR$/templates/GameWelcome.html" afterDir="false" />
<change beforePath="$PROJECT_DIR$/templates/data.js" beforeDir="false" afterPath="$PROJECT_DIR$/templates/data.js" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
@ -41,16 +54,16 @@
<option name="hideEmptyMiddlePackages" value="true" />
<option name="showLibraryContents" value="true" />
</component>
<component name="PropertiesComponent"><![CDATA[{
"keyToString": {
"RunOnceActivity.OpenProjectViewOnStart": "true",
"RunOnceActivity.ShowReadmeOnStart": "true",
"SHARE_PROJECT_CONFIGURATION_FILES": "true",
"WebServerToolWindowFactoryState": "false",
"last_opened_file_path": "C:/Users/duaho/Projects/website materials/MarioWeb/templates",
"nodejs_package_manager_path": "npm"
<component name="PropertiesComponent">{
&quot;keyToString&quot;: {
&quot;RunOnceActivity.OpenProjectViewOnStart&quot;: &quot;true&quot;,
&quot;RunOnceActivity.ShowReadmeOnStart&quot;: &quot;true&quot;,
&quot;SHARE_PROJECT_CONFIGURATION_FILES&quot;: &quot;true&quot;,
&quot;WebServerToolWindowFactoryState&quot;: &quot;false&quot;,
&quot;last_opened_file_path&quot;: &quot;C:/Users/duaho/Projects/website materials/MarioWeb/templates&quot;,
&quot;nodejs_package_manager_path&quot;: &quot;npm&quot;
}
}]]></component>
}</component>
<component name="RecentsManager">
<key name="CopyFile.RECENT_KEYS">
<recent name="C:\Users\duaho\Projects\website materials\MarioWeb\templates" />
@ -196,7 +209,11 @@
<workItem from="1670345664686" duration="17000" />
<workItem from="1670435705322" duration="282000" />
<workItem from="1670478053954" duration="1683000" />
<workItem from="1670575237323" duration="8674000" />
<workItem from="1670575237323" duration="9314000" />
<workItem from="1670659784579" duration="1713000" />
<workItem from="1670662279126" duration="964000" />
<workItem from="1670919169632" duration="2232000" />
<workItem from="1671001937679" duration="1407000" />
</task>
<servers />
</component>
@ -217,7 +234,7 @@
<component name="com.intellij.coverage.CoverageDataManagerImpl">
<SUITE FILE_PATH="coverage/MarioWeb$MarioWeb.coverage" NAME="MarioWeb Coverage Results" MODIFIED="1669305478201" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="" />
<SUITE FILE_PATH="coverage/MarioWeb$test.coverage" NAME="test Coverage Results" MODIFIED="1668079935841" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" />
<SUITE FILE_PATH="coverage/MarioWeb$Flask__main_py_.coverage" NAME="Flask (main.py) Coverage Results" MODIFIED="1670593217310" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" />
<SUITE FILE_PATH="coverage/MarioWeb$Flask__main_py_.coverage" NAME="Flask (main.py) Coverage Results" MODIFIED="1671002752224" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" />
<SUITE FILE_PATH="coverage/MarioWeb$Flask__main_py___1_.coverage" NAME="Flask (main.py) (1) Coverage Results" MODIFIED="1668079945407" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="" />
</component>
</project>

Binary file not shown.

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,16 @@
----------------------------------------------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------------------------------------------
-----------------------------------------------SSSS-SSS-----------------------SSSSSSSSSSSSSSSSSS----------------SSSSSSSSSSSSSSSS----------------S--SSSSSS-------
----------o-----t-------------------------------------------------------------------SSSS--S----------------------SSSSSSSSSSSSSSS--------------------------------
%--------S------t--------------------------------------------------------------------SS--SSS--------------------SSSSSSSSSSSSSSS---------------------------------
|------------------------------o----------SSSSSS--------------------Q--------------S------SS-------------------o------S----KSSS---------------@%--S-------------
|-----------------------------------------SSSSS------oo----------------------------------------------%---------------------SS------------------|----------------
|--------------------------------------SSSSSSSS-%----%%%%%-%%--------------------------SS------------|-----------------------------------------|-----#----------
|--------o------------------------S--SS--SSSSS--|-----|||--||--------------------------r-------S-----|------------SSo-ooo---oSSS---------------|----##----------
|------------------------------S----SSSSSSSSSSS-|-----|||--||-------------------%%%%%%%%%%------QQQ--|-QQ----------SSS%--%%%%%%%---#-----------|---####--##-##-#
|------------------------------t--------S-------|-T---|||--||----------------#---||||||||----#-------|----------------|---|||||----#-----------|--#####--##----#
|--------------------------tt--t-------SSS%%-SS-|-TT--|||--||----------------#--S|||||||S----#-------tt---------S-----|--S||||S----#-----------|-######--##----#
|--------k-------g---------tt-kt----------||----|-TT--|||--||----kkg-------###---|||||||---------g---tt------ggg------|---||||-----#-#---------|#######--##----#
XX-------XXXXXXXXXXXXXXXXXXXXXXXS--%------%%----|XXXX-|||--||---XXXXXXXXXXXXXXXX%|%%%%%%%-------XXXXXXXXXXXXXXXX-%%%%%%%%%%%||--XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX-X
XX-------XXXXXXXXXXXXXXXXXXXXXXX---|------||----|XXXX-|||--||---XXXXXXXXXXXXXXXXg|-|||||--------XXXXXXXXXXXXXXXXg-|||||||||-||--XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX-X

Binary file not shown.

Binary file not shown.

View File

@ -34,25 +34,30 @@ public class Play {
// MarioResult tmpResult = game.playGame(Replay.getRepAgentFromFile(repPath),getLevel(levelPath), 200, repPath);
// MarioGame game2 = new MarioGame();
//FIXME: Debug Use
//playGameMain("lvl1");
}
public static byte[] playGameMain(String levelName, int lives, boolean control){
public static byte[] playGameMain(String levelName, int lives, boolean control,int time,int col){
String levelPath = String.format("/app/levels/%s.lvl", levelName); // For web
String repPath = String.format("/files/%s_sav.rep", levelName); // For web
// String levelPath = String.format("./levels/group%s/%s.lvl", "0", levelName); // For local
// String repPath = String.format("./reps/%s_sav.rep", levelName); // For local
MarioGame game = new MarioGame();
game.setLives(lives);
MarioResult tmpResult = game.playGame(new HumanAgent(control),getLevel(levelPath), 200, repPath);
MarioResult tmpResult = game.playGame(new HumanAgent(control),getLevel(levelPath), time, repPath,col);
return Replay.serializeAgentEvents(tmpResult.getAgentEvents());
}
public static byte[] playGameMain(String levelName){
return playGameMain(levelName, 0, true);
return playGameMain(levelName, 5, false,30,16);
}
public static void replayGameMain(String levelName, int lives){
public static void replayGameMain(String levelName, int lives, int time, int col){
String levelPath = String.format("/app/levels/%s.lvl", levelName); // For web
String repPath = String.format("/files/%s_sav.rep", levelName); // For web
@ -61,6 +66,6 @@ public class Play {
MarioGame game = new MarioGame();
game.setLives(lives);
game.playGame(Replay.getRepAgentFromFile(repPath),getLevel(levelPath), 200, repPath);
game.playGame(Replay.getRepAgentFromFile(repPath),getLevel(levelPath), time, repPath,col);
}
}

View File

@ -87,8 +87,8 @@ public class MarioGame {
this.render.addKeyListener((KeyAdapter) this.agent);
}
}
public MarioResult playGame(String level, String resultPath) {
return this.runGame(new agents.HumanAgent(true), level, 200, 0, true, 30, 2, resultPath);
public MarioResult playGame(String level, String resultPath,int col) {
return this.runGame(new agents.HumanAgent(true), level, 200, 0, true, 30, 2, resultPath,col);
}
/**
@ -98,8 +98,8 @@ public class MarioGame {
* @param timer number of ticks for that level to be played. Setting timer to anything &lt;=0 will make the time infinite
* @return statistics about the current game
*/
public MarioResult playGame(MarioAgent gameAgent,String level, int timer, String resultPath) {
return this.runGame(gameAgent, level, timer, 0, true, 30, 2, resultPath);
public MarioResult playGame(MarioAgent gameAgent,String level, int timer, String resultPath,int col) {
return this.runGame(gameAgent, level, timer, 0, true, 30, 2, resultPath,col);
}
/**
@ -110,8 +110,8 @@ public class MarioGame {
* @param timer number of ticks for that level to be played. Setting timer to anything &lt;=0 will make the time infinite
* @return statistics about the current game
*/
public MarioResult runGame(MarioAgent agent, String level, int timer) {
return this.runGame(agent, level, timer, 0, true, 0, 2, "");
public MarioResult runGame(MarioAgent agent, String level, int timer,int col) {
return this.runGame(agent, level, timer, 0, true, 0, 2, "",col);
}
/**
@ -126,7 +126,7 @@ public class MarioGame {
* @param scale the screen scale, that scale value is multiplied by the actual width and height
* @return statistics about the current game
*/
public MarioResult runGame(MarioAgent agent, String level, int timer, int marioState, boolean visuals, int fps, float scale, String resultPath) {
public MarioResult runGame(MarioAgent agent, String level, int timer, int marioState, boolean visuals, int fps, float scale, String resultPath, int col) {
if (visuals) {
this.window = new JFrame("Mario AI Framework");
this.render = new MarioRender(scale);
@ -138,10 +138,10 @@ public class MarioGame {
this.window.setVisible(true);
}
this.setAgent(agent);
return this.gameLoop(level, timer, marioState, visuals, fps, resultPath);
return this.gameLoop(level, timer, marioState, visuals, fps, resultPath, col);
}
private MarioResult gameLoop(String level, int timer, int marioState, boolean visual, int fps, String resultPath) {
private MarioResult gameLoop(String level, int timer, int marioState, boolean visual, int fps, String resultPath, int col) {
this.world = new MarioWorld(this.killEvents);
this.world.visuals = visual;
this.world.initializeLevel(level, 1000 * timer);
@ -170,10 +170,19 @@ public class MarioGame {
ArrayList<MarioEvent> gameEvents = new ArrayList<>();
ArrayList<MarioAgentEvent> agentEvents = new ArrayList<>();
int segNum = 0;
while (this.world.gameStatus == GameStatus.RUNNING) {
if (!this.pause) {
//get actions
//Update Timer
if(world.mario.x / (16*col) > segNum){
segNum++;
this.world.setCurrentTimer(1000 * timer);
}
agentTimer = new MarioTimer(MarioGame.maxTime);
//get actions
boolean[] actions = this.agent.getActions(new MarioForwardModel(this.world.clone()), agentTimer);
if (MarioGame.verbose) {
if (agentTimer.getRemainingTime() < 0 && Math.abs(agentTimer.getRemainingTime()) > MarioGame.graceTime) {
@ -210,17 +219,7 @@ public class MarioGame {
}
return new MarioResult(this.world, gameEvents, agentEvents);
}
public static void showNewWindow(JFrame relativeWindow) {
// 鍒涘缓涓<EFBFBD>柊绐楀彛
JFrame newJFrame = new JFrame("鏂扮殑绐楀彛");
newJFrame.setSize(250, 250);
// 鎶婃柊绐楀彛鐨勪綅缃 relativeWindow 绐楀彛鐨勪腑蹇<EFBFBD>
newJFrame.setLocationRelativeTo(relativeWindow);
newJFrame.setVisible(true);
}
public void setLives(int lives) {
this.initialLives = lives;
}

View File

@ -358,8 +358,8 @@ public class MarioWorld {
if (this.currentTimer > 0) {
this.currentTimer -= 30;
// if (this.segTime > 0 && (int) (this.mario.x / 512) > this.passedSegs) {
// this.passedSegs = (int) (this.mario.x / 512);
// if (this.segTime > 0 && (int) (this.mario.x / 256) > this.passedSegs) {
// this.passedSegs = (int) (this.mario.x / 256);
// this.currentTimer = Math.min(this.currentTimer + this.segTime, 2 * this.segTime) ;
// }
if (this.currentTimer <= 0) {
@ -595,10 +595,9 @@ public class MarioWorld {
}
}
// public void setSegTime(int segTime) {
// this.segTime = segTime;
// this.currentTimer = 2 * segTime;
// }
public void setCurrentTimer(int currentTimer) {
this.currentTimer = currentTimer;
}
// public void setRevivable(boolean revivable) {
// this.revivable = revivable;

Binary file not shown.

Binary file not shown.

View File

@ -20,3 +20,6 @@ IP,A-ID,B-ID,Anno,
127.0.0.1,168,74,B,
127.0.0.1,82,101,N,
127.0.0.1,178,4,A,
10.27.169.251,160,121,N,
10.27.169.251,69,124,N,
10.27.169.251,165,79,A,

1 IP A-ID B-ID Anno
20 127.0.0.1 168 74 B
21 127.0.0.1 82 101 N
22 127.0.0.1 178 4 A
23 10.27.169.251 160 121 N
24 10.27.169.251 69 124 N
25 10.27.169.251 165 79 A

View File

@ -152,3 +152,10 @@ IP,Style,Frequency,Age,Gender
127.0.0.1,C,A,B,E,B,A,,
127.0.0.1,A,A,A,E,E,A,,
127.0.0.1,A,A,B,B,C,A,,
127.0.0.1,B,A,B,B,C,A,,
10.27.169.251,A,A,A,C,A,A,,
10.27.169.251,B,A,A,A,D,C,,
127.0.0.1,C,A,D,D,A,A,,
10.27.169.251,A,A,A,A,B,A,,
10.27.169.251,A,A,A,A,A,A,,
10.27.169.251,A,A,D,B,B,A,,

1 IP,Style,Frequency,Age,Gender
152 127.0.0.1,C,A,B,E,B,A,,
153 127.0.0.1,A,A,A,E,E,A,,
154 127.0.0.1,A,A,B,B,C,A,,
155 127.0.0.1,B,A,B,B,C,A,,
156 10.27.169.251,A,A,A,C,A,A,,
157 10.27.169.251,B,A,A,A,D,C,,
158 127.0.0.1,C,A,D,D,A,A,,
159 10.27.169.251,A,A,A,A,B,A,,
160 10.27.169.251,A,A,A,A,A,A,,
161 10.27.169.251,A,A,D,B,B,A,,

View File

@ -39,7 +39,7 @@ def gamepreplay():
print(result.get("gamestyle"))
return redirect(url_for('gametutorial', id=ip))
# debug use:
#return redirect(url_for('gameplay2', id=ip))
#return redirect(url_for('gameanno2', id=ip))
@app.route('/gametutorial/<id>')
@ -137,7 +137,7 @@ def gameanno2(id):
if id != "result":
print("anno " + id)
gamelevels = idm.getRecent(id)
# gamelevels = idm.getTypeLevels(id)
#gamelevels = idm.getTypeLevels(id)
level1 = gamelevels[0]
level2 = gamelevels[1]
level3 = gamelevels[2]

View File

@ -206,12 +206,12 @@ function Replay(id){
console.log("{{level1}}")
var replayWindow=document.getElementById("replayWindow");
replayWindow.style.visibility = 'visible';
cjCall("Play", "replayGameMain", "{{level1}}",5);
cjCall("Play", "replayGameMain", "{{level1}}",5,30,16);
}else if(id==2){
console.log("{{level2}}")
var replayWindow=document.getElementById("replayWindow");
replayWindow.style.visibility = 'visible';
cjCall("Play", "replayGameMain", "{{level2}}",5);
cjCall("Play", "replayGameMain", "{{level2}}",5,30,16);
}else{
}
@ -297,7 +297,7 @@ function Replay(id){
<br><br>
<div class="container">
<h1>
<i class="icon-cloud"></i> Which level was more fun to play?
<i class="icon-heart-empty"></i> Which level was more fun to play?
</h1>
<br>
<form action="radioresult" method="POST" onSubmit="return beforeSubmit(this);">
@ -306,11 +306,11 @@ function Replay(id){
<label>
<input type="radio" class="option-input radio" name="fun" value="A">
<b>Level A is More Fun</b>
<b>A is More Fun than B</b>
</label>
<label>
<input type="radio" class="option-input radio" name="fun" value="E">
<b>Both are Fun</b>
<b>Both are equally Fun</b>
</label>
</div>
@ -318,7 +318,7 @@ function Replay(id){
<label>
<input type="radio" class="option-input radio" name="fun" value="B">
<b>Level B is More Fun</b>
<b>B is More Fun than A</b>
</label>
<label>
<input type="radio" class="option-input radio" name="fun" value="N">

View File

@ -154,17 +154,17 @@ function Replay(id){
console.log("{{level1}}")
var replayWindow=document.getElementById("replayWindow");
replayWindow.style.visibility = 'visible';
cjCall("Play", "replayGameMain", "{{level1}}",5);
cjCall("Play", "replayGameMain", "{{level1}}",5,30,16);
}else if(id==2){
console.log("{{level2}}")
var replayWindow=document.getElementById("replayWindow");
replayWindow.style.visibility = 'visible';
cjCall("Play", "replayGameMain", "{{level2}}",5);
cjCall("Play", "replayGameMain", "{{level2}}",5,30,16);
}else if(id==3){
console.log("{{level2}}")
var replayWindow=document.getElementById("replayWindow");
replayWindow.style.visibility = 'visible';
cjCall("Play", "replayGameMain", "{{level3}}",5);
cjCall("Play", "replayGameMain", "{{level3}}",5,30,16);
}else{
console.log("No such ID")
}
@ -241,7 +241,7 @@ function Replay(id){
<br><br>
<div class="container">
<h1>
<i class="icon-cloud"></i> What's their "fun" rank?
<i class="icon-heart-empty"></i> What's their "fun" rank?
</h1>
<br>
@ -284,13 +284,14 @@ function Replay(id){
//['443', '3v3', '3vq'] [c,k,r]
function postOrder(){
slist = s.toArray();
console.log(slist)
result = []
for (i = 0; i < 3; i++) {
if(slist[i] === '443'){
if(slist[i] === '3fx'){
result[i] = "c"
}else if(slist[i] === '3v3'){
}else if(slist[i] === '3fy'){
result[i] = "k"
}else if(slist[i] === '3vq'){
}else if(slist[i] === '3fz'){
result[i] = "r"
}else{
console.log("you have change the name, dont you?")

View File

@ -162,7 +162,7 @@
<section id="Over">
<div class="container">
<h1>
<i class="icon-cloud"></i> Thank You!!!
<i class="icon-chevron-down"></i> Thank You!!!
</h1>
<br>
<button onclick="
@ -174,7 +174,7 @@
">Play And Annotate Again!</button>
">Keep Playing!</button>
<button id = "Finish" onclick="
if('{{stage}}' == '2'){
window.location.href = 'about:blank';

View File

@ -143,7 +143,7 @@
PlayLevel(levels[levelNum-1],control)
.then(function (){
alert("Go to Evaluation Window")
alert("Please proceed to answer some questions about the levels you just played!")
window.location.href = "{{jump}}"
});

View File

@ -9,14 +9,15 @@
<meta name="author" content="">
<title>AI and Games </title>
<!--../templates/Web/-->
<!--../templates/Web/-->
<!-- Bootstrap core CSS -->
<link href="../templates/Web/bootstrap.min.css" rel="stylesheet">
<link href="../templates/Web/font-awesome.min.css" rel="stylesheet">
<link rel="shortcut icon" href="http://aingames.cn/static/img/logo.png">
<script src="../templates/Web/font_3071663_oravow8bb8q.js"></script>
{# <script src="../templates/Web/font_3071663_oravow8bb8q.js"></script>#}
<script src="../data.js"></script>
<!-- Custom styles for this template -->
<link href="../templates/Web/scrolling-nav.css" rel="stylesheet">
@ -196,7 +197,7 @@
var radios = ["playeds","playedp","gamestyle","frequency","age","gender","control"]
for (var i = 0; i < radios.length; i++){
if(isEmpty(radios[i])){
alert("Question "+(i+1)+" is Empty! Please Fill it!");
alert("Some answers are missing; please fill in the questionnaire before proceeding to play!");
return false;
}
}
@ -217,7 +218,7 @@
<section id="Reviews">
<div class="container">
<h1>
<i class="icon-cloud"></i> Questionnaire
<i class="icon-question"></i> Questionnaire
</h1>
<br>
<div class="row clearfix">
@ -239,7 +240,7 @@
</label>
</p>
<p><h4>Do you played platform games like Super Mario Bros?</h4>
<p><h4>Do you play platform games like Super Mario Bros?</h4>
<label>
<input type="radio" class="option-input radio" name="playedp" value="A" >
Yes, a lot
@ -254,7 +255,7 @@
</label>
</p>
<p><h4>What is your prefered acion in Super Mario Bros?</h4>
<p><h4>What is your preferred action in Super Mario Bros?</h4>
<label>
<input type="radio" class="option-input radio" name="gamestyle" value="A" >
Speed run
@ -273,7 +274,7 @@
</label>
</p>
<p><h4>How frequently do you play game?</h4>
<p><h4>How frequently do you play games?</h4>
<label>
<input type="radio" class="option-input radio" name="frequency" value="A" >
More than 10 hours a week

View File

@ -208,8 +208,9 @@
<div class="container">
<div class="page-header">
<h1>
<i class="icon-cloud"></i> Welcome to Super Mario Bros Game!
<i class="icon-rocket"></i> Welcome to the study of fun!
</h1>
</div>
<br>
<div class="row clearfix">
@ -226,20 +227,20 @@
<br><br>
<h4>Purpose of the Experiment</h4>
<p>
This Experiment is designed for investigating <b>player's experience of <em>fun</em></b> while playing procedurally generated Super Mario Bros levels.
This Experiment is designed to study <b>the notion of "<em>fun</em>"</b> elicited while playing Super Mario Bros levels.
</p>
<br>
<h4>Procedure of the Experiment</h4>
<ul>
<li> The Experiment is consist of two Phase, which you need to do them at least two times in an experiment.<br>
<li> Each Phase contains several Super Mario Bros levels to play and a annotation page to evaluate those levels you just played.<br>
<li> This experiment consists of two phases, In each phase you will first be asked to play a number of Super Mario Bros games
and then will be asked some questions about the levels you just played.
<li> It takes about <b>15 minutes in total</b> to complete the experiment.<br>
<li> Enjoy your Time!
<li> Have Fun!
</ul>
<br><br>
<button onclick="window.location.href = '/question';" class="cirButton"><b> Start Right Now!</b> </button>
<button onclick="window.location.href = '/question';" class="cirButton"><b> Start!</b> </button>
</div>

View File

@ -31,7 +31,7 @@ function PostToServer(url,data) {
}
function PlayLevel(level,control){
var returnVal = cjCall("Play", "playGameMain", level, 5, control);
var returnVal = cjCall("Play", "playGameMain", level, 5, control,30,16);
return returnVal.then(function(){
console.log("the return val is ready");
console.log(returnVal.value);

Binary file not shown.