1
0

eindex.php 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  5. <title> Fractions </title>
  6. <link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
  7. <script type="text/javascript" src="js/phaser.min.js"></script>
  8. <script type="text/javascript" src="js/boot.js"></script>
  9. <script type="text/javascript" src="js/menu.js"></script>
  10. <script type="text/javascript" src="js/circleOne.js"></script>
  11. <script type="text/javascript" src="js/squareOne.js"></script>
  12. <script type="text/javascript" src="js/squareTwo.js"></script>
  13. </head>
  14. <body>
  15. <div class="container">
  16. <div class="clearfix"></div>
  17. <div class="panel panel-primary">
  18. <div class="panel-heading">FRACTIONS GAME</div>
  19. <div class="panel-body">
  20. <center>
  21. <div id="fractions-game" style="padding: 0 auto 0 auto;"></div>
  22. </center>
  23. </div>
  24. </div>
  25. <div class="panel panel-info">
  26. <div class="panel-heading">COOPERATION TEAM</div>
  27. <div class="panel-body">
  28. <center>
  29. <ul>
  30. <li><strong>BRAZIL:</strong> Le&ocirc;nidas de Oliveira Brand&atilde;o (IME-USP)</li>
  31. <li><strong>PERU:</strong> Manuel Ibarra and Cristhian Serrano (EAPIIS-UNAMBA)</li>
  32. <li><strong>FRANCE:</strong> Jean-Marc (MOCAH-UPMC)</li>
  33. </ul>
  34. </center>
  35. </div>
  36. </div>
  37. <div class="panel panel-default">
  38. <div class="panel-heading">BASED ON</div>
  39. <div class="panel-body">
  40. <center>
  41. <ul>
  42. <li><strong>iLM </strong>(interactive Learning Modules) </li>
  43. <li><strong>Six facets of Serious Game Design</strong>:<br>
  44. Pedagogical Objectives; Domain Simulation; Interactions with the Simulation; Problems and Progression; Decorum and Conditions of Use.
  45. </li>
  46. </ul>
  47. </center>
  48. </div>
  49. </div>
  50. <div class="panel panel-danger">
  51. <div class="panel-heading">TECHNOLOGY</div>
  52. <div class="panel-body">
  53. <center>
  54. <ul>
  55. <li> We used <strong>HTML5</strong>, <strong>CSS</strong> and the <strong>Javascript</strong> Library <a href="http://phaser.io/" target="_blank"><strong>Phaser.io</strong></a> </li>
  56. </ul>
  57. </center>
  58. </div>
  59. </div>
  60. </div>
  61. </body>
  62. <?php /* retrieving parameters */
  63. $do = $_REQUEST['do'];
  64. $lang = $_REQUEST['language'];
  65. $shape = $_REQUEST['shape'];
  66. $type = $_REQUEST['mode'];
  67. $posit = 0;
  68. $opera = $_REQUEST['operator'];
  69. $diffi = $_REQUEST['difficulty'];
  70. $label = $_REQUEST['label'];
  71. //?do=play&language=es_PE&shape=Circle&mode=A&operator=Plus&difficulty=1&label=true
  72. if(!isset($do)){
  73. ?>
  74. <script type="text/javascript">
  75. // Initialize the game
  76. var game = new Phaser.Game(900, 600, Phaser.CANVAS, 'fractions-game');
  77. hip = "<?=$_SERVER['REMOTE_ADDR']?>"; //Host ip
  78. name = ""; //player name
  79. lang = ""; //language
  80. var timer, totalTime;
  81. // Game One
  82. onePosition = 0; //Map position
  83. oneMove = false; //Move to next position
  84. oneDifficulty = 0; //From one to five
  85. oneOperator= ""; //Plus; Minus; Mixed
  86. oneLabel= false; //Show block label
  87. oneShape = ""; //Circle; square
  88. oneType = ""; // A - Place distance; B - Select blocks
  89. oneMenu = true;
  90. // Game Two
  91. twoPosition = 0; //Map position
  92. twoMove = false; //Move to next position
  93. twoDifficulty = 0; //From one to five
  94. twoOperator= ""; //Plus; Minus; Mixed
  95. twoLabel= false; //Show block label
  96. twoShape = ""; //Circle; square
  97. twoType = ""; // A - Normal position; B - Random position
  98. twoMenu= true;
  99. //adding game states (scenes)
  100. game.state.add('boot', bootState);
  101. game.state.add('load', loadState);
  102. game.state.add('name', nameState);
  103. game.state.add('menu', menuState);
  104. game.state.add('menuCOne', menuCircleOne);
  105. game.state.add('mapCOne', mapCircleOne);
  106. game.state.add('gameCOne', gameCircleOne);
  107. game.state.add('endCOne', endCircleOne);
  108. game.state.add('menuSOne', menuSquareOne);
  109. game.state.add('mapSOne', mapSquareOne);
  110. game.state.add('gameSOne', gameSquareOne);
  111. game.state.add('endSOne', endSquareOne);
  112. game.state.add('menuSTwo', menuSquareTwo);
  113. game.state.add('mapSTwo', mapSquareTwo);
  114. game.state.add('gameSTwo', gameSquareTwo);
  115. game.state.add('endSTwo', endSquareTwo);
  116. //starting to boot game
  117. game.state.start('boot');
  118. </script>
  119. <? } else if($do=="play"){ ?>
  120. <script type="text/javascript">
  121. // Initialize the game
  122. var game = new Phaser.Game(900, 600, Phaser.CANVAS, 'fractions-game');
  123. var hip = "<?=$_SERVER['REMOTE_ADDR']?>"; //Host ip
  124. var name = "";
  125. var lang = "<?=$lang?>";
  126. var timer, totalTime;
  127. var onePosition = <?=$posit?>;
  128. var oneMove = true;
  129. var oneDifficulty = <?=$diffi?>;
  130. var oneOperator = "<?=$opera?>";
  131. var oneLabel = <?=$label?>;
  132. var oneShape = "<?=$shape?>";
  133. var oneType = "<?=$type?>";
  134. var oneMenu = false;
  135. var twoPosition = 0; //Map position
  136. var twoMove = false; //Move to next position
  137. var twoDifficulty = 0; //From one to five
  138. var twoOperator= ""; //Plus; Minus; Mixed
  139. var twoLabel= false; //Show block label
  140. var twoShape = ""; //Circle; square
  141. var twoType = ""; // A - Normal position; B - Random position
  142. var twoMenu= true;
  143. //adding game states (scenes)
  144. game.state.add('boot', bootState);
  145. game.state.add('load', loadState);
  146. game.state.add('name', nameState);
  147. game.state.add('menuCOne', menuCircleOne);
  148. game.state.add('mapCOne', mapCircleOne);
  149. game.state.add('gameCOne', gameCircleOne);
  150. game.state.add('endCOne', endCircleOne);
  151. game.state.add('menuSOne', menuSquareOne);
  152. game.state.add('mapSOne', mapSquareOne);
  153. game.state.add('gameSOne', gameSquareOne);
  154. game.state.add('endSOne', endSquareOne);
  155. game.state.add('menuSTwo', menuSquareTwo);
  156. game.state.add('mapSTwo', mapSquareTwo);
  157. game.state.add('gameSTwo', gameSquareTwo);
  158. game.state.add('endSTwo', endSquareTwo);
  159. //starting to load game
  160. game.state.start('load');
  161. </script>
  162. <? } ?>
  163. </html>