added margo module

This commit is contained in:
mig 2017-04-09 00:00:28 +02:00
parent 84df686739
commit 967f7629ec
91 changed files with 4491 additions and 0 deletions

View file

@ -0,0 +1,6 @@
<p>Margo a été inventé par <a href="http://www.cameronius.com/games/" target="_blank">Cameron Browne</a>.</p>
<p>La version Jocly du jeu Margo a été développé par Michel gutierrez (@<a target="_blank" href="http://twitter.com/_mig_">_mig_</a>)
avec les conseils précieux de Cameron Browne.</p>
<p>Le design graphique pour Jocly a été réalisé par Jérôme Choain (@<a target="_blank" href="http://twitter.com/_mig_">@jcfrog</a>).</p>

View file

@ -0,0 +1,6 @@
<p>Spline was invented by <a href="http://www.boardgamegeek.com/boardgamedesigner/9393/nestor-romeral-andres" target="_blank">Nestor Romeral Andres</a>
from <a href="http://nestorgames.com/index.html" target="_blank">NestorGames</a> in 2011. It is based on the
Shibumi platform invented by <a href="http://www.cameronius.com/games/" target="_blank">Cameron Browne</a> in 2011.</p>
<p>The Jocly version of Spline+ was developed by Michel gutierrez (@<a target="_blank" href="http://twitter.com/_mig_">_mig_</a>), with
graphic designs from Jérôme Choain (@<a target="_blank" href="http://twitter.com/jcfrog">jcfrog</a>) and Cameron Browne.</p>

View file

@ -0,0 +1,6 @@
<p>Spline+ was invented by <a href="http://www.boardgamegeek.com/boardgamedesigner/9393/nestor-romeral-andres" target="_blank">Nestor Romeral Andres</a>
from <a href="http://nestorgames.com/index.html" target="_blank">NestorGames</a> in 2011. It is based on the
Shibumi platform invented by <a href="http://www.cameronius.com/games/" target="_blank">Cameron Browne</a> in 2011.</p>
<p>The Jocly version of Spline+ was developed by Michel gutierrez (@<a target="_blank" href="http://twitter.com/_mig_">_mig_</a>), with
graphic designs from Jérôme Choain (@<a target="_blank" href="http://twitter.com/jcfrog">jcfrog</a>) and Cameron Browne.</p>

View file

@ -0,0 +1,6 @@
<p>Margo was invented by <a href="http://www.cameronius.com/games/" target="_blank">Cameron Browne</a>.</p>
<p>The Jocly version of Margo was developed by Michel gutierrez (@<a target="_blank" href="http://twitter.com/_mig_">_mig_</a>)
with valuable advice from Cameron Browne.</p>
<p>The Jocly graphic design is from Jérôme Choain (@<a target="_blank" href="http://twitter.com/_mig_">@jcfrog</a>).</p>

View file

@ -0,0 +1,3 @@
<p>Margo (appelé Spargo dans sa version 4x4) est une adaptation du jeu de GO à la plateforme "Square-Pyramidal" (appelée Shibumi en 4x4).
Le jeu est étonnament profond et intéressant même sur un petit plateau.</p>

View file

@ -0,0 +1,10 @@
<p>Spline is one of the simplest game that can be played on the Shibumi game system.</p>
<p>Shibumi is the essence of beauty, or elegance in its minimal form. A shibumi object may appear simple but will reward the viewer with
hidden depths as it is explored over time. Shibumi is simplicity hiding complexity.</p>
<p>Games and puzzles based on square pyramidal stackings have existed at least since Edouard Lucas' cannon-ball stacking problem of 1875. The most
famous 4x4 square pyramidal game is Pylos (published by Gigamic). Shibumi is different due to the third ball colour, drop mechanism, different numbers
of players, lack of a board gutter, and the fact that it's a system for playing many games rather than the embodiment of a single game. Some Shibumi
games may be playable with a Pylos set but many will not. </p>

View file

@ -0,0 +1,11 @@
<p>Spline+ is an extension of the Spline game where the users can, instead of adding a ball, move one of their balls, as long as it does not
have more than one other ball resting on it. Both Spline and Spline+ are played on the Shibumi platform.</p>
<p>Shibumi is the essence of beauty, or elegance in its minimal form. A shibumi object may appear simple but will reward the viewer with
hidden depths as it is explored over time. Shibumi is simplicity hiding complexity.</p>
<p>Games and puzzles based on square pyramidal stackings have existed at least since Edouard Lucas' cannon-ball stacking problem of 1875. The most
famous 4x4 square pyramidal game is Pylos (published by Gigamic). Shibumi is different due to the third ball colour, drop mechanism, different numbers
of players, lack of a board gutter, and the fact that it's a system for playing many games rather than the embodiment of a single game. Some Shibumi
games may be playable with a Pylos set but many will not. </p>

View file

@ -0,0 +1,3 @@
<p>Margo (known as Spargo in its 4x4 version) is an adaptation of the Go game to the Square-Pyramidal (called Shibumi in 4x4) platform.
It is surprisingly deep and tricky given the small board size.</p>

Binary file not shown.

Binary file not shown.

1324
src/games/margo/index.js Normal file

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

BIN
src/games/margo/margo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 808 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,47 @@
{
"metadata" :
{
"formatVersion" : 3.1,
"generatedBy" : "Blender 2.63 Exporter",
"vertices" : 112,
"faces" : 116,
"normals" : 105,
"colors" : 0,
"uvs" : [],
"materials" : 1,
"morphTargets" : 0,
"bones" : 0
},
"scale" : 1.000000,
"materials" : [ {
"DbgColor" : 15658734,
"DbgIndex" : 0,
"DbgName" : "default",
"vertexColors" : false
}],
"vertices" : [-2.49629e-09,0.000633852,-0.645731,-2.49629e-09,0.081673,-0.645731,0.456601,0.00063386,-0.456601,0.456601,0.081673,-0.456601,0.645731,0.00063388,2.82723e-08,0.645731,0.081673,2.47299e-08,0.456601,0.0006339,0.456601,0.456601,0.081673,0.456601,-5.89479e-08,0.000633908,0.645731,-5.89479e-08,0.081673,0.645731,-0.456601,0.0006339,0.4566,-0.456601,0.081673,0.4566,-0.645731,0.00063388,-7.65378e-09,-0.645731,0.081673,-1.11961e-08,-0.456601,0.00063386,-0.4566,-0.456601,0.081673,-0.4566,-5.95487e-09,0.147273,-0.594192,0.420157,0.147273,-0.420157,0.594191,0.147273,1.91895e-08,0.420157,0.147273,0.420157,-5.79007e-08,0.147273,0.594192,-0.420157,0.147273,0.420157,-0.594192,0.147273,-1.38691e-08,-0.420157,0.147273,-0.420157,-7.42129e-09,0.16601,-0.551826,0.3902,0.16601,-0.3902,0.551826,0.16601,1.65433e-08,0.3902,0.16601,0.3902,-5.56634e-08,0.16601,0.551826,-0.3902,0.16601,0.3902,-0.551826,0.16601,-1.41582e-08,-0.3902,0.16601,-0.3902,-4.95379e-09,0.200949,-0.611606,0.432471,0.200949,-0.432471,0.611606,0.200949,1.7358e-08,0.432471,0.200949,0.432471,-5.84221e-08,0.200949,0.611606,-0.432471,0.200949,0.432471,-0.611606,0.200949,-1.66694e-08,-0.432471,0.200949,-0.432471,-4.95379e-09,0.205993,-0.611606,0.432471,0.205993,-0.432471,0.611606,0.205993,1.71376e-08,0.432471,0.205993,0.432471,-5.84221e-08,0.205993,0.611606,-0.432471,0.205993,0.432471,-0.611606,0.205993,-1.68899e-08,-0.432471,0.205993,-0.432471,-9.3081e-09,0.423176,-0.481058,0.34016,0.423176,-0.34016,0.481058,0.423176,2.06421e-09,0.34016,0.423176,0.34016,-5.13635e-08,0.423176,0.481058,-0.34016,0.423176,0.340159,-0.481058,0.423176,-2.47001e-08,-0.34016,0.423176,-0.34016,-2.39191e-09,0.44184,-0.576672,0.407768,0.44184,-0.407768,0.576671,0.44184,5.33517e-09,0.407768,0.44184,0.407768,-5.28061e-08,0.44184,0.576672,-0.407768,0.44184,0.407768,-0.576672,0.44184,-2.67487e-08,-0.407768,0.44184,-0.407768,-1.87422e-09,0.460716,-0.576672,0.407768,0.460716,-0.407768,0.576671,0.460716,4.51009e-09,0.407768,0.460716,0.407768,-5.22885e-08,0.460716,0.576672,-0.407768,0.460716,0.407768,-0.576672,0.460716,-2.75738e-08,-0.407768,0.460716,-0.407768,-2.90234e-08,0.49948,-0.205947,0.145626,0.49948,-0.145626,0.205947,0.49948,-1.30302e-08,0.145626,0.49948,0.145626,-4.70279e-08,0.49948,0.205947,-0.145626,0.49948,0.145626,-0.205947,0.49948,-2.44883e-08,-0.145626,0.49948,-0.145626,-2.49629e-09,0.000633852,-0.645731,0.456601,0.00063386,-0.456601,0.645731,0.00063388,2.82723e-08,0.456601,0.0006339,0.456601,-5.89479e-08,0.000633908,0.645731,-0.456601,0.0006339,0.4566,-0.645731,0.00063388,-7.65378e-09,-0.456601,0.00063386,-0.4566,-0.346368,0.416302,-0.346368,-9.01827e-09,0.416302,-0.489838,0.346368,0.416302,-0.346368,0.346368,0.416302,0.346368,-5.18413e-08,0.416302,0.489838,-0.489838,0.416302,-2.45128e-08,0.489838,0.416302,2.73998e-09,-0.346368,0.416302,0.346368,-0.421315,0.258046,-0.421315,-5.75206e-08,0.258046,0.59583,0.421315,0.258046,-0.421315,-5.43154e-09,0.258046,-0.59583,-0.421315,0.258046,0.421315,0.59583,0.258046,1.4188e-08,-0.59583,0.258046,-1.89618e-08,0.421315,0.258046,0.421315,-0.44093,0.310798,-0.44093,0.44093,0.310798,-0.44093,-3.28566e-09,0.310798,-0.62357,-5.77998e-08,0.310798,0.62357,-0.44093,0.310798,0.44093,-0.62357,0.310798,-2.13784e-08,0.44093,0.310798,0.44093,0.62357,0.310798,1.33147e-08],
"morphTargets" : [],
"normals" : [0,0,-1,0,0.304544,-0.952483,0.673513,0.304544,-0.673513,0.707083,0,-0.707083,0.952483,0.304544,0,1,0,0,0.673513,0.304544,0.673513,0.707083,0,0.707083,0,0.304544,0.952483,0,0,1,-0.673513,0.304544,0.673513,-0.707083,0,0.707083,-0.952483,0.304544,0,-1,0,0,0,0.761345,-0.648305,0.458419,0.761345,-0.458419,-0.707083,0,-0.707083,-0.673513,0.304544,-0.673513,0,-1,0,-0.458419,0.761345,0.458419,0,0.761345,0.648305,0,0.07416,0.997223,-0.70513,0.07416,0.70513,0.458419,0.761345,0.458419,-0.648305,0.761345,0,-0.458419,0.761345,-0.458419,0.648305,0.761345,0,-0.997223,0.07416,0,-0.630909,-0.451521,0.630909,-0.892239,-0.451521,0,-0.70513,0.07416,-0.70513,0,0.07416,-0.997223,0.70513,0.07416,-0.70513,0.70513,0.07416,0.70513,0.997223,0.07416,0,-0.630909,-0.451521,-0.630909,-0.989898,0.141667,0,-0.699973,0.141667,-0.699973,0.630909,-0.451521,-0.630909,0.892239,-0.451521,0,0,-0.451521,0.892239,0,-0.451521,-0.892239,0.630909,-0.451521,0.630909,0,0.786004,-0.618213,-0.437117,0.786004,-0.437117,-0.672994,-0.306772,-0.672994,0,-0.306772,-0.95175,0.989898,0.141667,0,0.699973,0.141667,0.699973,-0.699973,0.141667,0.699973,0.699973,0.141667,-0.699973,0,0.141667,0.989898,0,0.141667,-0.989898,0.95175,-0.306772,0,0.672994,-0.306772,-0.672994,0.581591,-0.568743,-0.581591,0.822474,-0.568743,0,0.437117,0.786004,-0.437117,0,0.786004,0.618213,0.437117,0.786004,0.437117,0.672994,-0.306772,0.672994,0,-0.306772,0.95175,-0.618213,0.786004,0,-0.95175,-0.306772,0,0.618213,0.786004,0,-0.437117,0.786004,0.437117,-0.672994,-0.306772,0.672994,0.581591,-0.568743,0.581591,0.801813,0.597522,0,0.566973,0.597522,0.566973,0,-0.568743,0.822474,-0.581591,-0.568743,0.581591,-0.581591,-0.568743,-0.581591,0,-0.568743,-0.822474,-0.822474,-0.568743,0,0.566973,0.597522,-0.566973,0,0.597522,-0.801813,0,0.997864,-0.065004,0.045961,0.997864,-0.045961,-0.566973,0.597522,0.566973,-0.801813,0.597522,0,0,0.597522,0.801813,-0.566973,0.597522,-0.566973,-0.045961,0.997864,0.045961,0,0.997864,0.065004,0.045961,0.997864,0.045961,0.065004,0.997864,0,-0.065004,0.997864,0,-0.045961,0.997864,-0.045961,0,0.181829,-0.983306,-0.695303,0.181829,-0.695303,0.695303,0.181829,-0.695303,0,0.181829,0.983306,0.695303,0.181829,0.695303,-0.983306,0.181829,0,0.983306,0.181829,0,-0.695303,0.181829,0.695303,-0.994476,-0.104862,0,-0.703207,-0.104862,-0.703207,0,-0.104862,-0.994476,0.994476,-0.104862,0,0.703207,-0.104862,0.703207,0.703207,-0.104862,-0.703207,0,-0.104862,0.994476,-0.703207,-0.104862,0.703207],
"colors" : [],
"uvs" : [],
"faces" : [35,0,1,3,2,0,0,1,2,3,35,2,3,5,4,0,3,2,4,5,35,4,5,7,6,0,5,4,6,7,35,6,7,9,8,0,7,6,8,9,35,8,9,11,10,0,9,8,10,11,35,10,11,13,12,0,11,10,12,13,35,3,1,16,17,0,2,1,14,15,35,1,0,14,15,0,1,0,16,17,35,12,13,15,14,0,13,12,17,16,35,2,4,82,81,0,3,5,18,18,35,21,20,28,29,0,19,20,21,22,35,9,7,19,20,0,8,6,23,20,35,11,9,20,21,0,10,8,20,19,35,13,11,21,22,0,12,10,19,24,35,15,13,22,23,0,17,12,24,25,35,1,15,23,16,0,1,17,25,14,35,5,3,17,18,0,4,2,15,26,35,7,5,18,19,0,6,4,26,23,35,30,29,37,38,0,27,22,28,29,35,16,23,31,24,0,14,25,30,31,35,17,16,24,25,0,15,14,31,32,35,20,19,27,28,0,20,23,33,21,35,23,22,30,31,0,25,24,27,30,35,19,18,26,27,0,23,26,34,33,35,22,21,29,30,0,24,19,22,27,35,18,17,25,26,0,26,15,32,34,35,39,38,46,47,0,35,29,36,37,35,26,25,33,34,0,34,32,38,39,35,29,28,36,37,0,22,21,40,28,35,24,31,39,32,0,31,30,35,41,35,25,24,32,33,0,32,31,41,38,35,28,27,35,36,0,21,33,42,40,35,31,30,38,39,0,30,27,29,35,35,27,26,34,35,0,33,34,39,42,35,89,88,55,48,0,43,44,45,46,35,35,34,42,43,0,42,39,47,48,35,38,37,45,46,0,29,28,49,36,35,34,33,41,42,0,39,38,50,47,35,37,36,44,45,0,28,40,51,49,35,32,39,47,40,0,41,35,37,52,35,33,32,40,41,0,38,41,52,50,35,36,35,43,44,0,40,42,48,51,35,50,49,57,58,0,53,54,55,56,35,90,89,48,49,0,57,43,46,54,35,92,91,51,52,0,58,59,60,61,35,88,93,54,55,0,44,62,63,45,35,91,94,50,51,0,59,64,53,60,35,93,95,53,54,0,62,65,66,63,35,94,90,49,50,0,64,57,54,53,35,95,92,52,53,0,65,58,61,66,35,59,58,66,67,0,67,56,68,69,35,53,52,60,61,0,66,61,70,71,35,48,55,63,56,0,46,45,72,73,35,49,48,56,57,0,54,46,73,55,35,52,51,59,60,0,61,60,67,70,35,55,54,62,63,0,45,63,74,72,35,51,50,58,59,0,60,53,56,67,35,54,53,61,62,0,63,66,71,74,35,65,64,72,73,0,75,76,77,78,35,62,61,69,70,0,74,71,79,80,35,58,57,65,66,0,56,55,75,68,35,61,60,68,69,0,71,70,81,79,35,56,63,71,64,0,73,72,82,76,35,57,56,64,65,0,55,73,76,75,35,60,59,67,68,0,70,67,69,81,35,63,62,70,71,0,72,74,80,82,34,77,76,75,0,83,84,85,34,77,75,74,0,83,85,86,34,78,77,74,0,87,83,86,34,73,78,74,0,78,87,86,34,73,79,78,0,78,88,87,34,73,72,79,0,78,77,88,35,68,67,75,76,0,81,69,85,84,35,71,70,78,79,0,82,80,87,88,35,67,66,74,75,0,69,68,86,85,35,70,69,77,78,0,80,79,83,87,35,66,65,73,74,0,68,75,78,86,35,69,68,76,77,0,79,81,84,83,35,64,71,79,72,0,76,82,88,77,34,83,84,85,0,18,18,18,34,82,83,85,0,18,18,18,34,82,85,86,0,18,18,18,34,81,82,86,0,18,18,18,34,81,86,87,0,18,18,18,34,80,81,87,0,18,18,18,35,4,6,83,82,0,5,7,18,18,35,0,2,81,80,0,0,3,18,18,35,6,8,84,83,0,7,9,18,18,35,8,10,85,84,0,9,11,18,18,35,10,12,86,85,0,11,13,18,18,35,12,14,87,86,0,13,16,18,18,35,14,0,80,87,0,16,0,18,18,35,106,104,88,89,0,89,90,44,43,35,105,106,89,90,0,91,89,43,57,35,107,110,91,92,0,92,93,59,58,35,104,109,93,88,0,90,94,62,44,35,110,111,94,91,0,93,95,64,59,35,109,108,95,93,0,94,96,65,62,35,111,105,90,94,0,95,91,57,64,35,108,107,92,95,0,96,92,58,65,35,47,46,102,96,0,37,36,97,98,35,40,47,96,99,0,52,37,98,99,35,43,42,101,103,0,48,47,100,101,35,41,40,99,98,0,50,52,99,102,35,45,44,97,100,0,49,51,103,104,35,42,41,98,101,0,47,50,102,100,35,44,43,103,97,0,51,48,101,103,35,46,45,100,102,0,36,49,104,97,35,99,96,104,106,0,99,98,90,89,35,98,99,106,105,0,102,99,89,91,35,97,103,110,107,0,103,101,93,92,35,96,102,109,104,0,98,97,94,90,35,103,101,111,110,0,101,100,95,93,35,102,100,108,109,0,97,104,96,94,35,101,98,105,111,0,100,102,91,95,35,100,97,107,108,0,104,103,92,96],
"bones" : [],
"skinIndices" : [],
"skinWeights" : [],
"animation" : {}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 197 B

View file

@ -0,0 +1,72 @@
{
"metadata" :
{
"formatVersion" : 3.1,
"generatedBy" : "Blender 2.63 Exporter",
"vertices" : 144,
"faces" : 142,
"normals" : 0,
"colors" : 0,
"uvs" : [],
"materials" : 1,
"morphTargets" : 0,
"bones" : 0
},
"scale" : 1.000000,
"materials" : [ {
"DbgColor" : 15658734,
"DbgIndex" : 0,
"DbgName" : "deco",
"blending" : "NormalBlending",
"colorDiffuse" : [0.6400000190734865, 0.6400000190734865, 0.6400000190734865],
"colorSpecular" : [0.5, 0.5, 0.5],
"depthTest" : true,
"depthWrite" : true,
"shading" : "Phong",
"specularCoef" : 50,
"opacity" : 1.0,
"transparent" : false,
"vertexColors" : false
},
{
"DbgColor" : 15597568,
"DbgIndex" : 1,
"DbgName" : "mainframe",
"blending" : "NormalBlending",
"colorDiffuse" : [0.6400000190734865, 0.6400000190734865, 0.6400000190734865],
"colorSpecular" : [0.5, 0.5, 0.5],
"depthTest" : true,
"depthWrite" : true,
"shading" : "Phong",
"specularCoef" : 50,
"opacity" : 1.0,
"transparent" : false,
"vertexColors" : false
}],
"vertices" : [4.3574,0.217364,-4.3574,4.27255,0.246567,-4.27255,4.18769,0.217364,-4.1877,4.27255,0.188161,-4.27255,-4.3574,0.217364,-4.3574,-4.27255,0.246567,-4.27255,-4.1877,0.217364,-4.18769,-4.27255,0.188161,-4.27255,-4.3574,0.217364,4.3574,-4.27255,0.246567,4.27255,-4.18769,0.217364,4.1877,-4.27255,0.188161,4.27255,4.3574,0.217364,4.3574,4.27255,0.246567,4.27255,4.1877,0.217364,4.18769,4.27255,0.188161,4.27255,-4.22247,0.188161,4.27255,-4.22247,0.246567,4.27255,-4.13861,0.217364,4.1877,-4.30632,0.217364,4.3574,4.32148,0.217364,4.3574,4.15318,0.217364,4.18769,4.23733,0.246567,4.27255,4.23733,0.188161,4.27255,4.27255,0.188161,4.2564,4.1877,0.217364,4.17186,4.27255,0.246567,4.2564,4.3574,0.217364,4.34093,4.27255,0.246567,-4.23344,4.18769,0.217364,-4.14937,4.3574,0.217364,-4.31752,4.27255,0.188161,-4.23344,-4.21114,0.246567,-4.27255,-4.12751,0.217364,-4.18769,-4.29477,0.217364,-4.3574,-4.21114,0.188161,-4.27255,4.23323,0.188161,-4.27255,4.3173,0.217364,-4.3574,4.14915,0.217364,-4.1877,4.23323,0.246567,-4.27255,-4.3574,0.217364,-4.31779,-4.27255,0.188161,-4.23371,-4.1877,0.217364,-4.14962,-4.27255,0.246567,-4.23371,-4.27255,0.246567,4.23966,-4.18769,0.217364,4.15546,-4.27255,0.188161,4.23966,-4.3574,0.217364,4.32386,4.91215,-0.22694,-4.91215,4.91215,-0.22694,4.91215,-4.91215,-0.22694,4.91215,-4.91215,-0.22694,-4.91215,4.91215,0.22694,-4.91215,4.91215,0.22694,4.91215,-4.91215,0.22694,4.91215,-4.91215,0.22694,-4.91215,4.86733,-0.22694,-4.91215,4.86733,-0.22694,4.91215,4.86733,0.22694,-4.91215,4.86732,0.22694,4.91215,4.86733,-0.22694,4.87355,4.86732,0.22694,4.87355,-4.87469,0.22694,4.87355,-4.87469,-0.22694,4.87355,-4.87469,0.22694,4.91215,-4.87468,0.22694,-4.91215,-4.87469,-0.22694,4.91215,-4.87468,-0.22694,-4.91215,4.91215,-0.22694,4.87355,-4.91215,-0.22694,4.87355,4.91215,0.22694,4.87355,-4.91215,0.22694,4.87355,-4.87468,-0.22694,-4.87179,4.86733,-0.22694,-4.87179,-4.91215,0.22694,-4.87179,-4.91215,-0.22694,-4.87179,4.86733,0.22694,-4.87178,-4.87468,0.22694,-4.87179,4.91215,-0.22694,-4.87179,4.91215,0.22694,-4.87178,3.94157,0.22694,3.94748,-3.94894,0.22694,3.94748,3.94158,0.22694,-3.94572,-3.94893,0.22694,-3.94572,3.94157,0.0175193,3.94748,-3.94894,0.0175193,3.94748,3.94158,0.0175189,-3.94572,-3.94893,0.0175189,-3.94572,-4.74482,0.22694,-4.87179,-4.74482,-0.22694,-4.87179,-4.74482,0.22694,4.91215,-4.74482,-0.22694,4.91215,-4.74482,-0.22694,-4.91215,-4.74482,0.22694,-4.91215,-4.74482,0.22694,4.87355,-4.74482,-0.22694,4.87355,-3.84375,0.22694,-3.94572,-3.84375,0.22694,3.94748,-3.84375,0.0175189,-3.94572,-3.84375,0.0175193,3.94748,4.86733,0.22694,-4.79998,4.91215,-0.22694,-4.79998,4.91215,0.22694,-4.79998,-4.87468,0.22694,-4.79998,4.86733,-0.22694,4.75511,-4.91215,-0.22694,4.75511,-4.91215,0.22694,4.75511,-4.87469,-0.22694,4.75511,-4.87468,-0.22694,-4.79998,-4.91215,0.22694,-4.79998,-4.91215,-0.22694,-4.79998,4.86733,-0.22694,-4.79998,3.94158,0.22694,-3.88756,-3.94893,0.22694,-3.88756,3.94158,0.0175189,-3.88756,-3.94893,0.0175189,-3.88756,-4.74482,-0.22694,-4.79998,-3.84375,0.0175189,-3.88756,3.8953,0.0175189,-3.88756,4.81019,-0.22694,-4.79998,-3.94894,0.0175193,3.85155,3.94157,0.0175193,3.85156,-3.94894,0.22694,3.85155,3.94157,0.22694,3.85156,3.8953,0.22694,3.94748,3.8953,0.22694,-3.94572,4.81019,0.22694,4.87355,4.8102,0.22694,-4.91215,4.81019,-0.22694,-4.91215,4.81019,-0.22694,4.91215,4.81019,0.22694,4.91215,4.8102,0.22694,-4.87178,4.81019,-0.22694,4.87355,4.81019,-0.22694,-4.87179,3.8953,0.0175193,3.94748,3.8953,0.0175189,-3.94572,-4.87469,0.22694,4.75511,4.91215,0.22694,4.75512,4.91215,-0.22694,4.75511,4.86732,0.22694,4.75512,3.8953,0.0175193,3.85156,-4.74482,-0.22694,4.75511,4.81019,-0.22694,4.75511,-3.84375,0.0175193,3.85155],
"morphTargets" : [],
"normals" : [],
"colors" : [],
"uvs" : [],
"faces" : [3,34,4,5,32,0,3,32,5,6,33,0,3,33,6,7,35,0,3,34,35,7,4,0,3,47,8,9,44,0,3,44,9,10,45,0,3,45,10,11,46,0,3,46,11,8,47,0,3,20,12,13,22,0,3,22,13,14,21,0,3,21,14,15,23,0,3,23,15,12,20,0,3,30,0,1,28,0,3,28,1,2,29,0,3,29,2,3,31,0,3,0,30,31,3,0,3,8,19,17,9,0,3,9,17,18,10,0,3,10,18,16,11,0,3,11,16,19,8,0,3,19,20,22,17,0,3,18,21,23,16,0,3,14,25,24,15,0,3,12,27,26,13,0,3,17,22,21,18,0,3,16,23,20,19,0,3,13,26,25,14,0,3,15,24,27,12,0,3,27,30,28,26,0,3,26,28,29,25,0,3,25,29,31,24,0,3,24,31,30,27,0,3,1,39,38,2,0,3,0,3,36,37,0,3,37,34,32,39,0,3,2,38,36,3,0,3,37,36,35,34,0,3,38,33,35,36,0,3,0,37,39,1,0,3,39,32,33,38,0,3,4,40,43,5,0,3,5,43,42,6,0,3,6,42,41,7,0,3,7,41,40,4,0,3,41,46,47,40,0,3,40,47,44,43,0,3,42,45,46,41,0,3,43,44,45,42,0,3,63,66,50,69,1,3,62,71,54,64,1,3,68,70,53,49,1,3,66,64,54,50,1,3,75,74,55,51,1,3,65,67,51,55,1,3,68,49,57,60,1,3,70,61,59,53,1,3,49,53,59,57,1,3,52,48,56,58,1,3,93,92,67,65,1,3,100,76,82,112,1,3,94,62,64,90,1,3,91,90,64,66,1,3,141,95,63,107,1,3,138,68,60,104,1,3,95,91,66,63,1,3,136,106,71,62,1,3,50,54,71,69,1,3,107,63,69,105,1,3,138,137,70,68,1,3,137,139,61,70,1,3,92,89,72,67,1,3,48,78,73,56,1,3,65,55,74,77,1,3,110,109,74,75,1,3,48,52,79,78,1,3,93,65,77,88,1,3,67,72,75,51,1,3,52,58,76,79,1,3,124,80,84,134,1,3,88,77,83,96,1,3,126,61,80,124,1,3,136,62,81,122,1,3,143,120,85,99,1,3,112,82,86,114,1,3,122,81,85,120,1,3,96,83,87,98,1,3,127,128,92,93,1,3,126,94,90,130,1,3,129,130,90,91,1,3,142,132,95,141,1,3,132,129,91,95,1,3,128,133,89,92,1,3,127,93,88,131,1,3,81,97,99,85,1,3,131,88,96,125,1,3,62,94,97,81,1,3,140,143,99,134,1,3,125,96,98,135,1,3,79,76,100,102,1,3,78,101,111,73,1,3,61,126,130,59,1,3,82,125,135,86,1,3,135,98,117,118,1,3,83,113,115,87,1,3,103,109,106,136,1,3,104,60,132,142,1,3,73,111,119,133,1,3,72,108,110,75,1,3,58,127,131,76,1,3,60,57,129,132,1,3,111,104,142,119,1,3,56,73,133,128,1,3,105,106,109,110,1,3,121,140,134,84,1,3,76,131,125,82,1,3,101,102,137,138,1,3,94,126,124,97,1,3,97,124,134,99,1,3,58,56,128,127,1,3,57,59,130,129,1,3,89,116,108,72,1,3,139,100,112,123,1,3,77,74,109,103,1,3,61,139,123,80,1,3,98,87,115,117,1,3,86,135,118,114,1,3,123,112,114,121,1,3,77,103,113,83,1,3,133,119,116,89,1,3,116,141,107,108,1,3,78,79,102,101,1,3,103,136,122,113,1,3,114,118,140,121,1,3,119,142,141,116,1,3,102,100,139,137,1,3,69,71,106,105,1,3,118,117,143,140,1,3,101,138,104,111,1,3,108,107,105,110,1,3,117,115,120,143,1,3,113,122,120,115,1,3,80,123,121,84,1],
"bones" : [],
"skinIndices" : [],
"skinWeights" : [],
"animation" : {}
}

View file

@ -0,0 +1,106 @@
{
"metadata" :
{
"formatVersion" : 3.1,
"generatedBy" : "Blender 2.63 Exporter",
"vertices" : 40,
"faces" : 30,
"normals" : 25,
"colors" : 0,
"uvs" : [4],
"materials" : 1,
"morphTargets" : 0,
"bones" : 0
},
"scale" : 1.000000,
"materials" : [ {
"DbgColor" : 15658734,
"DbgIndex" : 0,
"DbgName" : "boomer",
"blending" : "NormalBlending",
"colorDiffuse" : [0.0, 0.0, 0.0],
"colorSpecular" : [0.5, 0.5, 0.5],
"depthTest" : true,
"depthWrite" : true,
"shading" : "Phong",
"specularCoef" : 50,
"opacity" : 0.4078947901725769,
"transparent" : true,
"vertexColors" : false
},
{
"DbgColor" : 15597568,
"DbgIndex" : 1,
"DbgName" : "boomer",
"blending" : "NormalBlending",
"colorDiffuse" : [0.0, 0.0, 0.0],
"colorSpecular" : [0.5, 0.5, 0.5],
"depthTest" : true,
"depthWrite" : true,
"shading" : "Phong",
"specularCoef" : 50,
"opacity" : 0.4078947901725769,
"transparent" : true,
"vertexColors" : false
},
{
"DbgColor" : 15597568,
"DbgIndex" : 1,
"DbgName" : "screen",
"blending" : "NormalBlending",
"colorDiffuse" : [0.6400000190734865, 0.6400000190734865, 0.6400000190734865],
"colorSpecular" : [0.5, 0.5, 0.5],
"depthTest" : true,
"depthWrite" : true,
"mapDiffuse" : "web cam exp.png",
"mapDiffuseWrap" : ["repeat", "repeat"],
"shading" : "Lambert",
"specularCoef" : 50,
"opacity" : 1.0,
"transparent" : false,
"vertexColors" : false
},
{
"DbgColor" : 15597568,
"DbgIndex" : 1,
"DbgName" : "tv",
"blending" : "NormalBlending",
"colorDiffuse" : [0.5987105458782693, 0.5987105458782693, 0.5987105458782693],
"colorSpecular" : [0.5, 0.5, 0.5],
"depthTest" : true,
"depthWrite" : true,
"shading" : "Phong",
"specularCoef" : 50,
"opacity" : 1.0,
"transparent" : false,
"vertexColors" : false
}],
"vertices" : [-3.68245,-2.01212,0.0795976,-3.68245,-2.01212,0.0524519,-2.81895,-2.01212,0.0524519,-2.81895,-2.01212,0.0795976,-3.68245,2.01625,0.0795974,-3.68245,2.01625,0.0524517,-2.81895,2.01625,0.0524517,-2.81895,2.01625,0.0795974,2.81039,-2.01212,0.0795976,2.81039,-2.01212,0.0524519,3.6739,-2.01212,0.0524519,3.6739,-2.01212,0.0795976,2.81039,2.01625,0.0795974,2.81039,2.01625,0.0524517,3.6739,2.01625,0.0524517,3.6739,2.01625,0.0795974,2.64,-1.98,2.36034e-07,-2.64,-1.98,2.36034e-07,2.64,1.98,-2.36034e-07,-2.64,1.98,-2.36034e-07,3.82625,-2.13557,-0.289245,3.82625,-2.13557,-0.0393809,-3.82625,-2.13557,-0.0393809,-3.82625,-2.13557,-0.289245,3.82625,2.13557,-0.289245,3.82625,2.13557,-0.039381,-3.82625,2.13557,-0.0393811,-3.82625,2.13557,-0.289245,3.77209,-2.10534,0.0599642,-3.77209,-2.10534,0.0599642,3.77208,2.10534,0.0599641,-3.77209,2.10534,0.059964,2.65786,-1.99983,0.0599642,-2.65786,-1.99983,0.0599642,2.65786,1.99983,0.0599641,-2.65786,1.99983,0.059964,2.65786,-1.99983,-0.0136972,-2.65786,-1.99983,-0.0136972,2.65786,1.99983,-0.0136973,-2.65786,1.99983,-0.0136974],
"morphTargets" : [],
"normals" : [-0.577349,-0.577349,-0.577349,-0.577349,-0.577349,0.577349,-0.577349,0.577349,0.577349,-0.577349,0.577349,-0.577349,0.577349,0.577349,-0.577349,0.577349,-0.577349,-0.577349,0.577349,0.577349,0.577349,0.577349,-0.577349,0.577349,0,0,1,0.707083,-0.707083,0,0.699576,-0.672018,0.242775,-0.699576,-0.672018,0.242775,-0.707083,-0.707083,0,0.707083,0.707083,0,-0.707083,0.707083,0,-0.699576,0.672018,0.242775,0.699576,0.672018,0.242775,0.405774,-0.495163,0.768181,-0.405774,-0.495163,0.768181,-0.405774,0.495163,0.768181,0.301492,0.301492,0.904508,0.301492,-0.301492,0.904508,0.405774,0.495163,0.768181,-0.301492,-0.301492,0.904508,-0.301492,0.301492,0.904508],
"colors" : [],
"uvs" : [[0,0,1,0,1,1,0,1]],
"faces" : [35,1,0,4,5,0,0,1,2,3,35,5,6,2,1,0,3,4,5,0,35,6,7,3,2,0,4,6,7,5,35,0,3,7,4,0,1,7,6,2,35,0,1,2,3,0,1,0,5,7,35,7,6,5,4,0,6,4,3,2,35,9,8,12,13,1,0,1,2,3,35,13,14,10,9,1,3,4,5,0,35,14,15,11,10,1,4,6,7,5,35,8,11,15,12,1,1,7,6,2,35,8,9,10,11,1,1,0,5,7,35,15,14,13,12,1,6,4,3,2,43,17,16,18,19,2,0,1,2,3,8,8,8,8,35,20,21,22,23,3,9,10,11,12,35,24,27,26,25,3,13,14,15,16,35,20,24,25,21,3,9,13,16,10,35,22,21,28,29,3,11,10,17,18,35,22,26,27,23,3,11,15,14,12,35,31,29,33,35,3,19,18,20,21,35,21,25,30,28,3,10,16,22,17,35,26,22,29,31,3,15,11,18,19,35,25,26,31,30,3,16,15,19,22,35,35,33,37,39,3,21,20,6,7,35,30,31,35,34,3,22,19,21,23,35,29,28,32,33,3,18,17,24,20,35,28,30,34,32,3,17,22,23,24,35,36,38,39,37,3,2,1,7,6,35,34,35,39,38,3,23,21,7,1,35,33,32,36,37,3,20,24,2,6,35,32,34,38,36,3,24,23,1,2],
"bones" : [],
"skinIndices" : [],
"skinWeights" : [],
"animation" : {}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 163 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 163 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

View file

@ -0,0 +1,59 @@
{
"metadata" :
{
"formatVersion" : 3.1,
"generatedBy" : "Blender 2.63 Exporter",
"vertices" : 64,
"faces" : 92,
"normals" : 64,
"colors" : 0,
"uvs" : [36],
"materials" : 1,
"morphTargets" : 0,
"bones" : 0
},
"scale" : 1.000000,
"materials" : [ {
"DbgColor" : 15658734,
"DbgIndex" : 0,
"DbgName" : "ocean",
"blending" : "NormalBlending",
"colorDiffuse" : [0.800000011920929, 0.800000011920929, 0.800000011920929],
"colorSpecular" : [0.0486111044883728, 0.0486111044883728, 0.0486111044883728],
"depthTest" : true,
"depthWrite" : true,
"mapDiffuse" : "ground-texture.jpg",
"mapDiffuseRepeat" : [50, 50],
"mapDiffuseWrap" : ["repeat", "repeat"],
"shading" : "Phong",
"specularCoef" : 50,
"opacity" : 1.0,
"transparent" : false,
"vertexColors" : false
}],
"vertices" : [0,-0.0123162,-1,0,0.0123161,-1,0.19509,-0.0123162,-0.980785,0.19509,0.0123161,-0.980785,0.382683,-0.0123162,-0.92388,0.382683,0.0123161,-0.92388,0.55557,-0.0123162,-0.83147,0.55557,0.0123161,-0.83147,0.707107,-0.0123162,-0.707107,0.707107,0.0123161,-0.707107,0.83147,-0.0123162,-0.55557,0.83147,0.0123161,-0.55557,0.92388,-0.0123162,-0.382683,0.92388,0.0123162,-0.382683,0.980785,-0.0123162,-0.19509,0.980785,0.0123162,-0.19509,1,-0.0123162,-7.49595e-08,1,0.0123162,-7.60363e-08,0.980785,-0.0123162,0.19509,0.980785,0.0123162,0.19509,0.92388,-0.0123162,0.382683,0.92388,0.0123162,0.382683,0.83147,-0.0123161,0.55557,0.83147,0.0123162,0.55557,0.707107,-0.0123161,0.707107,0.707107,0.0123162,0.707107,0.55557,-0.0123161,0.83147,0.55557,0.0123162,0.83147,0.382683,-0.0123161,0.92388,0.382683,0.0123162,0.92388,0.19509,-0.0123161,0.980785,0.19509,0.0123162,0.980785,-3.25841e-07,-0.0123161,1,-3.25841e-07,0.0123162,1,-0.195091,-0.0123161,0.980785,-0.195091,0.0123162,0.980785,-0.382684,-0.0123161,0.923879,-0.382684,0.0123162,0.923879,-0.555571,-0.0123161,0.831469,-0.555571,0.0123162,0.831469,-0.707107,-0.0123161,0.707106,-0.707107,0.0123162,0.707106,-0.83147,-0.0123161,0.55557,-0.83147,0.0123162,0.55557,-0.92388,-0.0123162,0.382683,-0.92388,0.0123162,0.382683,-0.980785,-0.0123162,0.195089,-0.980785,0.0123162,0.195089,-1,-0.0123162,-9.65061e-07,-1,0.0123162,-9.66137e-07,-0.980785,-0.0123162,-0.195091,-0.980785,0.0123162,-0.195091,-0.923879,-0.0123162,-0.382684,-0.923879,0.0123162,-0.382684,-0.831469,-0.0123162,-0.555571,-0.831469,0.0123161,-0.555571,-0.707106,-0.0123162,-0.707108,-0.707106,0.0123161,-0.707108,-0.555569,-0.0123162,-0.83147,-0.555569,0.0123161,-0.83147,-0.382682,-0.0123162,-0.92388,-0.382682,0.0123161,-0.92388,-0.195089,-0.0123162,-0.980786,-0.195089,0.0123161,-0.980786],
"morphTargets" : [],
"normals" : [0,-0.68569,-0.727866,0,0.68569,-0.727866,0.142003,0.68569,-0.713889,0.142003,-0.68569,-0.713889,0.278542,0.68569,-0.672475,0.278542,-0.68569,-0.672475,0.40437,0.68569,-0.605213,0.40437,-0.68569,-0.605213,0.514664,0.68569,-0.514664,0.514664,-0.68569,-0.514664,0.605213,0.68569,-0.40437,0.605213,-0.68569,-0.40437,0.672475,0.68569,-0.278542,0.672475,-0.68569,-0.278542,0.713889,0.68569,-0.142003,0.713889,-0.68569,-0.142003,0.727866,0.68569,0,0.727866,-0.68569,0,0.713889,0.68569,0.142003,0.713889,-0.68569,0.142003,0.672475,0.68569,0.278542,0.672475,-0.68569,0.278542,0.605213,0.68569,0.40437,0.605213,-0.68569,0.40437,0.514664,0.68569,0.514664,0.514664,-0.68569,0.514664,0.40437,0.68569,0.605213,0.40437,-0.68569,0.605213,0.278542,0.68569,0.672475,0.278542,-0.68569,0.672475,0.142003,0.68569,0.713889,0.142003,-0.68569,0.713889,0,0.68569,0.727866,0,-0.68569,0.727866,-0.142003,0.68569,0.713889,-0.142003,-0.68569,0.713889,-0.278542,0.68569,0.672475,-0.278542,-0.68569,0.672475,-0.40437,0.68569,0.605213,-0.40437,-0.68569,0.605213,-0.514664,0.68569,0.514664,-0.514664,-0.68569,0.514664,-0.605213,0.68569,0.40437,-0.605213,-0.68569,0.40437,-0.672475,0.68569,0.278542,-0.672475,-0.68569,0.278542,-0.713889,0.68569,0.142003,-0.713889,-0.68569,0.142003,-0.727866,0.68569,0,-0.727866,-0.68569,0,-0.713889,0.68569,-0.142003,-0.713889,-0.68569,-0.142003,-0.672475,0.68569,-0.278542,-0.672475,-0.68569,-0.278542,-0.605213,0.68569,-0.40437,-0.605213,-0.68569,-0.40437,-0.514664,0.68569,-0.514695,-0.514664,-0.68569,-0.514695,-0.40437,0.68569,-0.605213,-0.40437,-0.68569,-0.605213,-0.278542,0.68569,-0.672475,-0.278542,-0.68569,-0.672475,-0.142003,0.68569,-0.713889,-0.142003,-0.68569,-0.713889],
"colors" : [],
"uvs" : [[0,0,1,0,1,1,0,1,0.5,0,0.402455,0.009607,0.308658,0.03806,0.222215,0.084265,0.597545,0.009607,0.146446,0.146447,0.691342,0.03806,0.084265,0.222215,0.777785,0.084265,0.03806,0.308659,0.853553,0.146447,0.009607,0.402455,0.915735,0.222215,0,0.5,0.96194,0.308658,0.009607,0.597546,0.990393,0.402455,0.03806,0.691342,1,0.5,0.084266,0.777786,0.990393,0.597545,0.146447,0.853554,0.96194,0.691342,0.222215,0.915735,0.915735,0.777785,0.308659,0.96194,0.853553,0.853553,0.402456,0.990393,0.777785,0.915735,0.5,1,0.691342,0.96194,0.597545,0.990393]],
"faces" : [43,0,1,3,2,0,0,1,2,3,0,1,2,3,43,2,3,5,4,0,0,1,2,3,3,2,4,5,43,4,5,7,6,0,0,1,2,3,5,4,6,7,43,6,7,9,8,0,0,1,2,3,7,6,8,9,43,8,9,11,10,0,0,1,2,3,9,8,10,11,43,10,11,13,12,0,0,1,2,3,11,10,12,13,43,12,13,15,14,0,0,1,2,3,13,12,14,15,43,14,15,17,16,0,0,1,2,3,15,14,16,17,43,16,17,19,18,0,0,1,2,3,17,16,18,19,43,18,19,21,20,0,0,1,2,3,19,18,20,21,43,20,21,23,22,0,0,1,2,3,21,20,22,23,43,22,23,25,24,0,0,1,2,3,23,22,24,25,43,24,25,27,26,0,0,1,2,3,25,24,26,27,43,26,27,29,28,0,0,1,2,3,27,26,28,29,43,28,29,31,30,0,0,1,2,3,29,28,30,31,43,30,31,33,32,0,0,1,2,3,31,30,32,33,43,32,33,35,34,0,0,1,2,3,33,32,34,35,43,34,35,37,36,0,0,1,2,3,35,34,36,37,43,36,37,39,38,0,0,1,2,3,37,36,38,39,43,38,39,41,40,0,0,1,2,3,39,38,40,41,43,40,41,43,42,0,0,1,2,3,41,40,42,43,43,42,43,45,44,0,0,1,2,3,43,42,44,45,43,44,45,47,46,0,0,1,2,3,45,44,46,47,43,46,47,49,48,0,0,1,2,3,47,46,48,49,43,48,49,51,50,0,0,1,2,3,49,48,50,51,43,50,51,53,52,0,0,1,2,3,51,50,52,53,43,52,53,55,54,0,0,1,2,3,53,52,54,55,43,54,55,57,56,0,0,1,2,3,55,54,56,57,43,56,57,59,58,0,0,1,2,3,57,56,58,59,43,58,59,61,60,0,0,1,2,3,59,58,60,61,42,35,33,31,0,4,5,6,34,32,30,42,35,31,29,0,4,6,7,34,30,28,42,37,35,29,0,8,4,7,36,34,28,42,37,29,27,0,8,7,9,36,28,26,42,39,37,27,0,10,8,9,38,36,26,42,39,27,25,0,10,9,11,38,26,24,42,41,39,25,0,12,10,11,40,38,24,42,41,25,23,0,12,11,13,40,24,22,42,43,41,23,0,14,12,13,42,40,22,42,43,23,21,0,14,13,15,42,22,20,42,45,43,21,0,16,14,15,44,42,20,42,45,21,19,0,16,15,17,44,20,18,42,47,45,19,0,18,16,17,46,44,18,42,47,19,17,0,18,17,19,46,18,16,42,49,47,17,0,20,18,19,48,46,16,42,49,17,15,0,20,19,21,48,16,14,42,51,49,15,0,22,20,21,50,48,14,42,51,15,13,0,22,21,23,50,14,12,42,53,51,13,0,24,22,23,52,50,12,42,53,13,11,0,24,23,25,52,12,10,42,55,53,11,0,26,24,25,54,52,10,42,55,11,9,0,26,25,27,54,10,8,42,57,55,9,0,28,26,27,56,54,8,42,57,9,7,0,28,27,29,56,8,6,42,59,57,7,0,30,28,29,58,56,6,42,59,7,5,0,30,29,31,58,6,4,42,61,59,5,0,32,30,31,60,58,4,42,3,61,5,0,33,32,31,2,60,4,42,3,63,61,0,33,34,32,2,62,60,42,3,1,63,0,33,35,34,2,1,62,43,1,0,62,63,0,2,3,0,1,1,0,63,62,43,60,61,63,62,0,0,1,2,3,61,60,62,63,42,30,32,34,0,8,4,5,31,33,35,42,28,30,34,0,10,8,5,29,31,35,42,28,34,36,0,10,5,6,29,35,37,42,26,28,36,0,12,10,6,27,29,37,42,26,36,38,0,12,6,7,27,37,39,42,24,26,38,0,14,12,7,25,27,39,42,24,38,40,0,14,7,9,25,39,41,42,22,24,40,0,16,14,9,23,25,41,42,22,40,42,0,16,9,11,23,41,43,42,20,22,42,0,18,16,11,21,23,43,42,20,42,44,0,18,11,13,21,43,45,42,18,20,44,0,20,18,13,19,21,45,42,18,44,46,0,20,13,15,19,45,47,42,16,18,46,0,22,20,15,17,19,47,42,16,46,48,0,22,15,17,17,47,49,42,14,16,48,0,24,22,17,15,17,49,42,14,48,50,0,24,17,19,15,49,51,42,12,14,50,0,26,24,19,13,15,51,42,12,50,52,0,26,19,21,13,51,53,42,10,12,52,0,28,26,21,11,13,53,42,10,52,54,0,28,21,23,11,53,55,42,8,10,54,0,30,28,23,9,11,55,42,8,54,56,0,30,23,25,9,55,57,42,6,8,56,0,32,30,25,7,9,57,42,6,56,58,0,32,25,27,7,57,59,42,4,6,58,0,34,32,27,5,7,59,42,4,58,60,0,34,27,29,5,59,61,42,2,4,60,0,35,34,29,3,5,61,42,2,60,62,0,35,29,31,3,61,63,42,0,2,62,0,33,35,31,0,3,63],
"bones" : [],
"skinIndices" : [],
"skinWeights" : [],
"animation" : {}
}

View file

@ -0,0 +1,47 @@
{
"metadata" :
{
"formatVersion" : 3.1,
"generatedBy" : "Blender 2.63 Exporter",
"vertices" : 42,
"faces" : 80,
"normals" : 42,
"colors" : 0,
"uvs" : [],
"materials" : 1,
"morphTargets" : 0,
"bones" : 0
},
"scale" : 1.000000,
"materials" : [ {
"DbgColor" : 15658734,
"DbgIndex" : 0,
"DbgName" : "default",
"vertexColors" : false
}],
"vertices" : [0,-1,4.37114e-08,0.723607,-0.447219,0.525725,-0.276388,-0.44722,0.850649,-0.894426,-0.447216,1.95484e-08,-0.276388,-0.44722,-0.850649,0.723607,-0.44722,-0.525725,0.276388,0.44722,0.850649,-0.723607,0.44722,0.525725,-0.723607,0.447219,-0.525725,0.276388,0.44722,-0.850649,0.894426,0.447216,-1.95484e-08,0,1,-4.37114e-08,0.425323,-0.850654,0.309011,0.262869,-0.525738,0.809012,-0.162456,-0.850654,0.499995,0.425323,-0.850654,-0.309011,0.850648,-0.525736,2.29806e-08,-0.688189,-0.525736,0.499997,-0.52573,-0.850652,3.71832e-08,-0.688189,-0.525736,-0.499997,-0.162456,-0.850654,-0.499995,0.262869,-0.525738,-0.809012,0.951058,-1.35074e-08,-0.309013,0.951058,1.35074e-08,0.309013,0.587786,3.53632e-08,0.809017,0,4.37114e-08,1,-0.587786,3.53632e-08,0.809017,-0.951058,1.35074e-08,0.309013,-0.951058,-1.35074e-08,-0.309013,-0.587786,-3.53632e-08,-0.809017,0,-4.37114e-08,-1,0.587786,-3.53632e-08,-0.809017,0.688189,0.525736,0.499997,-0.262869,0.525738,0.809012,-0.850648,0.525736,-2.29806e-08,-0.262869,0.525738,-0.809012,0.688189,0.525736,-0.499997,0.52573,0.850652,-3.71832e-08,0.162456,0.850654,0.499995,-0.425323,0.850654,0.309011,-0.425323,0.850654,-0.309011,0.162456,0.850654,-0.499995],
"morphTargets" : [],
"normals" : [0,-1,0,0.425306,-0.850642,0.309,-0.16245,-0.850642,0.499985,0.723594,-0.447188,0.525712,0.850642,-0.525712,0,-0.525712,-0.850642,0,-0.16245,-0.850642,-0.499985,0.425306,-0.850642,-0.309,0.951048,0,0.309,-0.276376,-0.447218,0.850642,0.262856,-0.525712,0.808985,0,0,1,-0.894406,-0.447188,0,-0.688162,-0.525712,0.499985,-0.951048,0,0.309,-0.276376,-0.447218,-0.850642,-0.688162,-0.525712,-0.499985,-0.587756,0,-0.809015,0.723594,-0.447188,-0.525712,0.262856,-0.525712,-0.808985,0.587756,0,-0.809015,0.587756,0,0.809015,-0.587756,0,0.809015,-0.951048,0,-0.309,0,0,-1,0.951048,0,-0.309,0.276376,0.447218,0.850642,0.688162,0.525712,0.499985,0.16245,0.850642,0.499985,-0.723594,0.447188,0.525712,-0.262856,0.525712,0.808985,-0.425306,0.850642,0.309,-0.723594,0.447188,-0.525712,-0.850642,0.525712,0,-0.425306,0.850642,-0.309,0.276376,0.447218,-0.850642,-0.262856,0.525712,-0.808985,0.16245,0.850642,-0.499985,0.894406,0.447188,0,0.688162,0.525712,-0.499985,0.525712,0.850642,0,0,1,0],
"colors" : [],
"uvs" : [],
"faces" : [34,0,12,14,0,0,1,2,34,1,12,16,0,3,1,4,34,0,14,18,0,0,2,5,34,0,18,20,0,0,5,6,34,0,20,15,0,0,6,7,34,1,16,23,0,3,4,8,34,2,13,25,0,9,10,11,34,3,17,27,0,12,13,14,34,4,19,29,0,15,16,17,34,5,21,31,0,18,19,20,34,1,23,24,0,3,8,21,34,2,25,26,0,9,11,22,34,3,27,28,0,12,14,23,34,4,29,30,0,15,17,24,34,5,31,22,0,18,20,25,34,6,32,38,0,26,27,28,34,7,33,39,0,29,30,31,34,8,34,40,0,32,33,34,34,9,35,41,0,35,36,37,34,10,36,37,0,38,39,40,34,14,13,2,0,2,10,9,34,14,12,13,0,2,1,10,34,12,1,13,0,1,3,10,34,16,15,5,0,4,7,18,34,16,12,15,0,4,1,7,34,12,0,15,0,1,0,7,34,18,17,3,0,5,13,12,34,18,14,17,0,5,2,13,34,14,2,17,0,2,9,13,34,20,19,4,0,6,16,15,34,20,18,19,0,6,5,16,34,18,3,19,0,5,12,16,34,15,21,5,0,7,19,18,34,15,20,21,0,7,6,19,34,20,4,21,0,6,15,19,34,23,22,10,0,8,25,38,34,23,16,22,0,8,4,25,34,16,5,22,0,4,18,25,34,25,24,6,0,11,21,26,34,25,13,24,0,11,10,21,34,13,1,24,0,10,3,21,34,27,26,7,0,14,22,29,34,27,17,26,0,14,13,22,34,17,2,26,0,13,9,22,34,29,28,8,0,17,23,32,34,29,19,28,0,17,16,23,34,19,3,28,0,16,12,23,34,31,30,9,0,20,24,35,34,31,21,30,0,20,19,24,34,21,4,30,0,19,15,24,34,24,32,6,0,21,27,26,34,24,23,32,0,21,8,27,34,23,10,32,0,8,38,27,34,26,33,7,0,22,30,29,34,26,25,33,0,22,11,30,34,25,6,33,0,11,26,30,34,28,34,8,0,23,33,32,34,28,27,34,0,23,14,33,34,27,7,34,0,14,29,33,34,30,35,9,0,24,36,35,34,30,29,35,0,24,17,36,34,29,8,35,0,17,32,36,34,22,36,10,0,25,39,38,34,22,31,36,0,25,20,39,34,31,9,36,0,20,35,39,34,38,37,11,0,28,40,41,34,38,32,37,0,28,27,40,34,32,10,37,0,27,38,40,34,39,38,11,0,31,28,41,34,39,33,38,0,31,30,28,34,33,6,38,0,30,26,28,34,40,39,11,0,34,31,41,34,40,34,39,0,34,33,31,34,34,7,39,0,33,29,31,34,41,40,11,0,37,34,41,34,41,35,40,0,37,36,34,34,35,8,40,0,36,32,34,34,37,41,11,0,40,37,41,34,37,36,41,0,40,39,37,34,36,9,41,0,39,35,37],
"bones" : [],
"skinIndices" : [],
"skinWeights" : [],
"animation" : {}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 197 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 197 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View file

@ -0,0 +1,62 @@
{
"metadata" :
{
"formatVersion" : 3.1,
"generatedBy" : "Blender 2.63 Exporter",
"vertices" : 20,
"faces" : 18,
"normals" : 20,
"colors" : 0,
"uvs" : [33],
"materials" : 1,
"morphTargets" : 0,
"bones" : 0
},
"scale" : 1.000000,
"materials" : [ {
"DbgColor" : 15658734,
"DbgIndex" : 0,
"DbgName" : "Material",
"blending" : "NormalBlending",
"colorDiffuse" : [0.6400000190734865, 0.6400000190734865, 0.6400000190734865],
"colorSpecular" : [0.8, 0.8, 0.8],
"depthTest" : true,
"depthWrite" : true,
"mapDiffuse" : "wood-texture.jpg",
"mapDiffuseWrap" : ["repeat", "repeat"],
"mapDiffuseRepeat" : [5, 5],
"mapSpecular" : "wood-texture.jpg",
"mapSpecularWrap" : ["repeat", "repeat"],
"mapSpecularRepeat" : [5, 5],
"shading" : "Phong",
"specularCoef" : 50,
"opacity" : 1.0,
"transparent" : false,
"vertexColors" : false
}],
"vertices" : [2.5,-0.0905001,-2.5,2.5,-0.0904999,2.5,-2.5,-0.0904999,2.5,-2.5,-0.0905001,-2.5,2.5,0.0904999,-2.5,2.5,0.0905001,2.5,-2.5,0.0905001,2.5,-2.5,0.0904999,-2.5,2.4875,0.114493,-2.4875,2.4875,0.114494,2.4875,-2.4875,0.114494,2.4875,-2.4875,0.114493,-2.4875,2.46263,0.150374,-2.46262,2.46262,0.150374,2.46263,-2.46262,0.150374,2.46262,-2.46262,0.150374,-2.46262,2.475,-0.126776,-2.475,2.475,-0.126776,2.475,-2.475,-0.126776,2.475,-2.475,-0.126776,-2.475],
"morphTargets" : [],
"normals" : [0.66802,-0.327799,-0.66802,0.66802,-0.327799,0.66802,0.371258,-0.85107,0.371258,0.371258,-0.85107,-0.371258,0.679434,0.276925,-0.679434,-0.679434,0.276925,-0.679434,-0.547685,0.632466,-0.547685,0.547685,0.632466,-0.547685,0.679434,0.276925,0.679434,-0.679434,0.276925,0.679434,-0.66802,-0.327799,0.66802,-0.66802,-0.327799,-0.66802,-0.547685,0.632466,0.547685,-0.370159,0.852016,0.370159,-0.370159,0.852016,-0.370159,0.547685,0.632466,0.547685,0.370159,0.852016,-0.370159,0.370159,0.852016,0.370159,-0.371258,-0.85107,0.371258,-0.371258,-0.85107,-0.371258],
"colors" : [],
"uvs" : [[0.336969,0.946356,0.336969,0.048872,0.387407,0.048872,0.387407,0.946356,0.086341,0.946356,0.086341,0.049949,0.053154,0.049949,0.053154,0.946356,0.086341,0.048872,0.336969,0.046397,0.086341,0.046397,0.086341,0.945928,0.336969,0.945928,0.336969,0.049949,0.053154,0.945928,0.003472,0.945928,0.003472,0.049949,0.053154,0.046397,0.053154,0.048872,0.999939,0.992014,0.394095,0.992014,0.394095,0.38617,0.999938,0.38617,0.003472,0.946356,0.003472,0.048872,0.003472,0.046397,0.890783,0.380278,0.517288,0.380277,0.517288,0.006783,0.890783,0.006783,0.387407,0.049949,0.387407,0.945928,0.387407,0.046397]],
"faces" : [43,0,1,17,16,0,0,1,2,3,0,1,2,3,43,4,7,11,8,0,4,5,6,7,4,5,6,7,43,0,4,5,1,0,0,4,8,1,0,4,8,1,43,1,5,6,2,0,9,10,11,12,1,8,9,10,43,2,6,7,3,0,12,11,5,13,10,9,5,11,43,4,0,3,7,0,4,0,13,5,4,0,11,5,43,11,10,14,15,0,6,14,15,16,6,12,13,14,43,6,5,9,10,0,11,10,17,14,9,8,15,12,43,7,6,10,11,0,5,11,14,6,5,9,12,6,43,5,4,8,9,0,8,4,7,18,8,4,7,15,43,12,15,14,13,0,19,20,21,22,16,14,13,17,43,9,8,12,13,0,18,7,23,24,15,7,16,17,43,8,11,15,12,0,7,6,16,23,7,6,14,16,43,10,9,13,14,0,14,17,25,15,12,15,17,13,43,16,17,18,19,0,26,27,28,29,3,2,18,19,43,3,0,16,19,0,13,0,3,30,11,0,3,19,43,2,3,19,18,0,12,13,30,31,10,11,19,18,43,1,2,18,17,0,9,12,31,32,1,10,18,2],
"bones" : [],
"skinIndices" : [],
"skinWeights" : [],
"animation" : {}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 163 B

View file

@ -0,0 +1,40 @@
<p>Les joueurs jouent chacun leur tour en ajoutant une boule de leur couleur sur n'importe quelle position libre sur le plateau
ou sur une plateforme 2x2 formée par 4 autres boules.</p>
<p>Les boules d'une même couleur forment des groupes en se touchant. Dans la figure en dessous, les 5 boules blanches forment un groupe,
la boule isolée en bas à droite, un autre groupe.</p>
<table><tr>
<td style="text-align: center;"><img src="{GAME}/res/rules/spargo-groups.png"/></td>
</tr></table>
<p>Un groupe de boules doit toujours avoir au moins une position libre adjacente au niveau du plateau. Sinon, toutes les boules formant le groupe
sont retirées, excepté celles qui ont une boule adverse au-dessus d'elles. Dans la figure suivante, si blanc ajoute une boule dans le coin en haut à gauche,
les 3 boules noires autour seront retirées.</p>
<table><tr>
<td style="text-align: center;"><img src="{GAME}/res/rules/spargo-capture.png"/></td>
</tr></table>
<p>Comme au Go, la règle du Ko s'applique: il est interdit d'ajouter une boule si cela résulte en une configuration de jeu déjà rencontrée
à un tour précédent. Dans la figure de gauche en dessous, les blancs jouent dans le coin en haut à gauche, générant la configuration de la figure de droite.
Au tour suivant, noir ne pourra pas jouer le 2eme rang, 1ere colonne, sinon on rebouclerait sur la première figure.</p>
<table><tr>
<td style="text-align: center;"><img src="{GAME}/res/rules/spargo-ko1.png"/></td>
<td style="text-align: center;"><img src="{GAME}/res/rules/spargo-ko2.png"/></td>
</tr></table>
<p>Le suicide n'est pas permis: un joueur ne peut poser une boule qui résulterait en la suppression d'une ou plusieurs de ses boules.</p>
<p>Coupures: seules les connections visibles sont considérées. Donc dans la figure suivante, la connection blanche du dessus (visible) casse la connection noire
du dessous (invisible). Au final, il y a 2 groupes noirs et un blanc.</p>
<table><tr>
<td style="text-align: center;"><img src="{GAME}/res/rules/spargo-overpass.png"/></td>
</tr></table>
<p>Quand un joueur ne peut plus poser de boule, le vainqueur est celui qui a le plus de boules de sa couleur.</p>
<p>Plus d'information sur <a href="http://www.cameronius.com/games/margo/" target="_blank">le site officiel de Margo</a> et/ou
lisez le livre <a href="http://www.cameronius.com/games/margo/margo-basics-41.pdf" target="_blank">Margo Basics</a>.</p>

View file

@ -0,0 +1,17 @@
<p>Spline is a simple N-in-a-row game that exploits the pyramidal stacking to guarantee a winner.</p>
<p>The board starts empty. Two players, White and Black, takes turns placing a ball of their colour either on an empty board hole or to stack on any 2x2 platform.</p>
<p><b>Aim</b>: A player wins by making a full line, orthogonally or diagonally, on any level. That is, lines on the 4x4 (board) level must be of length 4,
lines on the 3x3 level must be of length 3, and lines on the 2x2 level must be of length 2.</p>
<p>The following diagrams show completed games won by White with 3-in-a-row (left) and Black with 2-in-a-row (right).</p>
<table><tr>
<td style="text-align: center;"><img src="{GAME}/res/rules/spline-win1.png"/></td>
<td style="text-align: center;"><img src="{GAME}/res/rules/spline-win2.png"/></td>
</tr></table>
<p>Every game is guaranteed to produce a winner before the board fills up, as any two balls of the same colour on the penultimate level (2x2) must necessarily form a line.</p>
<p>Spline expresses shibumi in its simple rules, intuitive nature and guaranteed result.</p>

View file

@ -0,0 +1,17 @@
<p>Spline+ is a simple N-in-a-row game that exploits the pyramidal stacking to guarantee a winner.</p>
<p>The board starts empty. Two players, White and Black, takes turns either:<p>
<li>placing a ball of their colour either on an empty board hole or to stack on any 2x2 platform.</li>
<li>moving a ball of their color to another suitable location. A ball can move only if it has 0 or 1 other ball resting on it.</li>
<p/>
<p><b>Aim</b>: A player wins by making a full line, orthogonally or diagonally, on any level. That is, lines on the 4x4 (board) level must be of length 4,
lines on the 3x3 level must be of length 3, and lines on the 2x2 level must be of length 2.</p>
<p>The following diagrams show completed games won by White with 3-in-a-row (left) and Black with 2-in-a-row (right).</p>
<table><tr>
<td style="text-align: center;"><img src="{GAME}/res/rules/spline-win1.png"/></td>
<td style="text-align: center;"><img src="{GAME}/res/rules/spline-win2.png"/></td>
</tr></table>

View file

@ -0,0 +1,39 @@
<p>Players take turns adding a ball of their color to an empty position on the board or on a 2x2 platform formed by 4 other balls.</p>
<p>Balls of a same color form groups by touching each others. In the figure below, the 5 white balls on the left form a group, the
single ball at the bottom right another one.</p>
<table><tr>
<td style="text-align: center;"><img src="{GAME}/res/rules/spargo-groups.png"/></td>
</tr></table>
<p>A group of balls must always have at least one empty position at layer 0 next to it. Otherwise, all the balls form this group are removed, except the ones
that support an opponent ball. In the next figure, if white adds a ball at the top left corner, the 3 black balls around will be removed.</p>
<table><tr>
<td style="text-align: center;"><img src="{GAME}/res/rules/spargo-capture.png"/></td>
</tr></table>
<p>As in Go, the Ko rule applies: it is not possible to add a ball that will result in a state similar to the previous round. In the left figure below,
white plays at the top left corner, resulting in the figure on the right. Then at the next move, black cannot play at second row , first column, otherwise we
would loop back to the first figure.</p>
<table><tr>
<td style="text-align: center;"><img src="{GAME}/res/rules/spargo-ko1.png"/></td>
<td style="text-align: center;"><img src="{GAME}/res/rules/spargo-ko2.png"/></td>
</tr></table>
<p>Suicide is not allowed: players cannot add a ball that results in having some of their balls being removed.</p>
<p>Overpasses cut underpasses: only visible connections count. So in the following figure, the white
connection across the top (visible) cuts the black connection that it passes over (hidden). As a result, there are 2 black groups and
1 white one. </p>
<table><tr>
<td style="text-align: center;"><img src="{GAME}/res/rules/spargo-overpass.png"/></td>
</tr></table>
<p>When a player cannot add a ball anymore, the winner is the player with the most balls.</p>
<p>More information on <a href="http://www.cameronius.com/games/margo/" target="_blank">Margo official site</a> and/or read the
<a href="http://www.cameronius.com/games/margo/margo-basics-41.pdf" target="_blank">Margo Basics book</a>.</p>

View file

@ -0,0 +1,337 @@
/*
* Copyright (c) 2013 - Jocly - www.jocly.com - All rights reserved
*/
Model.Game.InitGame = function() {
var aGame=this;
var size=this.mOptions.size;
var coord=[]; // coord[position] = [row,col,height]
var g=[]; // g[position][direction] = neighbor_position | null if outside
var index=0;
//var hBase=[0,16,25,29];
var hBase0=0;
var hBase=[];
for(var h=0;h<size;h++) {
hBase.push(hBase0);
hBase0+=(size-h)*(size-h);
}
for(var h=0;h<size;h++)
for(var r=0;r<size-h;r++)
for(var c=0;c<size-h;c++) {
var pos=index++;
coord[pos]=[r,c,h];
g[pos]=[];
/* down */
for(var dr=0;dr<2;dr++)
for(var dc=0;dc<2;dc++) {
var h0=h-1;
var r0=r+dr;
var c0=c+dc;
if(h0>=0 && h0<size && r0>=0 && r0<size-h0 && c0>=0 && c0<size-h0)
g[pos].push(hBase[h0]+r0*(size-h0)+c0);
else
g[pos].push(null);
}
/* same level */
var dirs=[[0,-1],[0,1],[-1,0],[1,0]];
for(var i in dirs) {
var dir=dirs[i];
var h0=h;
var r0=r+dir[0];
var c0=c+dir[1];
if(h0>=0 && h0<size && r0>=0 && r0<size-h0 && c0>=0 && c0<size-h0)
g[pos].push(hBase[h0]+r0*(size-h0)+c0);
else
g[pos].push(null);
}
/* up */
for(var dr=-1;dr<1;dr++)
for(var dc=-1;dc<1;dc++) {
var h0=h+1;
var r0=r+dr;
var c0=c+dc;
if(h0>=0 && h0<size && r0>=0 && r0<size-h0 && c0>=0 && c0<size-h0)
g[pos].push(hBase[h0]+r0*(size-h0)+c0);
else
g[pos].push(null);
}
}
this.g.Graph=g;
this.g.Coord=coord;
// go to position at same r and c, 2 levels above /below
this.g.Over=[];
this.g.Beneath=[];
for(var pos=0;pos<this.g.Graph.length;pos++) {
this.g.Over[pos]=null;
this.g.Beneath[pos]=null;
}
for(var pos=0;pos<this.g.Graph.length;pos++) {
var coord=this.g.Coord[pos];
for(var pos1=pos+1;pos1<this.g.Graph.length;pos1++) {
var coord1=this.g.Coord[pos1];
if(coord1[2]==coord[2]+2 && coord1[0]==coord[0]-1 && coord1[1]==coord[1]-1) {
this.g.Over[pos]=pos1;
this.g.Beneath[pos1]=pos;
break;
}
}
}
// walk through neighbor positions
this.g.EachDirection = function(pos,fnt) {
for(var i=0;i<12;i++) {
var npos=aGame.g.Graph[pos][i];
if(npos!=null)
if(fnt(npos,i)==false)
return;
}
}
// walk through down neighbors positions
this.g.EachDirectionDown = function(pos,fnt) {
var dirs=[0,1,2,3];
for(var i=0;i<dirs.length;i++) {
var npos=aGame.g.Graph[pos][dirs[i]];
if(npos!=null)
if(fnt(npos,dirs[i])==false)
return;
}
}
// walk up neighbors positions
this.g.EachDirectionUp = function(pos,fnt) {
var dirs=[8,9,10,11];
for(var i=0;i<dirs.length;i++) {
var npos=aGame.g.Graph[pos][dirs[i]];
if(npos!=null)
if(fnt(npos,dirs[i])==false)
return;
}
}
// walk up neighbors positions at same z
this.g.EachDirectionFlat = function(pos,fnt) {
var dirs=[4, 5, 6, 7];
for(var i=0;i<dirs.length;i++) {
var npos=aGame.g.Graph[pos][dirs[i]];
if(npos!=null)
if(fnt(npos,dirs[i])==false)
return;
}
}
// walk up neighbors positions at same z or below
this.g.EachDirectionFlatDown = function(pos,fnt) {
var dirs=[0, 1, 2, 3, 4, 5, 6, 7];
for(var i=0;i<dirs.length;i++) {
var npos=aGame.g.Graph[pos][dirs[i]];
if(npos!=null)
if(fnt(npos,dirs[i])==false)
return;
}
}
// walk up neighbors positions at same z or above
this.g.EachDirectionFlatUp = function(pos,fnt) {
var dirs=[4, 5, 6, 7, 8, 9, 10, 11];
for(var i=0;i<dirs.length;i++) {
var npos=aGame.g.Graph[pos][dirs[i]];
if(npos!=null)
if(fnt(npos,dirs[i])==false)
return;
}
}
this.zobrist=new JocGame.Zobrist({
board: {
type: "array",
size: this.g.Graph.length,
values: [0,1],
}
});
this.InitGameExtra();
}
Model.Game.MapSameLevelDiagGraph = function() {
var hBase=[0,16,25,29];
for(var h=0;h<4;h++)
for(var r=0;r<4-h;r++)
for(var c=0;c<4-h;c++) {
var pos=hBase[h]+r*(4-h)+c;
for(var dr=-1;dr<2;dr+=2)
for(var dc=-1;dc<2;dc+=2) {
var h0=h;
var r0=r+dr;
var c0=c+dc;
if(h0>=0 && h0<4 && r0>=0 && r0<4-h0 && c0>=0 && c0<4-h0)
this.g.Graph[pos].push(hBase[h0]+r0*(4-h0)+c0);
else
this.g.Graph[pos].push(null);
}
}
}
Model.Game.InitGameExtra = function() {
}
Model.Game.DestroyGame = function() {
this.DestroyGameExtra();
}
Model.Game.DestroyGameExtra = function() {
}
Model.Game.spUpdateZobrist = function(sign,adds,addsSide,removes,removesSide,who) {
for(var i=0;i<adds.length;i++)
sign=this.zobrist.update(sign,"board",addsSide,adds[i]);
for(var i=0;i<removes.length;i++)
sign=this.zobrist.update(sign,"board",removesSide,removes[i]);
return sign;
}
Model.Move.Init = function(args) {
for(var p in args)
if(args.hasOwnProperty(p))
this[p]=JSON.parse(JSON.stringify(args[p]));
}
Model.Move.ToString = function() {
var color=['?','W','B','R'][this.clr];
var str="";
switch(this.act) {
case "+":
str+="+"+this.pos+color;
break;
case ">":
str+=this.from+">"+this.to+color;
break;
}
return str;
}
Model.Board.Init = function(aGame) {
}
Model.Board.InitialPosition = function(aGame) {
this.spInitialPosition(aGame);
}
Model.Board.spInitialPosition = function(aGame) {
this.board=[]; // access balls by position
for(var i=0; i<aGame.g.Graph.length; i++)
this.board[i]=0;
this.maxLayer=0;
this.ballCount=[0,0,0];
this.playables={};
this.height=[0,0,0];
this.zSign=0;
// can put ball at ground level z=0
for(var i=0;i<aGame.mOptions.size*aGame.mOptions.size;i++)
this.playables[i]=true;
}
Model.Board.MakeFreeMoves = function(aGame) {
var moves=[];
for(var pos in this.playables)
moves.push({ act: '+', pos: pos, clr: this.mWho==JocGame.PLAYER_A?1:2 });
return moves;
}
Model.Board.GenerateMoves = function(aGame) {
var moves=this.GenerateAllMoves(aGame);
var moveLimit=aGame.mOptions.moveCount;
if(moves.length==0) {
this.mFinished=true;
if(this.ballCount[1]>this.ballCount[2])
this.mWinner=JocGame.PLAYER_A;
else if(this.ballCount[1]<this.ballCount[2])
this.mWinner=JocGame.PLAYER_B;
else
this.mWinner=JocGame.DRAW;
} else if(moveLimit!==undefined && moves.length>moveLimit) {
aGame.ArrayShuffle(moves);
moves.sort(function(m1,m2) {
m2.nextBoard.evaluation-m1.nextBoard.evaluation;
});
moves.splice(moveLimit,moves.length-moveLimit);
}
this.mMoves=moves;
}
Model.Board.GenerateAllMoves = function(aGame) {
var moves=this.MakeFreeMoves(aGame);
return moves;
}
Model.Board.Evaluate = function(aGame,aFinishOnly,aTopLevel) {
this.mEvaluation = 0;
}
Model.Board.ApplyMove = function(aGame,move) {
this.spApplyMove(aGame,move);
}
Model.Board.spApplyMove = function(aGame,move) {
//console.log("spApplyMove",move)
var $this=this;
function UpdatePlayables(pos) {
delete $this.playables[pos]; // position cannot be played anymore
aGame.g.EachDirectionFlat(pos,function(pos1,dir) {
if($this.board[pos1]) {
var dir0,pdir;
switch(dir) {
case 4: dir0=7; pdir=10; break;
case 5: dir0=6; pdir=9; break;
case 6: dir0=4; pdir=8; break;
case 7: dir0=5; pdir=11; break;
}
var pos0=aGame.g.Graph[pos][dir0];
if(pos0!==null && $this.board[pos0]>0 &&
$this.board[aGame.g.Graph[pos1][dir0]])
$this.playables[aGame.g.Graph[pos][pdir]]=true;
}
});
}
switch(move.act) {
case "+":
this.board[move.pos]=move.clr;
var h=aGame.g.Coord[move.pos][2];
if(h>this.maxLayer)
this.maxLayer=h;
this.height[move.clr]+=h;
this.ballCount[move.clr]++;
// check 2x2 platform
UpdatePlayables(move.pos);
break;
case ">":
if(move.down.length>0)
this.playables[move.down[move.down.length-1]]=true;
else
this.playables[move.from]=true;
var from=move.from;
for(var i in move.down) {
var down=move.down[i];
this.height[this.board[down]]--;
this.board[from]=this.board[down];
from=down;
}
this.board[from]=0;
this.board[move.to]=move.clr;
var h=aGame.g.Coord[move.to][2];
this.height[move.clr]+=h;
if(h>this.maxLayer)
this.maxLayer=h;
UpdatePlayables(move.to);
break;
}
}
Model.Board.IsValidMove = function(aGame,move) {
return true;
}
Model.Board.ExtendMove = function(aGame,pos) {
return {};
}
Model.Board.GetSignature = function() {
return this.zSign;
}

View file

@ -0,0 +1,886 @@
/*
*
* Copyright (c) 2013 - Jocly - www.jocly.com
*
* This file is part of the Jocly game platform and cannot be used outside of this context without the written permission of Jocly.
*
*/
(function() {
var SIZE,RADIUS,fullPath;
var CLASSIC_WHITE = 0xbbaa99;
var CLASSIC_BLACK = 0x222222;
var colors=["","white","black","red"];
var reflexivities=[0,0.1,0.9,0.7];
//var reflexivities=[0,0,1,1];
var sphereGeometry, textureCube;
View.Game.xdInitExtra = function(xdv) {
}
View.Game.xdPreInit = function(xdv) {
}
View.Game.xdInit = function(xdv) {
fullPath=this.mViewOptions.fullPath;
if(typeof THREE!="undefined") {
sphereGeometry = new THREE.SphereGeometry(1,32,16);
var path = fullPath+"/res/xd-view/meshes/skybox/";
var format = '.jpg';
var urls = [
path + 'px' + format, path + 'nx' + format,
path + 'py' + format, path + 'ny' + format,
path + 'pz' + format, path + 'nz' + format
];
textureCube = new THREE.CubeTextureLoader().load( urls );
}
this.xdPreInit();
SIZE = this.mOptions.size;
RADIUS = Math.round(5800/SIZE);
xdv.createGadget("lightside", {
"3d": {
type: "custom3d",
create: function() {
var backlight = new THREE.PointLight( 0xaaaaff, 1, 30 );
return backlight;
},
z: 10000,
x: 10000,
castShadow: false,
}
});
xdv.createGadget("lightback", {
"3d": {
type: "custom3d",
create: function() {
var backlight = new THREE.PointLight( 0xaaccff, 1, 30 );
return backlight;
},
z: -10000,
//y: -4000,
castShadow: false,
}
});
xdv.createGadget("skyball", {
"classic3d" : {
harbor: false,
type : "custommesh3d",
rotate: 135,
rotateX: -60,
create: function() {
var graphGeometry = new THREE.SphereGeometry( 40 , 50, 50 );
var material = new THREE.MeshBasicMaterial( {
color: 0x00ff00,
wireframe: false,
side: THREE.DoubleSide
} );
//var modifier = new THREE.SubdivisionModifier( 2 );
//modifier.modify( graphGeometry );
///////////////////////////////////////////////
// calculate vertex colors based on Z values //
///////////////////////////////////////////////
graphGeometry.computeBoundingBox();
zMin = graphGeometry.boundingBox.min.z;
zMax = graphGeometry.boundingBox.max.z;
zRange = zMax - zMin;
var color, point, face, numberOfSides, vertexIndex;
// faces are indexed using characters
var faceIndices = [ 'a', 'b', 'c', 'd' ];
// first, assign colors to vertices as desired
for ( var i = 0; i < graphGeometry.vertices.length; i++ )
{
point = graphGeometry.vertices[ i ];
color = new THREE.Color( 0x000000 );
//color.setHSL( 0.7 * (zMax - point.z) / zRange, 1, 0.5 );
/*var delta=(zMax - point.z)/zRange;
color.b = 1+delta;
color.g = 0.5+0.3*delta;
color.r = 0.2*delta;*/
var delta=(zMax - point.z)/zRange;
color.b = 1+delta;
color.g = 0.5+0.4*delta;
color.r = 0.3*delta;
graphGeometry.colors[i] = color; // use this array for convenience
}
// copy the colors as necessary to the face's vertexColors array.
for ( var i = 0; i < graphGeometry.faces.length; i++ )
{
face = graphGeometry.faces[ i ];
numberOfSides = ( face instanceof THREE.Face3 ) ? 3 : 4;
for( var j = 0; j < numberOfSides; j++ )
{
vertexIndex = face[ faceIndices[ j ] ];
face.vertexColors[ j ] = graphGeometry.colors[ vertexIndex ];
}
}
///////////////////////
// end vertex colors //
///////////////////////
// "wireframe texture"
var $this=this;
var textureLoader = new THREE.TextureLoader();
textureLoader.setCrossOrigin("anonymous");
textureLoader.load(fullPath + "/res/xd-view/meshes/square.png",
function(wireTexture){
wireTexture.wrapS = wireTexture.wrapT = THREE.RepeatWrapping;
wireTexture.repeat.set( 40, 40 );
var wireMaterial = new THREE.MeshBasicMaterial( { map: wireTexture, vertexColors: THREE.VertexColors, side:THREE.DoubleSide } );
wireMaterial.map.repeat.set( 20, 60 );
var mesh = new THREE.Mesh( graphGeometry , wireMaterial );
mesh.doubleSided = true;
$this.objectReady(mesh);
},
// Function called when download progresses
function ( xhr ) {
//console.log( (xhr.loaded / xhr.total * 100) + '% loaded' );
},
// Function called when download errors
function ( xhr ) {
console.log( "error loading texture" );
return;
});
return null;
},
opacity:1,
},
});
function createScreen(videoTexture) {
var $this=this;
var smooth=0;
this.getResource("smoothedfilegeo|"+smooth+"|"+fullPath+"/res/xd-view/meshes/flatscreen.js",function(geometry , materials) {
var materials0=[];
for(var i=0;i<materials.length;i++){
                   if (materials[i].name=="screen"){
var mat=materials[i].clone();
mat.map=videoTexture;
mat.overdraw = true;
//mat.side = THREE.DoubleSide;
materials0.push(mat);
                   }else if (materials[i].name=="boomer"){
var mat=materials[i].clone();
mat.shading=THREE.FlatShading;
materials0.push(mat);
                   }else if (materials[i].name=="tv"){
var mat=materials[i].clone();
mat.shading=THREE.FlatShading;
materials0.push(mat);
}else{
materials0.push(materials[i]);
}
}
var mesh = new THREE.Mesh( geometry , new THREE.MultiMaterial( materials0 ) );
mesh.visible = false;
$this.objectReady(mesh);
});
return null;
};
xdv.createGadget("videoa",{
"3d": {
type : "video3d",
makeMesh: function(videoTexture){
createScreen.call(this,videoTexture);
},
},
});
xdv.createGadget("videob",{
"3d": {
type : "video3d",
makeMesh: function(videoTexture){
createScreen.call(this,videoTexture);
},
},
});
/*
for(var pos=0; pos<this.g.Coord.length;pos++) {
(function(pos) {
xdv.createGadget("text#"+pos, {
"2d" : {
type : "element",
width : SIZE*.2,
height : SIZE*.2,
initialClasses: "notation",
css : {
"text-align" : "center",
},
z : 4,
display : function(element, width, height) {
element.css({
"font-size" : (height * .6) + "pt",
"line-height" : (height * 1) + "px",
}).text(pos+1);
},
},
"3d": {
type: "custommesh3d",
z: -SIZE*.05,
rotateX: -90,
create: function() {
var gg=new THREE.TextGeometry(""+(pos+1),{
size: 0.2,
height: 0.05,
curveSegments: 6,
font: "helvetiker",
});
var gm=new THREE.MeshBasicMaterial();
var mesh= new THREE.Mesh( gg , gm );
return mesh;
},
},
});
//var sphereMaterial = new THREE.MeshPhongMaterial( { color: 0xff0000 } );
})(pos);
}
*/
xdv.createGadget("board", {
"wood" : {
type : "image",
file: fullPath + "/res/images/wood.png",
z: 0,
},
});
this.xdInitExtra(xdv);
}
var gadgetIds={};
View.Game.isGadgetId = function(nid,type) {
return gadgetIds[type+"#"+nid]!==undefined;
}
View.Game.spGadgetId = function(xdv,nid,type) {
var id=type+"#"+nid;
if(gadgetIds[id]===undefined) {
gadgetIds[id]=true;
var scaleFactor=RADIUS*.001*1.01;
var transparent=false;
var opacity=1;
var makeSphere=true;
var color2d="red", z2d=1, file2d=null;
var scaleFactorWood=null;
switch(type) {
case "piece":
transparent=true;
z2d=4;
break;
case "cell":
scaleFactor=RADIUS*.001*.5;
transparent=true;
opacity=.5;
color2d="green";
z2d=2;
break;
case "plot":
scaleFactor=RADIUS*.001*.2;
transparent=true;
opacity=.7;
color2d="blue";
file2d="plot";
scaleFactorWood=RADIUS*.001*.6;
break;
case "text":
makeSphere=false;
xdv.createGadget("text#"+nid, {
"2d" : {
type : "element",
width : RADIUS*.2,
height : RADIUS*.2,
initialClasses: "notation",
css : {
"color": "#808080",
"text-align" : "center",
"font-weight" : "bold",
},
z : 2,
display : function(element, width, height) {
element.css({
"font-size" : (height * 1) + "pt",
"line-height" : (height * 1) + "px",
}).text(nid/*pos+1*/);
},
},
"3d": {
type: "custommesh3d",
z: 0,
create: function() {
var $this = this;
this.getResource('font|'+fullPath+
'/res/xd-view/fonts/helvetiker_regular.typeface.json',
function(font) {
var gg=new THREE.TextGeometry(""+(nid+/*1*/0),{
size: RADIUS*$this.SCALE3D*.3,
height: 0.05,
curveSegments: 6,
font: font,
});
var gm=new THREE.MeshPhongMaterial({
//ambient: 0xff0000,
});
var mesh= new THREE.Mesh( gg , gm );
$this.objectReady(mesh);
});
return null;
},
},
});
}
if(makeSphere)
xdv.createGadget(type+"#"+nid, {
"2d": {
type : "image",
file: fullPath + "/res/images/"+(file2d?file2d:"ball_"+color2d)+".png",
initialClasses: "xd-choice",
width: RADIUS*2*scaleFactor,
height: RADIUS*2*scaleFactor,
z: z2d,
opacity: opacity,
classes: "sp-disk",
},
"wood": {
width: RADIUS*2*(scaleFactorWood?scaleFactorWood:scaleFactor),
height: RADIUS*2*(scaleFactorWood?scaleFactorWood:scaleFactor),
},
"3d": {
type: "custommesh3d",
scale: [scaleFactor,scaleFactor,scaleFactor],
//opacity: opacity,
create: function() {
var shininess = 500, specular = 0xffffff, shading = THREE.SmoothShading;
var sphereMaterial = new THREE.MeshPhongMaterial( {
//map: imgTexture,
name: "ball",
//color: 0xffffff,
//ambient: 0x000000,
specular: specular,
shininess: shininess,
shading: shading,
opacity: opacity,
transparent: transparent,
envMap: textureCube,
reflectivity: 0.2,
combine: THREE.MixOperation,
//combine: THREE.AddOperation,
//combine: THREE.MultiplyOperation,
} );
var geometry=sphereGeometry.clone();
for(var i=0;i<geometry.faces.length;i++) {
geometry.faces[i].materialIndex=0;
}
var sphere = new THREE.Mesh(geometry,new THREE.MultiMaterial( [sphereMaterial] ));
return sphere;
},
},
});
}
return id;
}
View.Game.xdBuildScene = function(xdv) {
var $this=this;
xdv.updateGadget("board",{
"wood": {
visible: true,
width: RADIUS*2*(SIZE+.3),
height: RADIUS*2*(SIZE+.3),
},
});
xdv.updateGadget("lightside",{
"3d": {
visible: true,
},
});
xdv.updateGadget("lightback",{
"3d": {
visible: true,
},
});
xdv.updateGadget("skyball",{
"3d": {
visible: true,
},
});
var screenZoom=2;
xdv.updateGadget("videoa",{
"3d": {
visible: true,
scale:[screenZoom,screenZoom,screenZoom],
rotate: this.mViewAs==1?180:0,
rotateX: this.mViewAs==1?30:-30,
z: 3000,
y: this.mViewAs==1?12000:-12000,
playerSide: 1,
},
});
xdv.updateGadget("videob",{
"3d": {
visible: true,
scale:[screenZoom,screenZoom,screenZoom],
rotate: this.mViewAs==1?0:180,
rotateX: this.mViewAs==1?-30:30,
z: 3000,
y: this.mViewAs==1?-12000:12000,
playerSide: -1,
},
});
for(var pos=0;pos<SIZE*SIZE;pos++) {
var coord=this.getVCoord(pos);
xdv.updateGadget(this.spGadgetId(xdv,pos,"plot"),{
base: {
visible: true,
x: coord[0],
y: coord[1],
},
"3d" : {
materials: {
"ball": {
map: fullPath+"/res/xd-view/meshes/grey.png",
},
}
},
});
}
for(var pos=0; pos<this.g.Graph.length;pos++) {
var coord=this.getVCoord(pos);
xdv.updateGadget(this.spGadgetId(xdv,pos,"text"),{
base : {
visible: this.mNotation,
x: coord[0],
y: coord[1],
},
"3d" : {
x: coord[0]-RADIUS*.25,
z: coord[2]-RADIUS*.15,
},
});
}
}
View.Game.getVCoord = function() {
var r,c,h;
if(arguments.length==1) {
var pos=arguments[0];
var rcCoord=this.g.Coord[pos];
r=rcCoord[0];
c=rcCoord[1];
h=rcCoord[2];
} else {
r=arguments[0];
c=arguments[1];
h=arguments[1];
}
var vx=((c-(SIZE-1)/2)+h/2);
var vy=((r-(SIZE-1)/2)+h/2);
var vz=(h)*Math.sqrt(2)/2;
return [vx*2*RADIUS,vy*2*RADIUS,vz*2*RADIUS];
}
View.Game.getCCoord=function(pos) {
var rcCoord=this.g.Coord[pos];
var r=rcCoord[0];
var c=rcCoord[1];
var h=rcCoord[2];
return this.getVCoord(r,c,h);
}
View.Board.xdDisplay = function(xdv, aGame) {
//console.log("xdDisplay board",this);
var scaleFactor=RADIUS*.001*1.01;
for(var pos=0;pos<aGame.g.Coord.length;pos++) {
if(this.board[pos]==0 && aGame.isGadgetId(pos,"piece"))
xdv.updateGadget(aGame.spGadgetId(xdv,pos,"piece"),{
base : {
visible: false,
},
});
else if(this.board[pos]) {
var coord=aGame.getVCoord(pos);
var coordInt=aGame.g.Coord[pos];
xdv.updateGadget(aGame.spGadgetId(xdv,pos,"piece"),{
base : {
visible: true,
x: coord[0],
y: coord[1],
},
"2d" : {
file: fullPath + "/res/images/ball_"+colors[this.board[pos]]+".png",
width: RADIUS*2,
height: RADIUS*2,
z: coordInt[2]*2+4,
},
"3d" : {
z: coord[2],
scale: [scaleFactor,scaleFactor,scaleFactor],
materials: {
"ball": {
map: fullPath+"/res/xd-view/meshes/"+colors[this.board[pos]]+".png",
reflectivity: reflexivities[this.board[pos]],
opacity: 1,
},
}
},
});
}
xdv.updateGadget(aGame.spGadgetId(xdv,pos,"text"),{
"2d" : {
visible: aGame.mNotation && this.board[pos]==0 && aGame.g.Beneath[pos]==null,
},
});
}
xdv.updateGadget("videoa", {
"3d": {
materials: {
"tv" : {
color : CLASSIC_WHITE,
},
},
},
});
xdv.updateGadget("videob", {
"3d": {
materials: {
"tv" : {
color : CLASSIC_BLACK,
},
},
},
});
}
View.Board.xdBuildHTStateMachine = function(xdv, htsm, aGame) {
var $this = this;
var clickPos;
var selfColor=(1-this.mWho)/2+1;
var moves=this.GenerateAllMoves(aGame);
var moveFrom=null, moveTo=null, selMove;
function Highlight(pos,type) {
//console.log("Highlight",pos,type);
function Click() {
htsm.smQueueEvent("E_CLICK",{pos:pos,type:type});
}
var coord=aGame.getVCoord(pos);
var coordInt=aGame.g.Coord[pos];
var color="green";
var gtype="piece";
if(type=="normal") {
if($this.board[pos]==0)
gtype="cell";
else gtype=null;
} else if(type=="moveto") {
gtype="cell";
} else if(type=="cancel") {
color="red";
}
if(gtype)
xdv.updateGadget(aGame.spGadgetId(xdv,pos,gtype),{
base: {
visible: true,
x: coord[0],
y: coord[1],
click: Click,
z: coordInt[2]*2+5,
},
"2d": {
file: fullPath+"/res/images/ball_"+color+".png",
},
"3d": {
z: coord[2],
materials: {
"ball": {
map: fullPath+"/res/xd-view/meshes/"+color+".png",
reflectivity: color=="red"||color=="green"?.1:reflexivities[selfColor],
},
},
}
});
}
function Init(args) {
//console.log("moves",moves);
}
function Clean(args) {
for(var pos=0;pos<aGame.g.Graph.length;pos++) {
if(aGame.isGadgetId(pos,"cell")) {
xdv.updateGadget(aGame.spGadgetId(xdv,pos,"cell"),{
base: {
visible: false,
click: null,
}
});
}
if(aGame.isGadgetId(pos,"piece")) {
if($this.board[pos]) {
xdv.updateGadget(aGame.spGadgetId(xdv,pos,"piece"),{
base: {
click: null,
},
"2d": {
file: fullPath+"/res/images/ball_"+colors[$this.board[pos]]+".png",
},
"3d": {
materials: {
"ball": {
map: fullPath+"/res/xd-view/meshes/"+colors[$this.board[pos]]+".png",
reflexivity:reflexivities[$this.board[pos]],
},
},
}
});
}
}
}
}
function Select(args) {
var typeNormal={}, typeMoveFrom={}
for(var i=0;i<moves.length;i++) {
var move=moves[i];
if(move.act=="+")
typeNormal[move.pos]=true;
else if(move.act==">")
typeMoveFrom[move.from]=true;
}
for(var pos in typeNormal)
Highlight(pos,"normal");
for(var pos in typeMoveFrom)
Highlight(pos,"movefrom");
}
function SelectTo(args) {
Highlight(moveFrom,"cancel");
for(var i=0;i<moves.length;i++) {
var move=moves[i];
if(moveFrom==move.from) {
Highlight(move.to,"moveto");
}
}
}
function Save(args) {
clickPos=args.pos;
for(var i=0;i<moves.length;i++) {
var move=moves[i];
if(moveFrom===null) {
if(move.pos==clickPos) {
move0=move;
return;
}
} else if(move.from==moveFrom && move.to==moveTo) {
move0=move;
return;
}
}
console.error("move not found",clickPos,moves);
}
function Animate(args) {
$this.spAnimateMove(xdv,aGame,move0,function() {
htsm.smQueueEvent("E_ANIM_DONE",{});
});
}
function SendMove(args) {
aGame.MakeMove(move0);
}
function Click(args) {
switch(args.type) {
case "normal":
htsm.smQueueEvent("E_CLICK_ADD",args);
break;
case "movefrom":
moveFrom=args.pos;
htsm.smQueueEvent("E_CLICK_FROM",args);
break;
case "moveto":
moveTo=args.pos;
htsm.smQueueEvent("E_CLICK_TO",args);
break;
case "cancel":
htsm.smQueueEvent("E_CLICK_CANCEL",args);
break;
}
}
function Cancel(args) {
moveFrom=null;
}
htsm.smTransition("S_INIT", "E_INIT", "S_SELECT", [ Init ]);
htsm.smEntering("S_SELECT", [ Select ]);
htsm.smTransition("S_SELECT", "E_CLICK",null, [ Clean, Click ]);
htsm.smTransition("S_SELECT", "E_CLICK_FROM",null, [ SelectTo ]);
htsm.smTransition("S_SELECT", "E_CLICK_TO","S_ANIMATING", [ Save, Animate ]);
htsm.smTransition("S_SELECT", "E_CLICK_ADD","S_ANIMATING", [ Save, Animate ]);
htsm.smTransition("S_SELECT", "E_CLICK_CANCEL",null, [ Clean, Cancel, Select ]);
//htsm.smTransition("S_SELECT", "E_ANIM_DONE",null, [ ]);
htsm.smLeaving("S_SELECT", [ Clean ]);
htsm.smTransition("S_ANIMATING","E_ANIM_DONE","S_DONE",[SendMove])
htsm.smTransition(["S_SELECT","S_DONE"],"E_END","S_DONE",[]);
htsm.smEntering("S_DONE",[Clean]);
}
View.Board.xdPlayedMove = function(xdv, aGame, aMove) {
aGame.mOldBoard.spAnimateMove(xdv,aGame,aMove,function() {
aGame.MoveShown();
})
return false;
}
View.Board.spAnimateMove = function(xdv, aGame, aMove, callback) {
if(aMove.act=="+")
this.spAnimateMoveAdd.apply(this,arguments);
else if(aMove.act==">")
this.spAnimateMoveShift.apply(this,arguments);
}
View.Board.spAnimateMoveAdd = function(xdv, aGame, aMove, callback) {
var selfColor=(1-this.mWho)/2+1;
var coord=aGame.getVCoord(aMove.pos);
var coordInt=aGame.g.Coord[aMove.pos];
var scaleFactor0=RADIUS*.001*0.001;
var scaleFactor=RADIUS*.001*1.01;
xdv.updateGadget(aGame.spGadgetId(xdv,aMove.pos,"piece"),{
base: {
visible: true,
x: coord[0],
y: coord[1],
},
"2d": {
width: RADIUS*2*scaleFactor0,
height: RADIUS*2*scaleFactor0,
z: coordInt[2]*2+4,
file: fullPath + "/res/images/ball_"+colors[selfColor]+".png",
},
"3d": {
z: coord[2],
scale: [scaleFactor0,scaleFactor0,scaleFactor0],
materials: {
"ball": {
map: fullPath+"/res/xd-view/meshes/"+colors[selfColor]+".png",
reflectivity: reflexivities[selfColor],
opacity: 1,
},
transparent: true,
},
},
});
xdv.updateGadget(aGame.spGadgetId(xdv,aMove.pos,"piece"),{
base: {
},
"2d": {
width: RADIUS*2,
height: RADIUS*2,
},
"3d": {
scale: [scaleFactor,scaleFactor,scaleFactor],
}
},800,function() {
if(aMove.remove!==undefined && aMove.remove.length>0)
DeleteBalls(aMove.remove);
else
callback();
});
var animCount;
function EndAnim() {
if(--animCount==0)
callback();
}
function DeleteBalls(del) {
animCount=del.length;
for(var i=0;i<del.length;i++) {
xdv.updateGadget(aGame.spGadgetId(xdv,del[i],"piece"),{
base: {
},
"2d": {
width: RADIUS*2*scaleFactor0,
height: RADIUS*2*scaleFactor0,
},
"3d": {
scale: [scaleFactor0,scaleFactor0,scaleFactor0],
}
},800,function() {
EndAnim();
});
}
}
}
View.Board.spAnimateMoveShift = function(xdv, aGame, aMove, callback) {
//console.log("spAnimateMoveShift",aMove,this);
var animCount=0;
function EndAnim() {
if(--animCount==0)
callback();
}
var down=[];
for(var i=aMove.down.length-1;i>=0;i--)
down.push(aMove.down[i]);
down.push(aMove.from);
down.push(aMove.to);
try{
for(var i=1;i<down.length;i++) {
var pos0=down[i-1];
var coord0=aGame.getVCoord(pos0);
var coord1=aGame.getVCoord(down[i]);
var coord1Int=aGame.g.Coord[down[i]];
var distance=Math.sqrt((coord0[0]-coord1[0])*(coord0[0]-coord1[0])+(coord0[1]-coord1[1])*(coord0[1]-coord1[1]))
var jump=i==down.length-1 && distance>2*RADIUS*1.1;
animCount++;
(function(coord0,coord1,jump) {
xdv.updateGadget(aGame.spGadgetId(xdv,pos0,"piece"),{
base: {
x: coord1[0],
y: coord1[1],
},
"2d": {
z: coord1Int[2]*2+4,
},
"3d": {
z: coord1[2],
positionEasingUpdate: function(ratio) {
if(jump) {
var y=((.25-(ratio-.5)*(ratio-.5))*4*RADIUS*2+coord0[2])*this.SCALE3D;
this.object3d.position.y=y;
}
},
}
},800,function() {
EndAnim();
});
})(coord0,coord1,jump);
}
} catch(e) { debugger; }
}
})();

View file

@ -0,0 +1,63 @@
.sp-board {
position: absolute;
z-index: 0;
}
.sp-board-canvas {
position: absolute;
z-index: 10;
}
.sp-cell {
position: absolute;
background-position: center center;
background-size: 100% 100%;
}
.sp-notation {
position: absolute;
color: #808080;
font-weight: bold;
font-family: Arial, sans-serif;
text-align: center;
}
.sp-red {
background-image: url(res/images/ball_red.png);
}
.sp-black {
background-image: url(res/images/ball_black.png);
}
.sp-white {
background-image: url(res/images/ball_white.png);
}
.sp-choice {
position: absolute;
background-color: transparent;
opacity: 0.5;
//border: 1px solid Red;
}
.sp-choice-view {
background-color: Lime;
}
.sp-front {
position: absolute;
background-color: transparent;
cursor: pointer;
}
.sp-disk {
border-radius: 50%;
}
/*
.sp-picked {
opacity: 0.6;
}
*/

View file

@ -0,0 +1,98 @@
/*
* Copyright (c) 2013 - Jocly - www.jocly.com - All rights reserved
*/
Model.Game.InitGameExtra = function() {
this.MapSameLevelDiagGraph();
this.BuildSplineLines();
this.g.factor={
completion: [[4,2,1],[4,2],[4]],
count: 0.1,
sppHeight: 1.
}
}
Model.Game.BuildSplineLines = function() {
var $this=this;
var lines=[];
function EachDirectionSameLevel(pos,fnt) {
var dirs=[7,15,5,13];
for(var i=0;i<dirs.length;i++) {
var npos=$this.g.Graph[pos][dirs[i]];
if(npos!=null)
fnt(npos,dirs[i]);
}
}
var hBase=[0,16,25,29];
for(var h=0;h<4;h++)
for(var r=0;r<4-h;r++)
for(var c=0;c<4-h;c++) {
var pos=hBase[h]+r*(4-h)+c;
EachDirectionSameLevel(pos,function(pos1,dir) {
var poss=[pos];
while(pos1!=null) {
poss.push(pos1);
pos1=$this.g.Graph[pos1][dir];
}
if(poss.length==4-h)
lines.push(poss);
});
}
this.g.SplineLines=lines;
}
Model.Board.splineEvaluate = function(aGame,aFinishOnly,aTopLevel) {
var lineCompletionA=[[0,0,0],[0,0],[0]];
var lineCompletionB=[[0,0,0],[0,0],[0]];
for(var i=0;i<aGame.g.SplineLines.length;i++) {
var line=aGame.g.SplineLines[i];
var h=aGame.g.Coord[line[0]][2];
if(h>this.maxLayer)
break;
var empty=0;
var playera=0;
var playerb=0;
for(var j in line) {
var pos=line[j];
if(this.board[pos]==1)
playera++;
else if(this.board[pos]==2)
playerb++;
else {
empty++;
break;
}
}
if(empty==0) {
if(playera==0) {
this.mFinished=true;
this.mWinner=JocGame.PLAYER_B;
} else if(playerb==0) {
this.mFinished=true;
this.mWinner=JocGame.PLAYER_A;
}
if(this.mFinished) {
if(aTopLevel)
this.mWinLine=line;
return;
}
} else {
if(playera==0 && playerb>0)
lineCompletionB[h][h-playerb-1]++;
else if(playerb==0 && playera>0)
lineCompletionA[h][h-playera-1]++;
}
}
this.mEvaluation=0;
for(var i=0;i<3;i++) {
for(var j=0;j<3-i;j++)
this.mEvaluation+=(lineCompletionA[i][j]-lineCompletionB[i][j])*aGame.g.factor.completion[i][j];
}
this.mEvaluation += (this.ballCount[1]-this.ballCount[2])*aGame.g.factor.count;
}
Model.Board.Evaluate = function() {
this.splineEvaluate.apply(this,arguments);
}

View file

@ -0,0 +1,68 @@
/*
* Copyright (c) 2013 - Jocly - www.jocly.com - All rights reserved
*/
View.Board.xdShowEnd=function(xdv,aGame) {
var $this=this;
if(this.mWinLine) {
var winLine={};
for(var i=0;i<this.mWinLine.length;i++) {
winLine[this.mWinLine[i]]=true;
}
var animCount=0;
function EndAnim(callback) {
if(--animCount==0)
callback();
}
function Fade(callback) {
for(var pos=0;pos<aGame.g.Graph.length;pos++) {
if($this.board[pos]>0 && !(pos in winLine)) {
animCount++;
xdv.updateGadget("piece#"+pos, {
"2d": {
opacity: .2,
},
"3d": {
materials: {
"ball": {
opacity: .2,
},
}
},
},500,function() {
EndAnim(callback);
});
}
}
}
function UnFade(callback) {
for(var pos=0;pos<aGame.g.Graph.length;pos++) {
if($this.board[pos]>0 && !(pos in winLine)) {
animCount++;
xdv.updateGadget("piece#"+pos, {
"2d": {
opacity: 1,
},
"3d": {
materials: {
"ball": {
opacity: 1,
},
}
},
},500,function() {
EndAnim(callback);
});
}
}
}
Fade(function() {
setTimeout(function() {
UnFade(function() {
aGame.EndShown()
});
},500);
});
}
return false;
}

View file

@ -0,0 +1,71 @@
/*
* Copyright (c) 2013 - Jocly - www.jocly.com - All rights reserved
*/
Model.Board.GenerateAllMoves = function(aGame) {
var moves=this.MakeFreeMoves(aGame);
var sppMoves=this.MakeSelfSinglePinMoves(aGame);
if(sppMoves.length>0)
moves=moves.concat(sppMoves);
return moves;
}
Model.Board.GetSingleUpBalls=function(aGame,pos,upFreeNeighbors) {
var $this=this;
var upNeighbors=[];
var upDirs=[];
aGame.g.EachDirectionUp(pos,function(pos1,dir1) {
if($this.board[pos1]!=0) {
upNeighbors.push(pos1);
upDirs.push(dir1);
} else if(upFreeNeighbors)
upFreeNeighbors[pos1]=true;
return true;
});
if(upNeighbors.length==0)
return [];
else if(upNeighbors.length>1)
return null;
else {
var up=upNeighbors[0];
var ups=[up];
while((up=aGame.g.Graph[up][upDirs[0]])!=null) {
if(this.board[up]==0) {
if(upFreeNeighbors)
upFreeNeighbors[up]=true;
return ups;
} else
ups.push(up);
}
return ups; // top level; never happens
}
}
Model.Board.MakeSelfSinglePinMoves = function(aGame) {
var moves=[];
var $this=this;
var selfColor=this.mWho==JocGame.PLAYER_A?1:2;
for(var pos in aGame.g.Coord) { // go through every position
if(aGame.g.Coord[pos][2]>this.maxLayer)
break;
if(this.board[pos]==selfColor) { // self balls
var topFree={ };
var upLine=this.GetSingleUpBalls(aGame,pos,topFree);
if(upLine!=null) {
for(var i in this.mMoves) {
var move=this.mMoves[i];
if(move.act=='+' && typeof topFree[move.pos]=="undefined")
moves.push({ act: '>', from: pos, to: move.pos, down: upLine, clr: selfColor });
}
}
}
}
return moves;
}
Model.Board.Evaluate = function(aGame) {
this.splineEvaluate.apply(this,arguments);
//console.log("Eval"+this.mEvaluation,(this.height[1]-this.height[2])*3);
this.mEvaluation+=(this.height[1]-this.height[2])*aGame.g.factor.sppHeight;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 960 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB