<?php
 
function chessbase_init() {

	$cbModel=array(
		'plazza'=>'true',
		'released'=>1389887778, // January the 16th 2014, new chess module		
		'title-en'=>'Chessbase',
		'module' => 'chessbase',
		'summary' => t('Chess'),
		'thumbnail' => 'knight-thumbnail.png',
		'rules' => array('en'=>'rules.html'),
		'credits' => array('en'=>'credits.html'),
		'gameOptions' => array(
			'preventRepeat'=>true,
			'uctTransposition' => "state",
			'uctIgnoreLoop' => false,
			'levelOptions' => array(
			),
		),
		//'debugEval' => true,
	);
	$cbView=array(
		'title-en'=>'Chessbase view',
		'module' => 'chessbase',
		'xdView' => TRUE,
		'css' => array('chessbase.css'),
		'preferredRatio' => 1,
		'useShowMoves' => TRUE,
		'useNotation' => TRUE,
		'useAutoComplete' => TRUE,
		'defaultOptions' => array(
				'sounds' => TRUE,
				'moves' => TRUE,
				'notation' => FALSE,
				'autocomplete' => FALSE,
		),
		'skins' => array(
			array(
				'name'=>'skin2d',
				'title'=>'2D Classic',
				'3d'=>FALSE,
				'preload'=>array(
				),
			),
		),
		'animateSelfMoves' => false,
		'switchable' => true,
		'sounds' => array(
			'move1' => 'alq_move1',
			'move2' => 'alq_move2',
			'move3' => 'alq_move3',
			'move4' => 'alq_move2',
			'tac1' => 'alq_tac1',
			'tac2' => 'alq_tac2',
			'tac3' => 'alq_tac1',
			'promo' => 'promo',
			'usermove' => null,
		),
		
	);

	$cbLevel = array(
		'ai' => 'uct',
		'playoutDepth' => 0,
		'minVisitsExpand' => 1,
		//'c' => 0.65,
		'c' => 0.60,
		//'c' => .01,
		'ignoreLeaf' => false,
		//'log' => true,
		'uncertaintyFactor' => 3,
		//'useAlphaBeta' => true,
		//'c' => 0.2,
		//'showMinimaxTree' => true,
		//'directVisits' => false,
		//'pickMove' => 'besteval-multivisits',
		//'distributeEval' => false, 
		//'propagateMultiVisits' => false,
	);
	$cbLevels = array(
		'easy' => jocly_array_merge_recursive_distinct($cbLevel,array(
				'name' => 'easy',
				'label' => t('Easy'),
				'maxNodes' => 1000,
		)),
		'fast' => jocly_array_merge_recursive_distinct($cbLevel,array(
				'name' => 'fast',
				'label' => t('Fast [1sec]'),
				'maxDuration' => 1,
				'isDefault' => true,
		)),
		'medium' => jocly_array_merge_recursive_distinct($cbLevel,array(
				'name' => 'medium',
				'label' => t('Medium'),
				'maxNodes' => 10000,
				'maxDuration' => 10,
		)),
		'strong' => jocly_array_merge_recursive_distinct($cbLevel,array(
				'name' => 'strong',
				'label' => t('Strong'),
				'maxNodes' => 20000,
				'maxDuration' => 15,
		)),
	);
	$cbLevels2 = array(
			'easy' => jocly_array_merge_recursive_distinct($cbLevel,array(
					'name' => 'easy',
					'label' => t('Easy'),
					'maxNodes' => 4000,
			)),
			'fast' => jocly_array_merge_recursive_distinct($cbLevel,array(
					'name' => 'fast',
					'label' => t('Fast [2sec]'),
					'maxDuration' => 2,
					'isDefault' => true,
			)),
			'medium' => jocly_array_merge_recursive_distinct($cbLevel,array(
					'name' => 'medium',
					'label' => t('Medium'),
					'maxNodes' => 20000,
					'maxDuration' => 20,
			)),
			'strong' => jocly_array_merge_recursive_distinct($cbLevel,array(
					'name' => 'strong',
					'label' => t('Strong'),
					'maxNodes' => 40000,
					'maxDuration' => 30,
			)),
	);
	$cbLevels3 = array(
			'easy' => jocly_array_merge_recursive_distinct($cbLevel,array(
					'name' => 'easy',
					'label' => t('Easy'),
					'maxNodes' => 6000,
			)),
			'fast' => jocly_array_merge_recursive_distinct($cbLevel,array(
					'name' => 'fast',
					'label' => t('Fast [3sec]'),
					'maxDuration' => 3,
					'isDefault' => true,
			)),
			'medium' => jocly_array_merge_recursive_distinct($cbLevel,array(
					'name' => 'medium',
					'label' => t('Medium'),
					'maxNodes' => 30000,
					'maxDuration' => 30,
			)),
			'strong' => jocly_array_merge_recursive_distinct($cbLevel,array(
					'name' => 'strong',
					'label' => t('Strong'),
					'maxNodes' => 60000,
					'maxDuration' => 45,
			)),
	);
	
	$gameOptions = array(
		'preventRepeat'=>TRUE,
		'levelOptions' => array(
			'pieceValueFactor' => 1,
			'pieceValueRatioFactor' => 1,
			'posValueFactor' => .1,
			'averageDistKingFactor' => -.01,
			'castleFactor' => .1,
			'minorPiecesMovedFactor' => .1,
			'checkFactor' => .2,
			'endingKingFreedomFactor' => .01,
			'endingDistKingFactor' => .05,
			'distKingCornerFactor' => .1,
		),
	);
	
	$skin3d = array(
		'name'=>'skin3d',
		'title'=>'3D Classic',
		'3d'=>TRUE,
		'preload'=>array(
			//'image|/res/images/wikipedia.png',
		),
		'world'=>array(
			'lightIntensity'=>1.3, // 1.3,
			'skyLightIntensity'=>1.2, // 1.1,
			'lightCastShadow'=>true, 
			'fog' => false,
			//'color'=>0x111111,
			'color'=>0x4783D4,
			'lightPosition'=>array('x'=>-9,'y'=>9,'z'=>9),
			'skyLightPosition'=>array('x'=>9,'y'=>9,'z'=>9),
			'lightShadowDarkness'=>0.55,
			'ambientLightColor'=>0x222222,
		), 
		'camera'=>array(
			'fov'=>45,
			'distMax'=>50,
			'radius'=>18,
			'elevationAngle'=>60,
			'elevationMin'=>0,
		),					
	);

	$skin3dwall = jocly_array_merge_recursive_distinct($skin3d,array(
		'name'=>'skin3dwall',
		'title'=>'3D Wall',
		'camera' => array(
			'radius'=>18,
			'elevationAngle'=>89,
		)
	));

	$skin2d = array(
		'name'=>'skin2d',
		'title'=>'2D Classic',
		'3d'=>FALSE,
		'preload'=>array(
		),
	);
	
	$preloadBase3d = array(
		'smoothedfilegeo|0|/res/ring-target.js',						
		'image|/res/images/cancel.png',
	);
	$preloadBase3dHex = array(
		'smoothedfilegeo|0|/res/ring-target-hexagon.js',						
		'image|/res/images/cancel.png',
	);
	$preloadBase3dCirc = array(
		'smoothedfilegeo|0|/res/ring-target-cylinder-v3.js',						
		'image|/res/images/cancel.png',
	);
	
	$preloadBase2d = array(
		//'image|/res/images/wood.jpg',
		'image|/res/images/cancel.png',
		'image|/res/images/whitebg.png',
	);
	
	$preloadWikipedia = array(
		'image|/res/images/wikipedia.png',
	);
	
	$preloadStaunton = array(
		'smoothedfilegeo|0|/res/staunton/pawn/pawn-classic.js',
		'image|/res/staunton/pawn/pawn-diffusemap.jpg',
		'image|/res/staunton/pawn/pawn-normalmap.jpg',
		'smoothedfilegeo|0|/res/staunton/knight/knight.js',
		'image|/res/staunton/knight/knight-diffusemap.jpg',
		'image|/res/staunton/knight/knight-normalmap.jpg',
		'smoothedfilegeo|0|/res/staunton/bishop/bishop.js',
		'image|/res/staunton/bishop/bishop-diffusemap.jpg',
		'image|/res/staunton/bishop/bishop-normalmap.jpg',
		'smoothedfilegeo|0|/res/staunton/rook/rook.js',
		'image|/res/staunton/rook/rook-diffusemap.jpg',
		'image|/res/staunton/rook/rook-normalmap.jpg',
		'smoothedfilegeo|0|/res/staunton/queen/queen.js',
		'image|/res/staunton/queen/queen-diffusemap.jpg',
		'image|/res/staunton/queen/queen-normalmap.jpg',
		'smoothedfilegeo|0|/res/staunton/king/king.js',
		'image|/res/staunton/king/king-diffusemap.jpg',
		'image|/res/staunton/king/king-normalmap.jpg',
	);
	$preloadNishapur = array(
		'smoothedfilegeo|0|/res/nishapur/pawn/pawn.js',
		'image|/res/nishapur/pawn/pawn-diffusemap.jpg',
		'image|/res/nishapur/pawn/pawn-normalmap.jpg',
		'smoothedfilegeo|0|/res/nishapur/knight/knight.js',
		'image|/res/nishapur/knight/knight-diffusemap.jpg',
		'image|/res/nishapur/knight/knight-normalmap.jpg',
		'smoothedfilegeo|0|/res/nishapur/elephant/elephant.js',
		'image|/res/nishapur/elephant/elephant-diffusemap.jpg',
		'image|/res/nishapur/elephant/elephant-normalmap.jpg',
		'smoothedfilegeo|0|/res/nishapur/rook/rook.js',
		'image|/res/nishapur/rook/rook-diffusemap.jpg',
		'image|/res/nishapur/rook/rook-normalmap.jpg',
		'smoothedfilegeo|0|/res/nishapur/general/general.js',
		'image|/res/nishapur/general/general-diffusemap.jpg',
		'image|/res/nishapur/general/general-normalmap.jpg',
		'smoothedfilegeo|0|/res/nishapur/king/king.js',
		'image|/res/nishapur/king/king-diffusemap.jpg',
		'image|/res/nishapur/king/king-normalmap.jpg',
	);	
	$preloadWikipediaCourier = array(
		'image|/res/courierchess/wikipedia-courier-sprites.png',
	);
	
	$preloadCourier = array(
		"smoothedfilegeo|0|/res/courierchess/cc-pawn/cc-pawn.js",
		"image|/res/courierchess/cc-pawn/cc-pawn-diffuse.jpg",
		"image|/res/courierchess/cc-pawn/cc-pawn-normal.jpg",
		"smoothedfilegeo|0|/res/courierchess/cc-archer/cc-archer.js",
		"image|/res/courierchess/cc-archer/cc-archer-diffuse.jpg",
		"image|/res/courierchess/cc-archer/cc-archer-normal.jpg",
		"smoothedfilegeo|0|/res/courierchess/cc-queen/cc-queen.js",
		"image|/res/courierchess/cc-queen/cc-queen-diffuse.jpg",
		"image|/res/courierchess/cc-queen/cc-queen-normal.jpg",
		"smoothedfilegeo|0|/res/courierchess/cc-schleich/cc-schleich.js",
		"image|/res/courierchess/cc-schleich/cc-schleich-diffuse.jpg",
		"image|/res/courierchess/cc-schleich/cc-schleich-normal.jpg",
		"smoothedfilegeo|0|/res/courierchess/cc-knight/cc-knight.js",
		"image|/res/courierchess/cc-knight/cc-knight-diffuse.jpg",
		"image|/res/courierchess/cc-knight/cc-knight-normal.jpg",
		"smoothedfilegeo|0|/res/courierchess/cc-man/cc-man.js",
		"image|/res/courierchess/cc-man/cc-man-diffuse.jpg",
		"image|/res/courierchess/cc-man/cc-man-normal.jpg",
		"smoothedfilegeo|0|/res/courierchess/cc-courier/cc-courier.js",
		"image|/res/courierchess/cc-courier/cc-courier-diffuse.jpg",
		"image|/res/courierchess/cc-courier/cc-courier-normal.jpg",
		"smoothedfilegeo|0|/res/courierchess/cc-rook/cc-rook.js",
		"image|/res/courierchess/cc-rook/cc-rook-diffuse.jpg",
		"image|/res/courierchess/cc-rook/cc-rook-normal.jpg",
		"smoothedfilegeo|0|/res/courierchess/cc-king/cc-king.js",
		"image|/res/courierchess/cc-king/cc-king-diffuse.jpg",
		"image|/res/courierchess/cc-king/cc-king-normal.jpg",
	);
	
	$xiangqiWorld=array(
		'lightIntensity'=>0.8, //1.0,
		'skyLightIntensity'=>0.5, //1,
		'lightCastShadow'=>true, 
		'fog' => false,
		'color'=>0x4783D4,
		'lightPosition'=>array('x'=>10,'y'=>10,'z'=>10),
		'lightShadowDarkness'=>0.75,
		'ambientLightColor'=>0x444444,
	);	

	$makrukWorld=array(
		'lightIntensity'=>.8,
		'skyLightIntensity'=>.4,
		'lightCastShadow'=>false, 
		'fog' => false,
		'color'=>0x4783D4,
		'lightPosition'=>array('x'=>-10,'y'=>5,'z'=>0),
		'lightShadowDarkness'=>0.85,
		'ambientLightColor'=>0x111111,
	);	

	$frPreloads = array(
		'fr-pawn' => array(				
			'smoothedfilegeo|0|/res/fairy/pawn/pawn.js',
			'image|/res/fairy/pawn/pawn-diffusemap.jpg',
			'image|/res/fairy/pawn/pawn-normalmap.jpg'),
		'fr-knight' => array(				
			'smoothedfilegeo|0|/res/fairy/knight/knight.js',
			'image|/res/fairy/knight/knight-diffusemap.jpg',
			'image|/res/fairy/knight/knight-normalmap.jpg'),
		'fr-bishop' => array(				
			'smoothedfilegeo|0|/res/fairy/bishop/bishop.js',
			'image|/res/fairy/bishop/bishop-diffusemap.jpg',
			'image|/res/fairy/bishop/bishop-normalmap.jpg'),
		'fr-rook' => array(				
			'smoothedfilegeo|0|/res/fairy/rook/rook.js',
			'image|/res/fairy/rook/rook-diffusemap.jpg',
			'image|/res/fairy/rook/rook-normalmap.jpg'),
		'fr-queen' => array(				
			'smoothedfilegeo|0|/res/fairy/queen/queen.js',
			'image|/res/fairy/queen/queen-diffusemap.jpg',
			'image|/res/fairy/queen/queen-normalmap.jpg'),
		'fr-king' => array(				
			'smoothedfilegeo|0|/res/fairy/king/king.js',
			'image|/res/fairy/king/king-diffusemap.jpg',
			'image|/res/fairy/king/king-normalmap.jpg'),
		'fr-cannon' => array(				
			'smoothedfilegeo|0|/res/fairy/cannon/cannon.js',
			'image|/res/fairy/cannon/cannon-diffusemap.jpg',
			'image|/res/fairy/cannon/cannon-normalmap.jpg'),
		'fr-cannon2' => array(				
			'smoothedfilegeo|0|/res/fairy/cannon2/cannon2.js',
			'image|/res/fairy/cannon2/cannon2-diffusemap.jpg',
			'image|/res/fairy/cannon2/cannon2-normalmap.jpg'),
		'fr-elephant' => array(				
			'smoothedfilegeo|0|/res/fairy/elephant/elephant.js',
			'image|/res/fairy/elephant/elephant-diffusemap.jpg',
			'image|/res/fairy/elephant/elephant-normalmap.jpg'),
		'fr-admiral' => array(				
			'smoothedfilegeo|0|/res/fairy/admiral/admiral.js',
			'image|/res/fairy/admiral/admiral-diffusemap.jpg',
			'image|/res/fairy/admiral/admiral-normalmap.jpg'),
		'fr-camel' => array(				
			'smoothedfilegeo|0|/res/fairy/camel/camel.js',
			'image|/res/fairy/camel/camel-diffusemap.jpg',
			'image|/res/fairy/camel/camel-normalmap.jpg'),
		'fr-lion' => array(				
			'smoothedfilegeo|0|/res/fairy/lion/lion.js',
			'image|/res/fairy/lion/lion-diffusemap.jpg',
			'image|/res/fairy/lion/lion-normalmap.jpg'),
		'fr-eagle' => array(				
			'smoothedfilegeo|0|/res/fairy/eagle/eagle.js',
			'image|/res/fairy/eagle/eagle-diffusemap.jpg',
			'image|/res/fairy/eagle/eagle-normalmap.jpg'),
		'fr-amazon' => array(				
			'smoothedfilegeo|0|/res/fairy/amazon/amazon.js',
			'image|/res/fairy/amazon/amazon-diffusemap.jpg',
			'image|/res/fairy/amazon/amazon-normalmap.jpg'),
		'fr-cardinal' => array(				
			'smoothedfilegeo|0|/res/fairy/cardinal/cardinal.js',
			'image|/res/fairy/cardinal/cardinal-diffusemap.jpg',
			'image|/res/fairy/cardinal/cardinal-normalmap.jpg'),
		'fr-crowned-rook' => array(				
			'smoothedfilegeo|0|/res/fairy/crowned-rook/crowned-rook.js',
			'image|/res/fairy/crowned-rook/crowned-rook-diffusemap.jpg',
			'image|/res/fairy/crowned-rook/crowned-rook-normalmap.jpg'),
		'fr-dragon' => array(				
			'smoothedfilegeo|0|/res/fairy/dragon/dragon.js',
			'image|/res/fairy/dragon/dragon-diffusemap.jpg',
			'image|/res/fairy/dragon/dragon-normalmap.jpg'),
		'fr-lighthouse' => array(				
			'smoothedfilegeo|0|/res/fairy/lighthouse/lighthouse.js',
			'image|/res/fairy/lighthouse/lighthouse-diffusemap.jpg',
			'image|/res/fairy/lighthouse/lighthouse-normalmap.jpg'),
		'fr-marshall' => array(				
			'smoothedfilegeo|0|/res/fairy/marshall/marshall.js',
			'image|/res/fairy/marshall/marshall-diffusemap.jpg',
			'image|/res/fairy/marshall/marshall-normalmap.jpg'),
		'fr-unicorn' => array(				
			'smoothedfilegeo|0|/res/fairy/unicorn/unicorn.js',
			'image|/res/fairy/unicorn/unicorn-diffusemap.jpg',
			'image|/res/fairy/unicorn/unicorn-normalmap.jpg'),
	);
	$musketeerCommonPreloads = array(
		"image|/res/musketeer/wikipedia-fairy-musketeer-all-sprites.png",
		"image|/res/musketeer/musketeer-select-1B.png",
		"image|/res/musketeer/musketeer-select-2B.png",
		"image|/res/musketeer/musketeer-select-1W.png",
		"image|/res/musketeer/musketeer-select-2W.png",
	); 
	$musketeerPreloads = array(
		'fr-leopard' => array(				
			'smoothedfilegeo|0|/res/musketeer/leopard.js',
			'image|/res/musketeer/leopard-diffusemap.jpg',
			'image|/res/musketeer/leopard-normalmap.jpg'),
		'fr-dragon-musketeer' => array(				
			'smoothedfilegeo|0|/res/musketeer/dragon-musketeer.js',
			'image|/res/musketeer/dragon-musketeer-diffusemap.jpg',
			'image|/res/musketeer/dragon-musketeer-normalmap.jpg'),
		'fr-fortress' => array(				
			'smoothedfilegeo|0|/res/musketeer/fortress.js',
			'image|/res/musketeer/fortress-diffusemap.jpg',
			'image|/res/musketeer/fortress-normalmap.jpg'),
		'fr-spider' => array(				
			'smoothedfilegeo|0|/res/musketeer/spider.js',
			'image|/res/musketeer/spider-diffusemap.jpg',
			'image|/res/musketeer/spider-normalmap.jpg'),
	);
					
	$cbVariants=array(
			
		'classic-chess' => array(
			'model' => array(
				'js' => array(
						'base-model.js',
						'grid-geo-model.js',
						'classic-model.js',
						'classic-db.min.js'
				),
				'rules' => array('en'=>'rules.html','fr'=>'rules-fr.html'),
				'credits' => array('en'=>'credits.html','fr'=>'credits-fr.html'),
				'title-en'=>'Chess',				
				'summary'=>t('Regular Orthodox Classic Western Chess'),
				'levels'=>array_values($cbLevels),
				'gameOptions'=>jocly_array_merge_recursive_distinct($gameOptions,array(
					'levelOptions'=> array(
						'distPawnPromo1Factor' => .3,
						'distPawnPromo2Factor' => .1,
						'distPawnPromo3Factor' => .05,
						'minorPiecesMovedFactor' => .1,
					),
				)),
			),
			'view' => array(
				'js' => array(
						'base-view.js',
						'grid-board-view.js',
						'staunton-set-view.js',
						'extruded-set-view.js',
						'classic-view.js',
				),
				'skins' => array(
					jocly_array_merge_recursive_distinct($skin3d,array(
						'preload'=>array_merge($preloadBase3d,$preloadWikipedia,$preloadStaunton),
					)),
					jocly_array_merge_recursive_distinct($skin3dwall,array(
						'name'=>'skin3dflat',
						'title'=>'3D Flat',
						'preload'=>array_merge($preloadBase3d,$preloadWikipedia,array(
							'image|/res/extruded/wood.jpg',
							'image|/res/extruded/wikipedia-pieces-diffuse-white.jpg',
							'image|/res/extruded/wikipedia-pieces-diffuse-black.jpg',
							'smoothedfilegeo|0|/res/extruded/flat3dpieces-king.js',
							'smoothedfilegeo|0|/res/extruded/flat3dpieces-queen.js',
							'smoothedfilegeo|0|/res/extruded/flat3dpieces-pawn.js',
							'smoothedfilegeo|0|/res/extruded/flat3dpieces-rook.js',
							'smoothedfilegeo|0|/res/extruded/flat3dpieces-knight.js',
							'smoothedfilegeo|0|/res/extruded/flat3dpieces-bishop.js',													
						)),
					)),
					/*array(
						'name'=>'skin2d',
						'title'=>'2D Classic',
						'3d'=>FALSE,
						'preload'=>array_merge($preloadBase2d,$preloadWikipedia),
					),*/
					array(
						'name'=>'skin2dfull',
						'title'=>'2D Classic',
						'3d'=>FALSE,
						'preload'=>array_merge($preloadBase2d,$preloadWikipedia),
					),
					array(
						'name'=>'skin2dwood',
						'title'=>'2D Wood',
						'3d'=>FALSE,
						'preload'=>array_merge($preloadBase2d,$preloadWikipedia,
							array('image|/res/images/woodenpieces2d2.png','image|/res/images/wood.jpg')),
					),
				),
				'visuals' => array(
					'600x600' => array('res/visuals/classic-chess-600x600-3d.jpg','res/visuals/classic-chess-600x600-2d.jpg'),
				),
			),
		),
				
		'xiangqi' => array(
			'model' => array(
				'js' => array(
					'base-model.js',
					'grid-geo-model.js',
					'xiangqi-model.js',
					'xiangqi-db.min.js'
				),
				'released'=>1394466978,
				'title-en'=>'Xiangqi',
				'summary' => t('Chinese Chess'),
				'thumbnail' => 'xiangqi-thumb.png',
				'rules' => array('en'=>'xiangqi-rules.html'),
				'credits' => array('en'=>'xiangqi-credits.html'),
				'description' => array('en'=>'xiangqi-description.html'),
				'levels'=>array_values($cbLevels),
				'gameOptions' => $gameOptions,
			),
			'view' => array(
				'preferredRatio' => 9/10,
				'js' => array(
					'base-view.js',
					'grid-board-view.js',
					'xiangqi-board-view.js',
					'xiangqi-set-view.js',
					'xiangqi-view.js',
				),
				'skins' => array(
					jocly_array_merge_recursive_distinct($skin3d,array(
						'world'=>$xiangqiWorld,
						'preload'=>array_merge($preloadBase3d,array(
							'smoothedfilegeo|0|/res/xiangqi/token.js',
							'image|/res/xiangqi/clearwoodtexture.jpg',
							'image|/res/xiangqi/decoration-cross.png',
							'image|/res/xiangqi/whitebg.png',
							'image|/res/xiangqi/xiangqi-pieces-sprites-playera.png',
							'image|/res/xiangqi/xiangqi-pieces-sprites-playerb.png',
							'image|/res/xiangqi/piecebump.jpg',
						)),
					)),
					jocly_array_merge_recursive_distinct($skin3dwall,array(
						'world'=>$xiangqiWorld,
						'preload'=>array_merge($preloadBase3d,array(
							'smoothedfilegeo|0|/res/xiangqi/token.js',
							'image|/res/xiangqi/wood3.jpg',
							'image|/res/xiangqi/clearwoodtexture.jpg',
							'image|/res/xiangqi/decoration-cross.png',
							'image|/res/xiangqi/whitebg.png',
							'image|/res/xiangqi/xiangqi-pieces-sprites-playera.png',
							'image|/res/xiangqi/xiangqi-pieces-sprites-playerb.png',
							'image|/res/xiangqi/piecebump.jpg',
						)),
					)),
					jocly_array_merge_recursive_distinct($skin3d,array(
						'world'=>$xiangqiWorld,
						'name'=>'skin3dwestern',
						'title'=>'3D Western',
						'preload'=>array_merge($preloadBase3d,array(
							'smoothedfilegeo|0|/res/xiangqi/token.js',
							'image|/res/xiangqi/wood3.jpg',
							'image|/res/xiangqi/clearwoodtexture.jpg',
							'image|/res/xiangqi/decoration-cross.png',
							'image|/res/xiangqi/whitebg.png',
							'image|/res/xiangqi/xiangqi-pieces-sprites-western-player.png',
							'image|/res/xiangqi/piecebump.jpg',
						)),
					)),
					jocly_array_merge_recursive_distinct($skin3dwall,array(
						'world'=>$xiangqiWorld,
						'name'=>'skin3dwallwestern',
						'title'=>'3D Wall Western',
						'preload'=>array_merge($preloadBase3d,array(
							'smoothedfilegeo|0|/res/xiangqi/token.js',
							'image|/res/xiangqi/wood3.jpg',
							'image|/res/xiangqi/clearwoodtexture.jpg',
							'image|/res/xiangqi/decoration-cross.png',
							'image|/res/xiangqi/whitebg.png',
							'image|/res/xiangqi/xiangqi-pieces-sprites-western-player.png',
							'image|/res/xiangqi/piecebump.jpg',
						)),
					)),
					jocly_array_merge_recursive_distinct($skin2d,array(
						'preload'=>array_merge($preloadBase2d,array(
							'image|/res/xiangqi/wood3.jpg',
							'image|/res/xiangqi/clearwoodtexture.jpg',
							'image|/res/xiangqi/decoration-cross.png',
							'image|/res/xiangqi/whitebg.png',
							'image|/res/xiangqi/xiangqi-pieces-sprites.png',
						)),
					)),
					jocly_array_merge_recursive_distinct($skin2d,array(
						'name'=>'skin2dwestern',
						'title'=>'2D Western',
						'preload'=>array_merge($preloadBase2d,array(
							'image|/res/xiangqi/wood3.jpg',
							'image|/res/xiangqi/clearwoodtexture.jpg',
							'image|/res/xiangqi/decoration-cross.png',
							'image|/res/xiangqi/whitebg.png',
							'image|/res/xiangqi/xiangqi-pieces-sprites-western.png',
						)),
					)),
				),
				'visuals' => array(
					'600x600' => array('res/visuals/xiangqi-600x600-3d.jpg','res/visuals/xiangqi-600x600-2d.jpg'),
				),
			),
		),

		'gardner-chess' => array(
			'model' => array(
				'obsolete' => false,
				'js' => array(
					'base-model.js',
					'grid-geo-model.js',
					'gardner-model.js',
				),
				'released'=>1398178578,
				'title-en'=>'Gardner MiniChess',
				'summary'=>t('Gardner 5x5 minichess (1969)'),
				'levels'=>array_values($cbLevels),
				'gameOptions'=> $gameOptions,
				'thumbnail'=>"gardner-thumb.png",
				'rules' => array('en'=>'gardner-rules.html'),
				'description' => array('en'=>'gardner-description.html'),
				'credits' => array('en'=>'gardner-credits.html'),
			),
			'view' => array(
				'js' => array(
					'base-view.js',
					'grid-board-view.js',
					'staunton-set-view.js',
					'gardner-view.js',
				),
				'skins' => array(
					jocly_array_merge_recursive_distinct($skin3d,array(
							'preload'=>array_merge($preloadBase3d,$preloadWikipedia,$preloadStaunton),
					)),
					array(
						'name'=>'skin2d',
						'title'=>'2D Classic',
						'3d'=>FALSE,
						'preload'=>array_merge($preloadBase2d,$preloadWikipedia),
					),
				),
				'visuals' => array(
					'600x600' => array('res/visuals/gardner-600x600-3d.jpg','res/visuals/gardner-600x600-2d.jpg'),
				),
			),
		),
		
		'mini4x4-chess' => array(
			'model' => array(
				'obsolete' => false,
				'js' => array(
					'base-model.js',
					'grid-geo-model.js',
					'mini4x4-model.js',
				),
				'released'=>1398178577,
				'title-en'=>'Mini Chess 4x4',
				'summary'=>t('4x4 mini chess variant'),
				'levels'=>array_values($cbLevels),
				'gameOptions'=> $gameOptions,
				'thumbnail'=>"mini4x4-thumb.png",
				'rules' => array('en'=>'mini4x4-rules.html'),
				'description' => array('en'=>'mini4x4-description.html'),
				'credits' => array('en'=>'mini4x4-credits.html'),
			),
			'view' => array(
				'js' => array(
					'base-view.js',
					'grid-board-view.js',
					'staunton-set-view.js',
					'mini4x4-view.js',
				),
				'skins' => array(
					jocly_array_merge_recursive_distinct($skin3d,array(
							'preload'=>array_merge($preloadBase3d,$preloadWikipedia,$preloadStaunton),
					)),
					array(
						'name'=>'skin2d',
						'title'=>'2D Classic',
						'3d'=>FALSE,
						'preload'=>array_merge($preloadBase2d,$preloadWikipedia),
					),
				),
				'visuals' => array(
					'600x600' => array('res/visuals/mini4x4-600x600-3d.jpg','res/visuals/mini4x4-600x600-2d.jpg'),
				),
			),
		),

		'mini4x5-chess' => array(
			'model' => array(
				'obsolete' => false,
				'js' => array(
					'base-model.js',
					'grid-geo-model.js',
					'mini4x5-model.js',
				),
				'released'=>1398178576,
				'title-en'=>'Mini Chess 4x5',
				'summary'=>t('4x5 mini chess variant'),
				'levels'=>array_values($cbLevels),
				'gameOptions'=> $gameOptions,
				'thumbnail'=>"mini4x5-thumb.png",
				'rules' => array('en'=>'mini4x5-rules.html'),
				'description' => array('en'=>'mini4x5-description.html'),
				'credits' => array('en'=>'mini4x5-credits.html'),
			),
			'view' => array(
				'js' => array(
					'base-view.js',
					'grid-board-view.js',
					'staunton-set-view.js',
					'mini4x5-view.js',
				),
				'skins' => array(
					jocly_array_merge_recursive_distinct($skin3d,array(
							'preload'=>array_merge($preloadBase3d,$preloadWikipedia,$preloadStaunton),
					)),
					array(
						'name'=>'skin2d',
						'title'=>'2D Classic',
						'3d'=>FALSE,
						'preload'=>array_merge($preloadBase2d,$preloadWikipedia),
					),
				),
				'visuals' => array(
					'600x600' => array('res/visuals/mini4x5-600x600-3d.jpg','res/visuals/mini4x5-600x600-2d.jpg'),
				),
			),
		),

		'micro4x5-chess' => array(
			'model' => array(
				'obsolete' => false,
				'js' => array(
					'base-model.js',
					'grid-geo-model.js',
					'micro4x5-model.js',
				),
				'released'=>1398178575,
				'title-en'=>'Micro Chess',
				'summary'=>t('4x5 chess variant by Glimne (1997)'),
				'levels'=>array_values($cbLevels),
				'gameOptions'=> $gameOptions,
				'thumbnail'=>"micro4x5-thumb.png",
				'rules' => array('en'=>'micro4x5-rules.html'),
				'description' => array('en'=>'micro4x5-description.html'),
				'credits' => array('en'=>'micro4x5-credits.html'),
			),
			'view' => array(
				'js' => array(
					'base-view.js',
					'grid-board-view.js',
					'staunton-set-view.js',
					'micro4x5-view.js',
				),
				'skins' => array(
					jocly_array_merge_recursive_distinct($skin3d,array(
							'preload'=>array_merge($preloadBase3d,$preloadWikipedia,$preloadStaunton),
					)),
					array(
						'name'=>'skin2d',
						'title'=>'2D Classic',
						'3d'=>FALSE,
						'preload'=>array_merge($preloadBase2d,$preloadWikipedia),
					),
				),
				'visuals' => array(
					'600x600' => array('res/visuals/micro4x5-600x600-3d.jpg','res/visuals/micro4x5-600x600-2d.jpg'),
				),
			),
		),

		'baby-chess' => array(
			'model' => array(
				'obsolete' => false,
				'js' => array(
					'base-model.js',
					'grid-geo-model.js',
					'baby-model.js',
				),
				'released'=>1398178574,
				'title-en'=>'Baby Chess',
				'summary'=>t('5x5 Baby chess'),
				'levels'=>array_values($cbLevels),
				'gameOptions'=> $gameOptions,
				'thumbnail'=>"baby-thumb.png",
				'rules' => array('en'=>'baby-rules.html'),
				'description' => array('en'=>'baby-description.html'),
				'credits' => array('en'=>'baby-credits.html'),
			),
			'view' => array(
				'js' => array(
					'base-view.js',
					'grid-board-view.js',
					'staunton-set-view.js',
					'baby-view.js',
				),
				'skins' => array(
					jocly_array_merge_recursive_distinct($skin3d,array(
							'preload'=>array_merge($preloadBase3d,$preloadWikipedia,$preloadStaunton),
					)),
					array(
						'name'=>'skin2d',
						'title'=>'2D Classic',
						'3d'=>FALSE,
						'preload'=>array_merge($preloadBase2d,$preloadWikipedia),
					),
				),
				'visuals' => array(
					'600x600' => array('res/visuals/baby-600x600-3d.jpg','res/visuals/baby-600x600-2d.jpg'),
				),
			),
		),

		'malett-chess' => array(
			'model' => array(
				'obsolete' => false,
				'js' => array(
					'base-model.js',
					'grid-geo-model.js',
					'malett-model.js',
				),
				'released'=>1398178573,
				'title-en'=>'Malett Chess',
				'summary'=>t('5x5 chess variant by Jeff Malett'),
				'levels'=>array_values($cbLevels),
				'gameOptions'=> $gameOptions,
				'thumbnail'=>"malett-thumb.png",
				'rules' => array('en'=>'malett-rules.html'),
				'description' => array('en'=>'malett-description.html'),
				'credits' => array('en'=>'malett-credits.html'),
			),
			'view' => array(
				'js' => array(
					'base-view.js',
					'grid-board-view.js',
					'staunton-set-view.js',
					'malett-view.js',
				),
				'skins' => array(
					jocly_array_merge_recursive_distinct($skin3d,array(
							'preload'=>array_merge($preloadBase3d,$preloadWikipedia,$preloadStaunton),
					)),
					array(
						'name'=>'skin2d',
						'title'=>'2D Classic',
						'3d'=>FALSE,
						'preload'=>array_merge($preloadBase2d,$preloadWikipedia),
					),
				),
				'visuals' => array(
					'600x600' => array('res/visuals/malett-600x600-3d.jpg','res/visuals/malett-600x600-2d.jpg'),
				),
			),
		),
		
		'los-alamos-chess' => array(
			'model' => array(
				'obsolete' => false,
				'js' => array(
					'base-model.js',
					'grid-geo-model.js',
					'los-alamos-model.js',
				),
				'released'=>1398178573,
				'title-en'=>'Los Alamos Chess',
				'summary'=>t('6x6 chess variant'),
				'levels'=>array_values($cbLevels),
				'gameOptions'=> $gameOptions,
				'thumbnail'=>"los-alamos-thumb.png",
				'rules' => array('en'=>'los-alamos-rules.html'),
				'description' => array('en'=>'los-alamos-description.html'),
				'credits' => array('en'=>'los-alamos-credits.html'),
			),
			'view' => array(
				'js' => array(
					'base-view.js',
					'grid-board-view.js',
					'staunton-set-view.js',
					'los-alamos-view.js',
				),
				'skins' => array(
					jocly_array_merge_recursive_distinct($skin3d,array(
							'preload'=>array_merge($preloadBase3d,$preloadWikipedia,$preloadStaunton),
					)),
					array(
						'name'=>'skin2d',
						'title'=>'2D Classic',
						'3d'=>FALSE,
						'preload'=>array_merge($preloadBase2d,$preloadWikipedia),
					),
				),
				'visuals' => array(
					'600x600' => array('res/visuals/los-alamos-600x600-3d.jpg','res/visuals/los-alamos-600x600-2d.jpg'),
				),
			),
		),

		'attack-chess' => array(
			'model' => array(
				'obsolete' => false,
				'js' => array(
					'base-model.js',
					'grid-geo-model.js',
					'attack-model.js',
				),
				'released'=>1398178572,
				'title-en'=>'Chess Attack',
				'summary'=>t('5x6 chess variant'),
				'levels'=>array_values($cbLevels),
				'gameOptions'=> $gameOptions,
				'thumbnail'=>"attack-thumb.png",
				'rules' => array('en'=>'attack-rules.html'),
				'description' => array('en'=>'attack-description.html'),
				'credits' => array('en'=>'attack-credits.html'),
			),
			'view' => array(
				'js' => array(
					'base-view.js',
					'grid-board-view.js',
					'staunton-set-view.js',
					'attack-view.js',
				),
				'skins' => array(
					jocly_array_merge_recursive_distinct($skin3d,array(
							'preload'=>array_merge($preloadBase3d,$preloadWikipedia,$preloadStaunton),
					)),
					array(
						'name'=>'skin2d',
						'title'=>'2D Classic',
						'3d'=>FALSE,
						'preload'=>array_merge($preloadBase2d,$preloadWikipedia),
					),
				),
				'visuals' => array(
					'600x600' => array('res/visuals/attack-600x600-3d.jpg','res/visuals/attack-600x600-2d.jpg'),
				),
			),
		),

		'courier-chess' => array(
			'model' => array(
				'js' => array(
					'base-model.js',
					'grid-geo-model.js',
					'courier-model.js',
				),
				'released'=>1393430178,
				'thumbnail' => 'courier-thumb.png',
				'title-en'=>'Courier Chess',
				'rules' => array('en'=>'courier-rules.html'),
				'credits' => array('en'=>'courier-credits.html'),
				'description' => array('en'=>'courier-description.html'),
				'summary'=>t('12x8 chess (12th century)'),
				'levels'=>array_values($cbLevels2),
				'gameOptions'=> $gameOptions,
			),
			'view' => array(
					'preferredRatio' => 12/8,
					'js' => array(
					'base-view.js',
					'grid-board-view.js',
					'courier-board-view.js',
					'courierchess-set-view.js',
					'courier-view.js',
				),
				'skins' => array(
					jocly_array_merge_recursive_distinct($skin3d,array(
							'preload'=>array_merge(
								$preloadBase3d,
								$preloadCourier,
								array(
									"image|/res/images/crackles.jpg",
									"image|/res/images/tileralpha.png",
								)),
							'camera'=>array(
								'fov'=>45,
								'distMax'=>50,
								'radius'=>12,
								'elevationAngle'=>60,
								'elevationMin'=>0,
							),			
					)),
					array(
						'name'=>'skin2d',
						'title'=>'2D Classic',
						'3d'=>FALSE,
						'preload'=>array_merge($preloadWikipediaCourier),
					),
				),
				'visuals' => array(
					'600x600' => array('res/visuals/courier-600x600-3d.jpg','res/visuals/courier-600x600-2d.jpg'),
				),
			),
		),
			
		'makruk' => array(
			'model' => array(
				'js' => array(
					'base-model.js',
					'grid-geo-model.js',
					'makruk-model.js',
				),
				'released'=>1393948578,
				'title-en'=>'Makruk',
				'summary'=>t('Thai Chess'),
				'thumbnail' => 'mk-thumb.png',
				'rules' => array('en'=>'mk-rules.html'),
				'credits' => array('en'=>'mk-credits.html'),
				'description' => array('en'=>'mk-description.html'),
				'levels'=>array_values($cbLevels),
				'gameOptions'=> $gameOptions,
			),
			'view' => array(
				'js' => array(
					'base-view.js',
					'grid-board-view.js',
					'makruk-board-view.js',
					'makruk-set-view.js',
					'makruk-view.js',
				),
				'skins' => array(
					jocly_array_merge_recursive_distinct($skin3d,array(
						'world'=>$makrukWorld,
							'preload'=>array_merge($preloadBase3d,$preloadWikipedia,array(
								'image|/res/images/wood-chipboard-5.jpg',
									'smoothedfilegeo|0|/res/makruk/pawn/mk-pawn.js',
									'image|/res/makruk/pawn/mk-pawn-diffusemap.jpg',
									'image|/res/makruk/pawn/mk-pawn-normalmap.jpg',
									'smoothedfilegeo|0|/res/makruk/knight/mk-knight.js',
									'image|/res/makruk/knight/mk-knight-diffusemap.jpg',
									'image|/res/makruk/knight/mk-knight-normalmap.jpg',
									'smoothedfilegeo|0|/res/makruk/bishop/mk-bishop.js',
									'image|/res/makruk/bishop/mk-bishop-diffusemap.jpg',
									'image|/res/makruk/bishop/mk-bishop-normalmap.jpg',
									'smoothedfilegeo|0|/res/makruk/rook/mk-rook.js',
									'image|/res/makruk/rook/mk-rook-diffusemap.jpg',
									'image|/res/makruk/rook/mk-rook-normalmap.jpg',
									'smoothedfilegeo|0|/res/makruk/queen/mk-queen.js',
									'image|/res/makruk/queen/mk-queen-diffusemap.jpg',
									'image|/res/makruk/queen/mk-queen-normalmap.jpg',
									'smoothedfilegeo|0|/res/makruk/king/mk-king.js',
									'image|/res/makruk/king/mk-king-diffusemap.jpg',
									'image|/res/makruk/king/mk-king-normalmap.jpg'
							)),
					)),
					array(
						'name'=>'skin2d',
						'title'=>'2D Classic',
						'3d'=>FALSE,
						'preload'=>array_merge($preloadBase2d,$preloadWikipedia,
							array('image|/res/images/wood-chipboard-4.jpg')
						),
					),
				),
				'visuals' => array(
					'600x600' => array('res/visuals/makruk-600x600-3d.jpg','res/visuals/makruk-600x600-2d.jpg'),
				),
			),
		),
			
		'shako-chess' => array(
			'model' => array(
				//'obsolete' => true,
				'js' => array(
					'base-model.js',
					'grid-geo-model.js',
					'shako-model.js',
				),
				'released'=>1396536978,
				'thumbnail' => 'shako-thumb.png',
				'title-en'=>'Shako',
				'summary'=>t('10x10 Chess'),
				'rules' => array('en'=>'shako-rules.html','fr'=>'shako-rules-fr.html'),
				'description' => array('en'=>'shako-description.html','fr'=>'shako-description-fr.html'),
				'credits' => array('en'=>'shako-credits.html','fr'=>'shako-credits-fr.html'),
				'levels'=>array_values($cbLevels3),
				'gameOptions'=> $gameOptions,
			),
			'view' => array(
				'js' => array(
					'base-view.js',
					'grid-board-view.js',
					'fairy-set-view.js',
					'shako-view.js',
				),
				'skins' => array(
					jocly_array_merge_recursive_distinct($skin3d,array(
							'preload'=>array_merge($preloadBase3d,$preloadWikipedia),
					)),
					array(
						'name'=>'skin2d',
						'title'=>'2D Classic',
						'3d'=>FALSE,
						'preload'=>array_merge($preloadBase2d,$preloadWikipedia),
					),
				),
				'visuals' => array(
					'600x600' => array('res/visuals/shako-600x600-3d.jpg','res/visuals/shako-600x600-2d.jpg'),
				),
			),
		),
			
		'shatranj-chess' => array(
			'model' => array(
				'obsolete' => false,
				'js' => array(
					'base-model.js',
					'grid-geo-model.js',
					'shatranj-model.js',
				),
				'released'=>1401461778,
				'thumbnail' => 'shatranj-thumb.png',
				'title-en'=>'Shatranj',
				'summary'=>t('Ancient Chess'),
				'rules' => array('en'=>'shatranj-rules.html'),
				'description' => array('en'=>'shatranj-description.html'),
				'credits' => array('en'=>'shatranj-credits.html'),
				'levels'=>array_values($cbLevels),
				'gameOptions'=>jocly_array_merge_recursive_distinct($gameOptions,array(
					'levelOptions'=> array(
						'distPawnPromo1Factor' => .15,
						'distPawnPromo2Factor' => .05,
						'distPawnPromo3Factor' => .025,
						'minorPiecesMovedFactor' => .1,
					),
				)),
			),
			'view' => array(
				'js' => array(
					'base-view.js',
					'grid-board-view.js',
					'shatranj-board-view.js',				
					'nishapur-set-view.js',
					'shatranj-view.js',
				),
				'skins' => array(
					jocly_array_merge_recursive_distinct($skin3d,array(
							'world'=>$makrukWorld,
							'preload'=>array_merge($preloadBase3d,$preloadNishapur,$preloadWikipedia,
							array('image|/res/images/wood-chipboard-2.jpg')),					
					)),
					array(
						'name'=>'skin2d',
						'title'=>'2D Classic',
						'3d'=>FALSE,
						'preload'=>array_merge($preloadBase2d,$preloadWikipedia,
							array('image|/res/images/wood-chipboard-2.jpg','image|/res/nishapur/nishapur-2d-sprites.png')),
					),
				),
				'visuals' => array(
					'600x600' => array('res/visuals/shatranj-600x600-3d.jpg','res/visuals/shatranj-600x600-2d.jpg'),
				),
			),
		),

		'basic-chess' => array(
			'model' => array(
				'obsolete' => true,
				'js' => array(
					'base-model.js',
					'grid-geo-model.js',
					'basic-model.js',
				),
				'title-en'=>'Basic Chess',
				'summary'=>t('Basic Chess'),
				'levels'=>array_values($cbLevels),
				'gameOptions'=>jocly_array_merge_recursive_distinct($gameOptions,array(
					'levelOptions'=> array(
						'distPawnPromo1Factor' => .3,
						'distPawnPromo2Factor' => .1,
						'distPawnPromo3Factor' => .05,
						'minorPiecesMovedFactor' => .1,
					),
				)),
			),
			'view' => array(
				'js' => array(
					'base-view.js',
					'grid-board-view.js',
					'staunton-set-view.js',
					'basic-view.js',
				),
				'skins' => array(
					$skin3d,
					$skin2d,
				),
			),
		),
				
		'raumschach' => array(
			'model' => array(
				'obsolete' => false,
				'js' => array(
					'base-model.js',
					'multiplan-geo-model.js',
					'raumschach-model.js',
				),
				'released'=>1402066578,
				'title-en'=>'Raumschach',
				'summary'=>t('5x5x5 Chess'),
				'thumbnail' => 'raumschach-thumb.png',
				'rules' => array('en'=>'raumschach-rules.html'),
				'description' => array('en'=>'raumschach-description.html'),
				'credits' => array('en'=>'raumschach-credits.html'),
				'levels'=>array_values($cbLevels2),
				'gameOptions'=>jocly_array_merge_recursive_distinct($gameOptions,array(
					'levelOptions'=> array(
						'distPawnPromo1Factor' => .3,
						'distPawnPromo2Factor' => .1,
						'distPawnPromo3Factor' => .05,
						'minorPiecesMovedFactor' => .1,
					),
				)),
			),
			'view' => array(
				'js' => array(
					'base-view.js',
					'multiplan-board-view.js',
					'fairy-set-view.js',
					'raumschach-view.js',
				),
				'preferredRatio' => 1.1,
				'visuals' => array(
					'600x600' => array('res/visuals/raumschach-600x600-3d.jpg','res/visuals/raumschach-600x600-2d.jpg'),
				),
				'skins' => array(
					jocly_array_merge_recursive_distinct($skin3d,array(
						'camera'=>array(
							//'fov'=>45,
							'distMax'=>200,
							'radius'=>24,
							'elevationAngle'=>40,
							'elevationMin'=>-89,
							'rotationAngle'=>150,
							'target'=>array(0,0,5000),
							'targetBounds'=>array(3000,3000,6000),
						),					
										'world'=>array(
												'lightIntensity'=>1,
												'skyLightIntensity'=>1,
												'lightCastShadow'=>false,
												'fog' => false,
												//'color'=>0x111111,
												'color'=>0x4783D4,
												//'lightPosition'=>array('x'=>10,'y'=>15,'z'=>-15),
												'lightShadowDarkness'=>0.55,
												'ambientLightColor'=>0xffffff,
										),
						'world'=>array(
							'lightIntensity'=>1,
							'skyLightIntensity'=>0.5,// 1,
							'lightCastShadow'=>false, 
							'fog' => false,
							'color'=>0x4783D4,
							'lightShadowDarkness'=>0.55,
							'ambientLightColor'=>0xffffff,
						),
						'preload'=>array_merge($preloadBase3d,$preloadWikipedia,
							$frPreloads['fr-pawn'],
							$frPreloads['fr-knight'],
							$frPreloads['fr-bishop'],
							$frPreloads['fr-queen'],
							$frPreloads['fr-king'],
							$frPreloads['fr-rook'],
							$frPreloads['fr-unicorn']
						),
					)),
					jocly_array_merge_recursive_distinct($skin2d,
						array(
							'preload'=>array_merge($preloadWikipedia,$preloadBase2d),
						)
					),
				),
			),
		),

		'glinski-chess' => array(
				'model' => array(
						'obsolete' => false,
						'js' => array(
								'base-model.js',
								'hex-geo-model.js',
								'glinski-model.js',
						),
						'released'=>1396882578,
						'rules'=>array('en'=>'glinski-rules.html'),
						'description'=>array('en'=>'glinski-description.html'),
						'credits'=>array('en'=>'glinski-credits.html'),
						'thumbnail' => 'glinski-thumb.png',
						'title-en'=>'Glinski Chess',
						'summary'=>t('Hexagonal Chess'),
						'levels'=>array_values($cbLevels3),
						'gameOptions'=>jocly_array_merge_recursive_distinct($gameOptions,array(
								'levelOptions'=> array(
										'distPawnPromo1Factor' => .3,
										'distPawnPromo2Factor' => .1,
										'distPawnPromo3Factor' => .05,
										'minorPiecesMovedFactor' => .1,
								),
						)),
				),
				'view' => array(
						'preferredRatio' => .89,
						'js' => array(
								'base-view.js',
								'hex-board-view.js',
								'staunton-set-view.js',
								'glinski-view.js',
						),
						'css' => array(
								'chessbase.css',
								'hex.css',
						),
						'skins' => array(
							jocly_array_merge_recursive_distinct($skin3d,array(
								'camera'=>array(
									'distMin'=>0,
									'radius'=>13.5,
									'elevationAngle'=>45,
								),
								'preload'=>array_merge($preloadBase3dHex,$preloadWikipedia,$preloadStaunton),
							)),
							jocly_array_merge_recursive_distinct($skin2d,
								array(
									'preload'=>array_merge($preloadWikipedia,
										array(
											'image|/res/images/whitebg.png',
											'image|/res/images/cancel.png',
										)
									)
								)
							),
						),
						'visuals' => array(
							'600x600' => array('res/visuals/glinski-600x600-3d.jpg','res/visuals/glinski-600x600-2d.jpg'),
						),
					),
		),
			
		'brusky-chess' => array(
				'model' => array(
						'obsolete' => false,
						'js' => array(
								'base-model.js',
								'hex-geo-model.js',
								'brusky-model.js',
						),
						'released'=>1398790818,
						'title-en'=>'Brusky Chess',
						'summary'=>t('Hexagonal Chess'),
						'rules'=>array('en'=>'brusky-rules.html'),
						'description'=>array('en'=>'brusky-description.html'),
						'credits'=>array('en'=>'brusky-credits.html'),
						'thumbnail' => 'brusky-thumb.png',
						'levels'=>array_values($cbLevels3),
						'gameOptions'=>jocly_array_merge_recursive_distinct($gameOptions,array(
								'levelOptions'=> array(
										'distPawnPromo1Factor' => .3,
										'distPawnPromo2Factor' => .1,
										'distPawnPromo3Factor' => .05,
										'minorPiecesMovedFactor' => .1,
								),
						)),
				),
				'view' => array(
						'preferredRatio' => 1.7,
						'js' => array(
								'base-view.js',
								'hex-board-view.js',
								'staunton-set-view.js',
								'brusky-view.js',
						),
						'css' => array(
								'chessbase.css',
								'hex.css',
						),
						'skins' => array(
							jocly_array_merge_recursive_distinct($skin3d,array(
								'camera'=>array(
									'distMin'=>0,
									'radius'=>13.5,
									'elevationAngle'=>45,
								),
							)),					
							jocly_array_merge_recursive_distinct($skin2d,
								array(
									'preload'=>array_merge($preloadWikipedia,
										array(
											'image|/res/images/whitebg.png',
											'image|/res/images/cancel.png',
										)
									)
								)
							),
						),
						'visuals' => array(
							'600x600' => array('res/visuals/brusky-600x600-3d.jpg','res/visuals/brusky-600x600-2d.jpg'),
						),
				),
		),
			
		'devasa-chess' => array(
				'model' => array(
						'obsolete' => false,
						'js' => array(
								'base-model.js',
								'hex-geo-model.js',
								'devasa-model.js',
						),
						'released'=>1403189777,
						'title-en'=>'De Vasa Chess',
						'summary'=>t('Hexagonal Chess'),
						'rules'=>array('en'=>'devasa-rules.html'),
						'description'=>array('en'=>'devasa-description.html'),
						'credits'=>array('en'=>'devasa-credits.html'),
						'thumbnail' => 'devasa-thumb.png',
						'levels'=>array_values($cbLevels3),
						'gameOptions'=>jocly_array_merge_recursive_distinct($gameOptions,array(
								'levelOptions'=> array(
										'distPawnPromo1Factor' => .3,
										'distPawnPromo2Factor' => .1,
										'distPawnPromo3Factor' => .05,
										'minorPiecesMovedFactor' => .1,
								),
						)),
				),
				'view' => array(
						'preferredRatio' => 1.154700538,
						'js' => array(
								'base-view.js',
								'hex-board-view.js',
								'staunton-set-view.js',
								'devasa-view.js',
						),
						'css' => array(
								'chessbase.css',
								'hex.css',
						),
						'skins' => array(
							jocly_array_merge_recursive_distinct($skin3d,array(
								'camera'=>array(
									'distMin'=>0,
									'radius'=>14.5,
									'elevationAngle'=>45,
									'rotationAngle'=>80,
								),
								'preload'=>array_merge($preloadBase3dHex,$preloadWikipedia,$preloadStaunton),
							)),					
							jocly_array_merge_recursive_distinct($skin2d,
								array(
									'preload'=>array_merge($preloadWikipedia,
										array(
											'image|/res/images/whitebg.png',
											'image|/res/images/cancel.png',
										)
									)
								)
							),
						),
						'visuals' => array(
							'600x600' => array('res/visuals/devasa-600x600-3d.jpg','res/visuals/devasa-600x600-2d.jpg'),
						),
				),
		),
			

		'mccooey-chess' => array(
				'model' => array(
						'obsolete' => false,
						'js' => array(
								'base-model.js',
								'hex-geo-model.js',
								'mccooey-model.js',
						),
						'released'=>1402671378,
						'title-en'=>'McCooey Chess',
						'summary'=>t('Hexagonal Chess'),
						'rules'=>array('en'=>'mccooey-rules.html'),
						'description'=>array('en'=>'mccooey-description.html'),
						'credits'=>array('en'=>'mccooey-credits.html'),
						'thumbnail' => 'mccooey-thumb.png',
						'levels'=>array_values($cbLevels3),
						'gameOptions'=>jocly_array_merge_recursive_distinct($gameOptions,array(
								'levelOptions'=> array(
										'distPawnPromo1Factor' => .3,
										'distPawnPromo2Factor' => .1,
										'distPawnPromo3Factor' => .05,
										'minorPiecesMovedFactor' => .1,
								),
						)),
				),
				'view' => array(
						'js' => array(
								'base-view.js',
								'hex-board-view.js',
								'staunton-set-view.js',
								'mccooey-view.js',
						),
						'css' => array(
								'chessbase.css',
								'hex.css',
						),
						'skins' => array(
								jocly_array_merge_recursive_distinct($skin3d,array(
										'camera'=>array(
												'distMin'=>0,
												'radius'=>13.5,
												'elevationAngle'=>45,
										),
								'preload'=>array_merge($preloadBase3dHex,$preloadWikipedia,$preloadStaunton),
							)),
							jocly_array_merge_recursive_distinct($skin2d,
								array(
									'preload'=>array_merge($preloadWikipedia,
										array(
											'image|/res/images/whitebg.png',
											'image|/res/images/cancel.png',
										)
									)
								)
							),
						),
						'visuals' => array(
							'600x600' => array('res/visuals/mccooey-600x600-3d.jpg','res/visuals/mccooey-600x600-2d.jpg'),
						),
						
				),
		),
				
		'shafran-chess' => array(
				'model' => array(
						'obsolete' => false,
						'js' => array(
								'base-model.js',
								'hex-geo-model.js',
								'shafran-model.js',
						),
						'released'=>1403535378,
						'title-en'=>'Shafran Chess',
						'summary'=>t('Hexagonal Chess'),
						'rules'=>array('en'=>'shafran-rules.html'),
						'description'=>array('en'=>'shafran-description.html'),
						'credits'=>array('en'=>'shafran-credits.html'),
						'thumbnail' => 'shafran-thumb.png',
						'levels'=>array_values($cbLevels3),
						'gameOptions'=>jocly_array_merge_recursive_distinct($gameOptions,array(
								'levelOptions'=> array(
										'distPawnPromo1Factor' => .3,
										'distPawnPromo2Factor' => .1,
										'distPawnPromo3Factor' => .05,
										'minorPiecesMovedFactor' => .1,
								),
						)),
				),
				'view' => array(
						'js' => array(
								'base-view.js',
								'hex-board-view.js',
								'staunton-set-view.js',
								'shafran-view.js',
						),
						'css' => array(
								'chessbase.css',
								'hex.css',
						),
						'skins' => array(
								jocly_array_merge_recursive_distinct($skin3d,array(
										'camera'=>array(
												'distMin'=>0,
												'radius'=>13.5,
												'elevationAngle'=>45,
										),
										'preload'=>array_merge($preloadBase3dCirc,$preloadWikipedia,$preloadStaunton),
								)),
								jocly_array_merge_recursive_distinct($skin2d,
									array(
										'preload'=>array_merge($preloadWikipedia,
											array(
												'image|/res/images/whitebg.png',
												'image|/res/images/cancel.png',
											)
										)
									)
								),
						),
						'visuals' => array(
							'600x600' => array('res/visuals/shafran-600x600-3d.jpg','res/visuals/shafran-600x600-2d.jpg'),
						),
				),
		),
				
		'circular-chess' => array(
				'model' => array(
						'obsolete' => false,
						'js' => array(
								'base-model.js',
								'cylinder-geo-model.js',
								'circular-model.js',
						),
						'released'=>1397055378,
						'title-en'=>'Modern Circular Chess',
						'rules'=>array('en'=>'circular-rules.html'),
						'description'=>array('en'=>'circular-description.html'),
						'credits'=>array('en'=>'circular-credits.html'),
						'thumbnail' => 'circular-thumb.png',
						'summary'=>t('Chess on a ring'),
						'levels'=>array_values($cbLevels),
						'gameOptions'=>jocly_array_merge_recursive_distinct($gameOptions,array(
								'levelOptions'=> array(
										'distPawnPromo1Factor' => .3,
										'distPawnPromo2Factor' => .1,
										'distPawnPromo3Factor' => .05,
										'minorPiecesMovedFactor' => .1,
								),
						)),
				),
				'view' => array(
						'js' => array(
								'base-view.js',
								'circular-board-view.js',
								'staunton-set-view.js',
								'circular-view.js',
						),
						'css' => array(
								'chessbase.css',
								'circular.css',
						),
						'skins' => array(
								jocly_array_merge_recursive_distinct($skin3d,array(
										'camera'=>array(
												'distMin'=>0,
												'radius'=>14.5,
												'elevationAngle'=>45,
										),
										'preload'=>array_merge($preloadBase3dCirc,$preloadWikipedia,$preloadStaunton),
								)),
								jocly_array_merge_recursive_distinct($skin2d,
									array(
										'preload'=>array_merge($preloadWikipedia,
											array(
												'image|/res/images/whitebg.png',
												'image|/res/images/cancel.png',
											)
										)
									)
								),
						),
						'visuals' => array(
							'600x600' => array('res/visuals/circular-600x600-3d.jpg','res/visuals/circular-600x600-2d.jpg'),
						),
				),
		),
		
		'byzantine-chess' => array(
				'model' => array(
						'obsolete' => false,
						'js' => array(
								'base-model.js',
								'cylinder-geo-model.js',
								'byzantine-model.js',
						),
						'released'=>1401461778,
						'title-en'=>'Byzantine Chess',
						'rules'=>array('en'=>'byzantine-rules.html'),
						'description'=>array('en'=>'byzantine-description.html'),
						'credits'=>array('en'=>'byzantine-credits.html'),
						'thumbnail' => 'byzantine-thumb.png',
						'summary'=>t('10th century circular Chess'),
						'levels'=>array_values($cbLevels),
						'gameOptions'=>jocly_array_merge_recursive_distinct($gameOptions,array(
								'levelOptions'=> array(
										'minorPiecesMovedFactor' => .1,
										'distPawnPromo1Factor' => .15,
										'distPawnPromo2Factor' => .05,
										'distPawnPromo3Factor' => .025,
								),
						)),
				),
				'view' => array(
						'js' => array(
								'base-view.js',
								'circular-board-view.js',
								'nishapur-set-view.js',
								'byzantine-view.js',
						),
						'css' => array(
								'chessbase.css',
								'circular.css',
						),
						'skins' => array(
								jocly_array_merge_recursive_distinct($skin3d,array(
										'world'=>$makrukWorld,
										'preload'=>array_merge($preloadBase3d,$preloadNishapur,$preloadWikipedia,
										array('image|/res/byzantine/byzantine-board.jpg')),					
										'camera'=>array(
												'distMin'=>0,
												'radius'=>14.5,
												'elevationAngle'=>45,
										),
								)),
								jocly_array_merge_recursive_distinct($skin2d,
									array(
										'preload'=>array_merge($preloadWikipedia,
											array(
												'image|/res/byzantine/byzantine-board.jpg',
												'image|/res/nishapur/nishapur-2d-sprites.png'
											)
										)
									)
								)
						),
						'visuals' => array(
							'600x600' => array('res/visuals/byzantine-600x600-3d.jpg','res/visuals/byzantine-600x600-2d.jpg'),
						),
				),
		),
			
		'3dchess' => array(
				'model' => array(
						'obsolete' => false,
						'js' => array(
								'base-model.js',
								'multiplan-geo-model.js',
								'3dchess-model.js',
						),
						'released'=>1402584978,
						'title-en'=>'3D Chess',
						'summary'=>t('6x8x3 Chess'),
						'thumbnail' => '3dchess-thumb.png',
						'rules' => array('en'=>'3dchess-rules.html'),
						'description' => array('en'=>'3dchess-description.html'),
						'credits' => array('en'=>'3dchess-credits.html'),
						'levels'=>array_values($cbLevels3),
						'gameOptions'=>jocly_array_merge_recursive_distinct($gameOptions,array(
								'levelOptions'=> array(
										'distPawnPromo1Factor' => .3,
										'distPawnPromo2Factor' => .1,
										'distPawnPromo3Factor' => .05,
										'minorPiecesMovedFactor' => .1,
								),
						)),
				),
				'view' => array(
						'js' => array(
								'base-view.js',
								'multiplan-board-view.js',
								'staunton-set-view.js',
								'3dchess-view.js',
						),
						'preferredRatio' => 1,
						'skins' => array(
								jocly_array_merge_recursive_distinct($skin3d,array(
										'camera'=>array(
												//'fov'=>45,
												'distMax'=>200,
												'radius'=>18,
												'elevationAngle'=>30,
												'elevationMin'=>-89,
												'rotationAngle'=>150,
												'target'=>array(0,0,2500),
												'targetBounds'=>array(3000,3000,6000),
										),
										'world'=>array(
												'lightIntensity'=>0.8,
												'skyLightIntensity'=>0.5,
												'lightCastShadow'=>false,
												'fog' => false,
												//'color'=>0x111111,
												'color'=>0x4783D4,
												//'lightPosition'=>array('x'=>10,'y'=>15,'z'=>-15),
												'lightShadowDarkness'=>0.55,
												'ambientLightColor'=>0x888888,
										),
										'preload'=>array_merge($preloadBase3d,$preloadWikipedia,$preloadStaunton),
								)),
								jocly_array_merge_recursive_distinct($skin2d,
									array(
										'preload'=>array_merge($preloadWikipedia,$preloadBase2d),
									)
								),
						),
						'visuals' => array(
							'600x600' => array('res/visuals/3dchess-600x600-3d.jpg','res/visuals/3dchess-600x600-2d.jpg'),
						),
				),
		),
			
		'cylinder-chess' => array(
				'model' => array(
						'obsolete' => false,
						'js' => array(
								'base-model.js',
								'cylinder-geo-model.js',
								'cylinder-model.js',
						),
						'released'=>1401720978,
						'thumbnail' => 'cylinder-thumb.png',
						'rules'=>array('en'=>'cylinder-rules.html'),
						'description'=>array('en'=>'cylinder-description.html'),
						'credits'=>array('en'=>'cylinder-credits.html'),
						'title-en'=>'Cylinder Chess',
						'summary'=>t('Cylinder Chess'),
						'levels'=>array_values($cbLevels),
						'gameOptions'=>jocly_array_merge_recursive_distinct($gameOptions,array(
								'levelOptions'=> array(
										'distPawnPromo1Factor' => .3,
										'distPawnPromo2Factor' => .1,
										'distPawnPromo3Factor' => .05,
										'minorPiecesMovedFactor' => .1,
								),
						)),
				),
				'view' => array(
						'js' => array(
								'base-view.js',
								'grid-board-view.js',
								'cylinder-board-view.js',
								'staunton-set-view.js',
								'cylinder-view.js',
						),
						'skins' => array(
								jocly_array_merge_recursive_distinct($skin3d,array(
										'camera'=>array(
												//'fov'=>45,
												'distMax'=>200,
												'radius'=>18,
												'elevationAngle'=>0,
												'elevationMin'=>-89,
												'rotationAngle'=>-90,
												'target'=>array(0,0,0),
												'targetBounds'=>array(3000,3000,6000),
										),
										'world'=>array(
												'lightIntensity'=>1,
												'skyLightIntensity'=>1,
												'lightCastShadow'=>false,
												'fog' => false,
												//'color'=>0x111111,
												'color'=>0x4783D4,
												'lightPosition'=>array('x'=>10,'y'=>15,'z'=>0),
												'lightShadowDarkness'=>0.55,
												'ambientLightColor'=>0xffffff,
										),
								)),
								jocly_array_merge_recursive_distinct($skin2d,
									array(
										'preload'=>array_merge($preloadWikipedia,$preloadBase2d),
									)
								),
						),
						'visuals' => array(
							'600x600' => array('res/visuals/cylinder-600x600-3d.jpg','res/visuals/cylinder-600x600-2d.jpg'),
						),
				),
		),

		'cubic-chess' => array(
				'model' => array(
						'obsolete' => true,
						'js' => array(
								'base-model.js',
								'cubic-geo-model.js',
								'cubic-model.js',
						),
						'released'=>1395590178,
						'thumbnail' => 'cubic-chess-thumb.png',
						'title-en'=>'360 Chess Authoring',
						'summary'=>t('Inventing the 360 Chess variant on a cube'),
						'levels'=>array_values($cbLevels),
						'gameOptions'=>jocly_array_merge_recursive_distinct($gameOptions,array(
								'levelOptions'=> array(
										'distPawnPromo1Factor' => .3,
										'distPawnPromo2Factor' => .1,
										'distPawnPromo3Factor' => .05,
										'minorPiecesMovedFactor' => .1,
								),
						)),
				),
				'view' => array(
						'js' => array(
								'base-view.js',
								'cubic-board-view.js',
								'staunton-set-view.js',
								'cubic-view.js',
						),
						'skins' => array(
								jocly_array_merge_recursive_distinct($skin3d,array(
										'camera'=>array(
												//'fov'=>45,
												'distMax'=>200,
												'radius'=>25,
												'elevationAngle'=>45,
												'elevationMin'=>-89,
												'rotationAngle'=>-45,
												'target'=>array(0,0,0),
												'targetBounds'=>array(3000,3000,6000),
										),
										'world'=>array(
												'lightIntensity'=>0,
												'skyLightIntensity'=>0,
												'lightCastShadow'=>false,
												'fog' => false,
												//'color'=>0x111111,
												'color'=>0x4783D4,
												'lightPosition'=>array('x'=>9,'y'=>14,'z'=>9),
												'lightShadowDarkness'=>0.55,
												'ambientLightColor'=>0xffffff,
												//'ambientLightColor'=>0x000000,
										),
								)),
								$skin2d,
						),
						'preferredRatio' => 4/3,
						'switchable' => FALSE,
						'useShowMoves' => FALSE,
						'useAutoComplete' => FALSE,
						'defaultOptions' => array(
							'sounds' => TRUE,
							'moves' => FALSE,
							'notation' => FALSE,
							'autocomplete' => FALSE,
						),
				),
		),
				
		'rollerball-chess' => array(
				'model' => array(
						'obsolete' => false,
						'js' => array(
								'base-model.js',
								'grid-geo-model.js',
								'rollerball-model.js',
						),
						'released'=>1397141778,
						'title-en'=>'Rollerball Chess',
						'rules'=>array('en'=>'rollerball-rules.html'),
						'description'=>array('en'=>'rollerball-description.html'),
						'thumbnail' => 'rollerball-thumb.png',
						'summary'=>t('Chess variant on an unusual board'),
						'credits' => array('en'=>'rollerball-credits.html'),
						'levels'=>array_values($cbLevels),
						'gameOptions'=>jocly_array_merge_recursive_distinct($gameOptions,array(
								'levelOptions'=> array(
										'distPawnPromoFactor' => -.05,
										'distKingThroneFactor' => -.1,
								),
						)),
				),
				'view' => array(
						'js' => array(
								'base-view.js',
								'grid-board-view.js',
								'staunton-set-view.js',
								'rollerball-view.js',
						),
						'skins' => array(
								jocly_array_merge_recursive_distinct($skin3d,array(
										'camera'=>array(
												'distMin'=>0,
												'radius'=>14.5,
												'elevationAngle'=>45,
										),
										'preload'=>array_merge($preloadBase3d,$preloadWikipedia,$preloadStaunton,
											array(
												'image|/res/images/wood.jpg'
											)
										)
								)),
								jocly_array_merge_recursive_distinct($skin2d,
									array(
										'preload'=>array_merge($preloadWikipedia,
											array(
												'image|/res/images/whitebg.png',
												'image|/res/images/cancel.png',
											)
										)
									)
								)
						),
						'visuals' => array(
							'600x600' => array('res/visuals/rollerball-600x600-3d.jpg','res/visuals/rollerball-600x600-2d.jpg'),
						),
				),
		),
			
		'chess960' => array(
				'model' => array(
						'obsolete' => false,
						'js' => array(
								'base-model.js',
								'grid-geo-model.js',
								'chess960-model.js',
						),
						'released'=>1401720878,
						'title-en'=>'Chess 960',
						'rules'=>array('en'=>'chess960-rules.html'),
						'description'=>array('en'=>'chess960-description.html'),
						'thumbnail' => 'chess960-thumb.png',
						'credits' => array('en'=>'chess960-credits.html'),
						'summary'=>t('Chess from randomized positions'),
						'levels'=>array_values($cbLevels),
						'gameOptions'=>jocly_array_merge_recursive_distinct($gameOptions,array(
								'levelOptions'=> array(
										'distPawnPromo1Factor' => .3,
										'distPawnPromo2Factor' => .1,
										'distPawnPromo3Factor' => .05,
										'minorPiecesMovedFactor' => .1,
								),
						)),
				),
				'view' => array(
						'js' => array(
								'base-view.js',
								'grid-board-view.js',
								'staunton-set-view.js',
								'chess960-view.js',
						),
						'skins' => array(
								jocly_array_merge_recursive_distinct($skin3d,array(
									'preload'=>array_merge($preloadBase3d,$preloadWikipedia,$preloadStaunton),
								)),
								jocly_array_merge_recursive_distinct($skin2d,array(
									'preload'=>array_merge($preloadBase2d,$preloadWikipedia),
								)),
						),
						'visuals' => array(
							'600x600' => array('res/visuals/chess960-600x600-3d.jpg','res/visuals/chess960-600x600-2d.jpg'),
						),
			),
		),

		'metamachy-chess' => array(
				'model' => array(
						'obsolete' => false,
						'js' => array(
								'base-model.js',
								'grid-geo-model.js',
								'metamachy-model.js',
						),
						'released'=>1402412178,
						'title-en'=>'Metamachy',
						'summary'=>t('Chess on 12x12 with fairy pieces'),
						'rules'=>array('en'=>'metamachy-rules.html'),
						'description'=>array('en'=>'metamachy-description.html'),
						'thumbnail' => 'metamachy-thumb.png',
						'credits' => array('en'=>'metamachy-credits.html'),
						'levels'=>array_values($cbLevels3),
						'gameOptions'=>jocly_array_merge_recursive_distinct($gameOptions,array(
								'levelOptions'=> array(
										'distPawnPromo1Factor' => .3,
										'distPawnPromo2Factor' => .1,
										'distPawnPromo3Factor' => .05,
										'minorPiecesMovedFactor' => .1,
								),
						)),
				),
				'view' => array(
						'js' => array(
								'base-view.js',
								'grid-board-view.js',
								'fairy-set-view.js',
								'metamachy-view.js',
						),
						'visuals' => array(
							'600x600' => array('res/visuals/metamachy-600x600-3d.jpg','res/visuals/metamachy-600x600-2d.jpg'),
						),
						'skins' => array(
								jocly_array_merge_recursive_distinct($skin3d,array(
										'preload'=>array_merge($preloadBase3d,$preloadWikipedia,
											$frPreloads['fr-pawn'],
											$frPreloads['fr-knight'],
											$frPreloads['fr-bishop'],
											$frPreloads['fr-queen'],
											$frPreloads['fr-king'],
											$frPreloads['fr-rook'],
											$frPreloads['fr-cannon2'],
											$frPreloads['fr-elephant'],
											$frPreloads['fr-admiral'],
											$frPreloads['fr-camel'],
											$frPreloads['fr-lion'],
											$frPreloads['fr-eagle']
										),
								)),
								jocly_array_merge_recursive_distinct($skin2d,array(
										'preload'=>array_merge($preloadBase2d,array(
											'image|/res/fairy/wikipedia-fairy-sprites.png',
										)),
								)),
						),
				),
		),
				
		'capablanca-chess' => array(
				'model' => array(
						'obsolete' => false,
						'js' => array(
								'base-model.js',
								'grid-geo-model.js',
								'capablanca-model.js',
						),
						'released'=>1404893076,
						'title-en'=>'Capablanca Chess',
						'summary'=>t('Chess on 10x8 (1920)'),
						'rules'=>array('en'=>'capablanca-rules.html'),
						'description'=>array('en'=>'capablanca-description.html'),
						'thumbnail' => 'capablanca-thumb.png',
						'credits' => array('en'=>'capablanca-credits.html'),
						'levels'=>array_values($cbLevels),
						'gameOptions'=>jocly_array_merge_recursive_distinct($gameOptions,array(
								'levelOptions'=> array(
										'distPawnPromo1Factor' => .3,
										'distPawnPromo2Factor' => .1,
										'distPawnPromo3Factor' => .05,
										'minorPiecesMovedFactor' => .1,
								),
						)),
				),
				'view' => array(
						'js' => array(
								'base-view.js',
								'grid-board-view.js',
								'fairy-set-view.js',
								'capablanca-view.js',
						),
						'skins' => array(
								jocly_array_merge_recursive_distinct($skin3d,array(
										'preload'=>array_merge($preloadBase3d,$preloadWikipedia,
											$frPreloads['fr-pawn'],
											$frPreloads['fr-knight'],
											$frPreloads['fr-bishop'],
											$frPreloads['fr-queen'],
											$frPreloads['fr-king'],
											$frPreloads['fr-rook'],
											$frPreloads['fr-cardinal'],
											$frPreloads['fr-marshall']
										),
								)),
								jocly_array_merge_recursive_distinct($skin2d,array(
										'preload'=>array_merge($preloadBase2d,array(
											'image|/res/fairy/wikipedia-fairy-sprites.png',
										)),
								)),
						),
						'visuals' => array(
							'600x600' => array('res/visuals/capablanca-600x600-3d.jpg','res/visuals/capablanca-600x600-2d.jpg'),
						),
				),
		),
		
		'carrera-chess' => array(
				'model' => array(
						'obsolete' => false,
						'js' => array(
								'base-model.js',
								'grid-geo-model.js',
								'carrera-model.js',
						),
						'released'=>1404916434,
						'title-en'=>'Carerra Chess',
						'summary'=>t('Chess on 10x8 (1617)'),
						'rules'=>array('en'=>'carrera-rules.html'),
						'description'=>array('en'=>'carrera-description.html'),
						'thumbnail' => 'carrera-thumb.png',
						'credits' => array('en'=>'carrera-credits.html'),
						'levels'=>array_values($cbLevels),
						'gameOptions'=>jocly_array_merge_recursive_distinct($gameOptions,array(
								'levelOptions'=> array(
										'distPawnPromo1Factor' => .3,
										'distPawnPromo2Factor' => .1,
										'distPawnPromo3Factor' => .05,
										'minorPiecesMovedFactor' => .1,
								),
						)),
				),
				'view' => array(
						'js' => array(
								'base-view.js',
								'grid-board-view.js',
								'fairy-set-view.js',
								'capablanca-view.js',
						),
						'skins' => array(
								jocly_array_merge_recursive_distinct($skin3d,array(
										'preload'=>array_merge($preloadBase3d,$preloadWikipedia,
											$frPreloads['fr-pawn'],
											$frPreloads['fr-knight'],
											$frPreloads['fr-bishop'],
											$frPreloads['fr-queen'],
											$frPreloads['fr-king'],
											$frPreloads['fr-rook'],
											$frPreloads['fr-cardinal'],
											$frPreloads['fr-marshall']
										),
								)),
								jocly_array_merge_recursive_distinct($skin2d,array(
										'preload'=>array_merge($preloadBase2d,array(
											'image|/res/fairy/wikipedia-fairy-sprites.png',
										)),
								)),
						),
						'visuals' => array(
							'600x600' => array('res/visuals/carrera-600x600-3d.jpg','res/visuals/carrera-600x600-2d.jpg'),
						),
				),
		),
		
		'gothic-chess' => array(
				'model' => array(
						'obsolete' => false,
						'js' => array(
								'base-model.js',
								'grid-geo-model.js',
								'gothic-model.js',
						),
						'released'=>1404982805,
						'title-en'=>'Gothic Chess',
						'summary'=>t('Chess on 10x8 (2000)'),
						'rules'=>array('en'=>'gothic-rules.html'),
						'description'=>array('en'=>'gothic-description.html'),
						'thumbnail' => 'gothic-thumb.png',
						'credits' => array('en'=>'gothic-credits.html'),
						'levels'=>array_values($cbLevels),
						'gameOptions'=>jocly_array_merge_recursive_distinct($gameOptions,array(
								'levelOptions'=> array(
										'distPawnPromo1Factor' => .3,
										'distPawnPromo2Factor' => .1,
										'distPawnPromo3Factor' => .05,
										'minorPiecesMovedFactor' => .1,
								),
						)),
				),
				'view' => array(
						'js' => array(
								'base-view.js',
								'grid-board-view.js',
								'fairy-set-view.js',
								'capablanca-view.js',
						),
						'skins' => array(
								jocly_array_merge_recursive_distinct($skin3d,array(
										'preload'=>array_merge($preloadBase3d,$preloadWikipedia,
											$frPreloads['fr-pawn'],
											$frPreloads['fr-knight'],
											$frPreloads['fr-bishop'],
											$frPreloads['fr-queen'],
											$frPreloads['fr-king'],
											$frPreloads['fr-rook'],
											$frPreloads['fr-cardinal'],
											$frPreloads['fr-marshall']
										),
								)),
								jocly_array_merge_recursive_distinct($skin2d,array(
										'preload'=>array_merge($preloadBase2d,array(
											'image|/res/fairy/wikipedia-fairy-sprites.png',
										)),
								)),
						),
						'visuals' => array(
							'600x600' => array('res/visuals/gothic-600x600-3d.jpg','res/visuals/gothic-600x600-2d.jpg'),
						),
				),
		),
		
		'janus-chess' => array(
				'model' => array(
						'obsolete' => false,
						'js' => array(
								'base-model.js',
								'grid-geo-model.js',
								'janus-model.js',
						),
						'released'=>1404997707,
						'title-en'=>'Janus Chess',
						'summary'=>t('Chess on 10x8 (1978)'),
						'rules'=>array('en'=>'janus-rules.html'),
						'description'=>array('en'=>'janus-description.html'),
						'thumbnail' => 'janus-thumb.png',
						'credits' => array('en'=>'janus-credits.html'),
						'levels'=>array_values($cbLevels),
						'gameOptions'=>jocly_array_merge_recursive_distinct($gameOptions,array(
								'levelOptions'=> array(
										'distPawnPromo1Factor' => .3,
										'distPawnPromo2Factor' => .1,
										'distPawnPromo3Factor' => .05,
										'minorPiecesMovedFactor' => .1,
								),
						)),
				),
				'view' => array(
						'js' => array(
								'base-view.js',
								'grid-board-view.js',
								'fairy-set-view.js',
								'capablanca-view.js',
						),
						'skins' => array(
								jocly_array_merge_recursive_distinct($skin3d,array(
										'preload'=>array_merge($preloadBase3d,$preloadWikipedia,
											$frPreloads['fr-pawn'],
											$frPreloads['fr-knight'],
											$frPreloads['fr-bishop'],
											$frPreloads['fr-queen'],
											$frPreloads['fr-king'],
											$frPreloads['fr-rook'],
											$frPreloads['fr-cardinal']
										),
								)),
								jocly_array_merge_recursive_distinct($skin2d,array(
										'preload'=>array_merge($preloadBase2d,array(
											'image|/res/fairy/wikipedia-fairy-sprites.png',
										)),
								)),
						),
						'visuals' => array(
							'600x600' => array('res/visuals/janus-600x600-3d.jpg','res/visuals/janus-600x600-2d.jpg'),
						),
				),
		),

		'grand-chess' => array(
				'model' => array(
						'obsolete' => false,
						'js' => array(
								'base-model.js',
								'grid-geo-model.js',
								'grand-model.js',
						),
						'released'=>1404985842,
						'title-en'=>'Grand Chess',
						'summary'=>t('Chess on 10x10 (1984)'),
						'rules'=>array('en'=>'grand-rules.html'),
						'description'=>array('en'=>'grand-description.html'),
						'thumbnail' => 'grand-thumb.png',
						'credits' => array('en'=>'grand-credits.html'),
						'levels'=>array_values($cbLevels),
						'gameOptions'=>jocly_array_merge_recursive_distinct($gameOptions,array(
								'levelOptions'=> array(
										'distPawnPromo1Factor' => .3,
										'distPawnPromo2Factor' => .1,
										'distPawnPromo3Factor' => .05,
										'minorPiecesMovedFactor' => .1,
								),
						)),
				),
				'view' => array(
						'js' => array(
								'base-view.js',
								'grid-board-view.js',
								'fairy-set-view.js',
								'grand-view.js',
						),
						'skins' => array(
								jocly_array_merge_recursive_distinct($skin3d,array(
										'preload'=>array_merge($preloadBase3d,$preloadWikipedia,
											$frPreloads['fr-pawn'],
											$frPreloads['fr-knight'],
											$frPreloads['fr-bishop'],
											$frPreloads['fr-queen'],
											$frPreloads['fr-king'],
											$frPreloads['fr-rook'],
											$frPreloads['fr-cardinal'],
											$frPreloads['fr-marshall']
										),
								)),
								jocly_array_merge_recursive_distinct($skin2d,array(
										'preload'=>array_merge($preloadBase2d,array(
											'image|/res/fairy/wikipedia-fairy-sprites.png',
										)),
								)),
						),
						'visuals' => array(
							'600x600' => array('res/visuals/grand-600x600-3d.jpg','res/visuals/grand-600x600-2d.jpg'),
						),
				),
		),
		
		'modern-chess' => array(
				'model' => array(
						'obsolete' => false,
						'js' => array(
								'base-model.js',
								'grid-geo-model.js',
								'modern-model.js',
						),
						'released'=>1404999946,
						'title-en'=>'Modern Chess',
						'summary'=>t('Chess on 9x9 (1968)'),
						'rules'=>array('en'=>'modern-rules.html'),
						'description'=>array('en'=>'modern-description.html'),
						'thumbnail' => 'modern-thumb.png',
						'credits' => array('en'=>'modern-credits.html'),
						'levels'=>array_values($cbLevels),
						'gameOptions'=>jocly_array_merge_recursive_distinct($gameOptions,array(
								'levelOptions'=> array(
										'distPawnPromo1Factor' => .3,
										'distPawnPromo2Factor' => .1,
										'distPawnPromo3Factor' => .05,
										'minorPiecesMovedFactor' => .1,
								),
						)),
				),
				'view' => array(
						'js' => array(
								'base-view.js',
								'grid-board-view.js',
								'fairy-set-view.js',
								'modern-view.js',
						),
						'skins' => array(
								jocly_array_merge_recursive_distinct($skin3d,array(
										'preload'=>array_merge($preloadBase3d,$preloadWikipedia,
											$frPreloads['fr-pawn'],
											$frPreloads['fr-knight'],
											$frPreloads['fr-bishop'],
											$frPreloads['fr-queen'],
											$frPreloads['fr-king'],
											$frPreloads['fr-rook'],
											$frPreloads['fr-cardinal']
										),
								)),
								jocly_array_merge_recursive_distinct($skin2d,array(
										'preload'=>array_merge($preloadBase2d,array(
											'image|/res/fairy/wikipedia-fairy-sprites.png',
										)),
								)),
						),
						'visuals' => array(
							'600x600' => array('res/visuals/modern-600x600-3d.jpg','res/visuals/modern-600x600-2d.jpg'),
						),
				),
		),

		'chancellor-chess' => array(
				'model' => array(
						'obsolete' => false,
						'released'=>1404918051,
						'js' => array(
								'base-model.js',
								'grid-geo-model.js',
								'chancellor-model.js',
						),
						'title-en'=>'Chancellor Chess',
						'rules'=>array('en'=>'chancellor-rules.html'),
						'description'=>array('en'=>'chancellor-description.html'),
						'thumbnail' => 'chancellor-thumb.png',
						'credits' => array('en'=>'chancellor-credits.html'),
						'summary'=>t('Chess on 9x9 (1887)'),
						'levels'=>array_values($cbLevels),
						'gameOptions'=>jocly_array_merge_recursive_distinct($gameOptions,array(
								'levelOptions'=> array(
										'distPawnPromo1Factor' => .3,
										'distPawnPromo2Factor' => .1,
										'distPawnPromo3Factor' => .05,
										'minorPiecesMovedFactor' => .1,
								),
						)),
				),
				'view' => array(
						'js' => array(
								'base-view.js',
								'grid-board-view.js',
								'fairy-set-view.js',
								'modern-view.js',
						),
						'skins' => array(
								jocly_array_merge_recursive_distinct($skin3d,array(
										'preload'=>array_merge($preloadBase3d,$preloadWikipedia,
											$frPreloads['fr-pawn'],
											$frPreloads['fr-knight'],
											$frPreloads['fr-bishop'],
											$frPreloads['fr-queen'],
											$frPreloads['fr-king'],
											$frPreloads['fr-rook'],
											$frPreloads['fr-marshall']
										),
								)),
								jocly_array_merge_recursive_distinct($skin2d,array(
										'preload'=>array_merge($preloadBase2d,array(
											'image|/res/fairy/wikipedia-fairy-sprites.png',
										)),
								)),
						),
						'visuals' => array(
							'600x600' => array('res/visuals/chancellor-600x600-3d.jpg','res/visuals/chancellor-600x600-2d.jpg'),
						),
				),
		),
		
		'wildebeest-chess' => array(
				'model' => array(
						'obsolete' => false,
						'js' => array(
								'base-model.js',
								'grid-geo-model.js',
								'wildebeest-model.js',
						),
						'released'=>1405001496,
						'title-en'=>'Wildebeest Chess',
						'rules'=>array('en'=>'wildebeest-rules.html'),
						'description'=>array('en'=>'wildebeest-description.html'),
						'thumbnail' => 'wildebeest-thumb.png',
						'credits' => array('en'=>'wildebeest-credits.html'),
						'summary'=>t('Chess on 11x10 (1987)'),
						'levels'=>array_values($cbLevels),
						'gameOptions'=>jocly_array_merge_recursive_distinct($gameOptions,array(
								'levelOptions'=> array(
										'distPawnPromo1Factor' => .3,
										'distPawnPromo2Factor' => .1,
										'distPawnPromo3Factor' => .05,
										'minorPiecesMovedFactor' => .1,
								),
						)),
				),
				'view' => array(
						'js' => array(
								'base-view.js',
								'grid-board-view.js',
								'fairy-set-view.js',
								'wildebeest-view.js',
						),
						'skins' => array(
								jocly_array_merge_recursive_distinct($skin3d,array(
										'preload'=>array_merge($preloadBase3d,$preloadWikipedia,
											$frPreloads['fr-pawn'],
											$frPreloads['fr-knight'],
											$frPreloads['fr-bishop'],
											$frPreloads['fr-queen'],
											$frPreloads['fr-king'],
											$frPreloads['fr-rook'],
											$frPreloads['fr-camel'],
											$frPreloads['fr-dragon']
										),
								)),
								jocly_array_merge_recursive_distinct($skin2d,array(
										'preload'=>array_merge($preloadBase2d,array(
											'image|/res/fairy/wikipedia-fairy-sprites.png',
										)),
								)),
						),
						'visuals' => array(
							'600x600' => array('res/visuals/wildebeest-600x600-3d.jpg','res/visuals/wildebeest-600x600-2d.jpg'),
						),
				),
		),

			
		'smess' => array(
			'model' => array(
				'obsolete' => false,
				'js' => array(
						'base-model.js',
						'smess-geo-model.js',
						'smess-model.js',
				),
				'released'=>1402671377,
				'rules'=>array('en'=>'smess-rules.html'),
				'description'=>array('en'=>'smess-description.html'),
				'thumbnail' => 'smess-thumb.png',
				'credits' => array('en'=>'smess-credits.html'),
				'title-en'=>'Smess',
				'summary'=>t('The Ninny\'s Chess (1970)'),
				'levels'=>array_values($cbLevels),
				'gameOptions'=>jocly_array_merge_recursive_distinct($gameOptions,array(
					'levelOptions'=> array(
							'distPawnPromo1Factor' => .3,
							'distPawnPromo2Factor' => .2,
							'distPawnPromo3Factor' => .1,
							'distPawnPromo4Factor' => .05,
							'distPawnPromo5Factor' => .03,
					),
				)),
			),
			'view' => array(
				'js' => array(
						'base-view.js',
						'grid-board-view.js',
						'smess-set-view.js',
						'smess-view.js',
				),
				'skins' => array(
					jocly_array_merge_recursive_distinct($skin3d,array(
						'preload'=>array_merge($preloadBase3d,array(
							'smoothedfilegeo|0|/res/smess/token.js',
							'image|/res/smess/promo.png',
							'image|/res/smess/arrow-top.png',
							'image|/res/smess/arrow-top-left.png',
							'image|/res/images/wood-chipboard-4.jpg',
							'image|/res/smess/playera-bg.png',
							'image|/res/smess/playerb-bg.png',
							'image|/res/smess/smess-pieces-sprites.png',
						)),
					)),
					array(
						'name'=>'skin2d',
						'title'=>'2D Classic',
						'3d'=>FALSE,
						'preload'=>array_merge($preloadBase2d,array(
							'image|/res/smess/promo.png',
							'image|/res/smess/arrow-top.png',
							'image|/res/smess/arrow-top-left.png',
							'image|/res/images/wood-chipboard-4.jpg',
							'image|/res/smess/smess-pieces-sprites-a.png',						
							'image|/res/smess/smess-pieces-sprites-b.png',						
						)),
					),
				),
				'visuals' => array(
					'600x600' => array('res/visuals/smess-600x600-3d.jpg','res/visuals/smess-600x600-2d.jpg'),
				),
			),
		),
		
		'demi-chess' => array(
			'model' => array(
				'obsolete' => false,
				'js' => array(
					'base-model.js',
					'grid-geo-model.js',
					'demi-model.js',
				),
				'released'=>1403189778,
				'title-en'=>'Demi-Chess',
				'summary'=>t('4x8 chess variant by Peter Krystufek (1986)'),
				'levels'=>array_values($cbLevels),
				'gameOptions'=> $gameOptions,
				'thumbnail'=>"demi-thumb.png",
				'rules' => array('en'=>'demi-rules.html'),
				'description' => array('en'=>'demi-description.html'),
				'credits' => array('en'=>'demi-credits.html'),
			),
			'view' => array(
				'js' => array(
					'base-view.js',
					'grid-board-view.js',
					'staunton-set-view.js',
					'demi-view.js',
				),
				'skins' => array(
					jocly_array_merge_recursive_distinct($skin3d,array(
							'preload'=>array_merge($preloadBase3d,$preloadWikipedia,$preloadStaunton),
					)),
					array(
						'name'=>'skin2d',
						'title'=>'2D Classic',
						'3d'=>FALSE,
						'preload'=>array_merge($preloadBase2d,$preloadWikipedia),
					),
				),
				'visuals' => array(
					'600x600' => array('res/visuals/demi-600x600-3d.jpg','res/visuals/demi-600x600-2d.jpg'),
				),
			),
		),
		
		'romanchenko-chess' => array(
			'model' => array(
				'obsolete' => false,
				'js' => array(
					'base-model.js',
					'grid-geo-model.js',
					'romanchenko-model.js',
				),
				'released'=>1403535377,
				'title-en'=>'Romanchenko\'s Chess',
				'summary'=>t('Shifted 8x8 chess variant by V. Romanchenko'),
				'levels'=>array_values($cbLevels),
				'gameOptions'=> $gameOptions,
				'thumbnail'=>"romanchenko-thumb.png",
				'rules' => array('en'=>'romanchenko-rules.html'),
				'description' => array('en'=>'romanchenko-description.html'),
				'credits' => array('en'=>'romanchenko-credits.html'),
			),
			'view' => array(
				'js' => array(
					'base-view.js',
					'grid-board-view.js',
					'staunton-set-view.js',
					'romanchenko-view.js',
				),
				'skins' => array(
					jocly_array_merge_recursive_distinct($skin3d,array(
							'preload'=>array_merge($preloadBase3d,$preloadWikipedia,$preloadStaunton),
					)),
					array(
						'name'=>'skin2d',
						'title'=>'2D Classic',
						'3d'=>FALSE,
						'preload'=>array_merge($preloadBase2d,$preloadWikipedia),
					),
				),
				'visuals' => array(
					'600x600' => array('res/visuals/romanchenko-600x600-3d.jpg','res/visuals/romanchenko-600x600-2d.jpg'),
				),
			),
		),
		
		'amazon-chess' => array(
				'model' => array(
						'obsolete' => false,
						'js' => array(
								'base-model.js',
								'grid-geo-model.js',
								'amazon-model.js',
						),
						'released'=>1405068607,
						'title-en'=>'Amazon Chess',
						'summary'=>t('18th century, Russia'),
						'levels'=>array_values($cbLevels),
						'thumbnail'=>"amazon-thumb.png",
						'rules' => array('en'=>'amazon-rules.html'),
						'description' => array('en'=>'amazon-description.html'),
						'credits' => array('en'=>'amazon-credits.html'),
						'gameOptions'=>jocly_array_merge_recursive_distinct($gameOptions,array(
								'levelOptions'=> array(
										'distPawnPromo1Factor' => .3,
										'distPawnPromo2Factor' => .1,
										'distPawnPromo3Factor' => .05,
										'minorPiecesMovedFactor' => .1,
								),
						)),
				),
				'view' => array(
						'js' => array(
								'base-view.js',
								'grid-board-view.js',
								'fairy-set-view.js',
								'amazon-view.js',
						),
						'skins' => array(
								jocly_array_merge_recursive_distinct($skin3d,array(
										'preload'=>array_merge($preloadBase3d,$preloadWikipedia,
											$frPreloads['fr-pawn'],
											$frPreloads['fr-knight'],
											$frPreloads['fr-bishop'],
											$frPreloads['fr-king'],
											$frPreloads['fr-rook'],
											$frPreloads['fr-amazon']
										),
								)),
								jocly_array_merge_recursive_distinct($skin2d,array(
										'preload'=>array_merge($preloadBase2d,array(
											'image|/res/fairy/wikipedia-fairy-sprites.png',
										)),
								)),
						),
						'visuals' => array(
							'600x600' => array('res/visuals/amazon-600x600-3d.jpg','res/visuals/amazon-600x600-2d.jpg'),
						),
				),
		),

		'dukerutland-chess' => array(
				'model' => array(
						'obsolete' => false,
						'js' => array(
								'base-model.js',
								'grid-geo-model.js',
								'dukerutland-model.js',
						),
						'released'=>1405068608,
						'thumbnail'=>"dukerutland-thumb.png",
						'rules' => array('en'=>'dukerutland-rules.html'),
						'description' => array('en'=>'dukerutland-description.html'),
						'credits' => array('en'=>'dukerutland-credits.html'),
						'title-en'=>'Duke of Rutland Chess',
						'summary'=>t('Chess on 14x10 (1747)'),
						'levels'=>array_values($cbLevels),
						'gameOptions'=>jocly_array_merge_recursive_distinct($gameOptions,array(
								'levelOptions'=> array(
										'distPawnPromo1Factor' => .3,
										'distPawnPromo2Factor' => .1,
										'distPawnPromo3Factor' => .05,
										'minorPiecesMovedFactor' => .1,
								),
						)),
				),
				'view' => array(
						'js' => array(
								'base-view.js',
								'grid-board-view.js',
								'fairy-set-view.js',
								'dukerutland-view.js',
						),
						'skins' => array(
								jocly_array_merge_recursive_distinct($skin3d,array(
										'preload'=>array_merge($preloadBase3d,$preloadWikipedia,
											$frPreloads['fr-pawn'],
											$frPreloads['fr-knight'],
											$frPreloads['fr-bishop'],
											$frPreloads['fr-king'],
											$frPreloads['fr-rook'],
											$frPreloads['fr-queen'],
											$frPreloads['fr-marshall'],
											$frPreloads['fr-crowned-rook']											
										),
								)),
								jocly_array_merge_recursive_distinct($skin2d,array(
										'preload'=>array_merge($preloadBase2d,array(
											'image|/res/fairy/wikipedia-fairy-sprites.png',
										)),
								)),
						),
						'visuals' => array(
							'600x600' => array('res/visuals/dukerutland-600x600-3d.jpg','res/visuals/dukerutland-600x600-2d.jpg'),
						),
				),
		),

		'gustav3-chess' => array(
				'model' => array(
						'obsolete' => false,
						'js' => array(
								'base-model.js',
								'grid-geo-model.js',
								'gustav3-model.js',
						),
						'released'=>1405068609,
						'thumbnail'=>"gustav3-thumb.png",
						'rules' => array('en'=>'gustav3-rules.html'),
						'description' => array('en'=>'gustav3-description.html'),
						'credits' => array('en'=>'gustav3-credits.html'),
						'title-en'=>'Gustav III Chess',
						'summary'=>t('Gustav Johan Billberg, 1839'),
						'levels'=>array_values($cbLevels),
						'gameOptions'=>jocly_array_merge_recursive_distinct($gameOptions,array(
								'levelOptions'=> array(
										'distPawnPromo1Factor' => .3,
										'distPawnPromo2Factor' => .1,
										'distPawnPromo3Factor' => .05,
										'minorPiecesMovedFactor' => .1,
								),
						)),
				),
				'view' => array(
						'js' => array(
								'base-view.js',
								'grid-board-view.js',
								'fairy-set-view.js',
								'gustav3-view.js',
						),
						'skins' => array(
								jocly_array_merge_recursive_distinct($skin3d,array(
										'preload'=>array_merge($preloadBase3d,$preloadWikipedia,
											$frPreloads['fr-pawn'],
											$frPreloads['fr-knight'],
											$frPreloads['fr-bishop'],
											$frPreloads['fr-king'],
											$frPreloads['fr-rook'],
											$frPreloads['fr-queen'],
											$frPreloads['fr-amazon']
										),
								)),
								jocly_array_merge_recursive_distinct($skin2d,array(
										'preload'=>array_merge($preloadBase2d,array(
											'image|/res/fairy/wikipedia-fairy-sprites.png',
										)),
								)),
						),
						'visuals' => array(
							'600x600' => array('res/visuals/gustav3-600x600-3d.jpg','res/visuals/gustav3-600x600-2d.jpg'),
						),
				),
		),

		'hyderabad-chess' => array(
				'model' => array(
						'obsolete' => false,
						'js' => array(
								'base-model.js',
								'grid-geo-model.js',
								'hyderabad-model.js',
						),
						'released'=>1405068610,
						'thumbnail'=>"hyderabad-thumb.png",
						'rules' => array('en'=>'hyderabad-rules.html'),
						'description' => array('en'=>'hyderabad-description.html'),
						'credits' => array('en'=>'hyderabad-credits.html'),
						'title-en'=>'Hyderabad Decimal Chess',
						'summary'=>t('Shir Muhammad Khan Iman, 1797-1798'),
						'levels'=>array_values($cbLevels),
						'gameOptions'=>jocly_array_merge_recursive_distinct($gameOptions,array(
								'levelOptions'=> array(
										'distPawnPromo1Factor' => .3,
										'distPawnPromo2Factor' => .1,
										'distPawnPromo3Factor' => .05,
										'minorPiecesMovedFactor' => .1,
								),
						)),
				),
				'view' => array(  
						'js' => array(
								'base-view.js',
								'grid-board-view.js',
								'fairy-set-view.js',
								'hyderabad-view.js',
						),
						'skins' => array(
								jocly_array_merge_recursive_distinct($skin3d,array(
										'preload'=>array_merge($preloadBase3d,$preloadWikipedia,
											$frPreloads['fr-pawn'],
											$frPreloads['fr-knight'],
											$frPreloads['fr-bishop'],
											$frPreloads['fr-king'],
											$frPreloads['fr-rook'],
											$frPreloads['fr-queen'],
											$frPreloads['fr-marshall'],
											$frPreloads['fr-cardinal'],
											$frPreloads['fr-amazon']
										),
								)),
								jocly_array_merge_recursive_distinct($skin2d,array(
										'preload'=>array_merge($preloadBase2d,array(
											'image|/res/fairy/wikipedia-fairy-sprites.png',
										)),
								)),
						),
						'visuals' => array(
							'600x600' => array('res/visuals/hyderabad-600x600-3d.jpg','res/visuals/hyderabad-600x600-2d.jpg'),
						),
				),
		),
		'kaisergame-chess' => array(
				'model' => array(
						'obsolete' => false,
						'js' => array(
								'base-model.js',
								'grid-geo-model.js',
								'kaisergame-model.js',
						),
						'released'=>1405068611,
						'thumbnail'=>"kaisergame-thumb.png",
						'rules' => array('en'=>'kaisergame-rules.html'),
						'description' => array('en'=>'kaisergame-description.html'),
						'credits' => array('en'=>'kaisergame-credits.html'),
						'title-en'=>'Kaiserspiel',
						'summary'=>t('Tressau, 1840'),
						'levels'=>array_values($cbLevels),
						'gameOptions'=>jocly_array_merge_recursive_distinct($gameOptions,array(
								'levelOptions'=> array(
										'distPawnPromo1Factor' => .3,
										'distPawnPromo2Factor' => .1,
										'distPawnPromo3Factor' => .05,
										'minorPiecesMovedFactor' => .1,
								),
						)),
				),
				'view' => array(  
						'js' => array(
								'base-view.js',
								'grid-board-view.js',
								'fairy-set-view.js',
								'grand-view.js',
						),
						'skins' => array(
								jocly_array_merge_recursive_distinct($skin3d,array(
										'preload'=>array_merge($preloadBase3d,$preloadWikipedia,
											$frPreloads['fr-pawn'],
											$frPreloads['fr-knight'],
											$frPreloads['fr-bishop'],
											$frPreloads['fr-king'],
											$frPreloads['fr-rook'],
											$frPreloads['fr-queen'],
											$frPreloads['fr-cardinal'],
											$frPreloads['fr-amazon']
										),
								)),
								jocly_array_merge_recursive_distinct($skin2d,array(
										'preload'=>array_merge($preloadBase2d,array(
											'image|/res/fairy/wikipedia-fairy-sprites.png',
										)),
								)),
						),
						'visuals' => array(
							'600x600' => array('res/visuals/kaisergame-600x600-3d.jpg','res/visuals/kaisergame-600x600-2d.jpg'),
						),
				),
		),
		'sultangame-chess' => array(
				'model' => array(
						'obsolete' => false,
						'js' => array(
								'base-model.js',
								'grid-geo-model.js',
								'sultangame-model.js',
						),
						'released'=>1405068612,
						'thumbnail'=>"sultangame-thumb.png",
						'rules' => array('en'=>'sultangame-rules.html'),
						'description' => array('en'=>'sultangame-description.html'),
						'credits' => array('en'=>'sultangame-credits.html'),
						'title-en'=>'Sultanspiel',
						'summary'=>t('Tressau, 1840'),
						'levels'=>array_values($cbLevels),
						'gameOptions'=>jocly_array_merge_recursive_distinct($gameOptions,array(
								'levelOptions'=> array(
										'distPawnPromo1Factor' => .3,
										'distPawnPromo2Factor' => .1,
										'distPawnPromo3Factor' => .05,
										'minorPiecesMovedFactor' => .1,
								),
						)),
				),
				'view' => array(  
						'js' => array(
								'base-view.js',
								'grid-board-view.js',
								'fairy-set-view.js',
								'sultangame-view.js',
						),
						'skins' => array(
								jocly_array_merge_recursive_distinct($skin3d,array(
										'preload'=>array_merge($preloadBase3d,$preloadWikipedia,
											$frPreloads['fr-pawn'],
											$frPreloads['fr-knight'],
											$frPreloads['fr-bishop'],
											$frPreloads['fr-king'],
											$frPreloads['fr-rook'],
											$frPreloads['fr-queen'],
											$frPreloads['fr-cardinal'],
											$frPreloads['fr-marshall'],
											$frPreloads['fr-amazon']
										),
								)),
								jocly_array_merge_recursive_distinct($skin2d,array(
										'preload'=>array_merge($preloadBase2d,array(
											'image|/res/fairy/wikipedia-fairy-sprites.png',
										)),
								)),
						),
						'visuals' => array(
							'600x600' => array('res/visuals/sultangame-600x600-3d.jpg','res/visuals/sultangame-600x600-2d.jpg'),
						),
				),
		),
		'reformed-courier-chess' => array(
				'model' => array(
						'obsolete' => false,
						'js' => array(
								'base-model.js',
								'grid-geo-model.js',
								'reformed-courier-model.js',
						),
						'released'=>1405068613,
						'thumbnail'=>"reformed-courier-thumb.png",
						'rules' => array('en'=>'reformed-courier-rules.html'),
						'description' => array('en'=>'reformed-courier-description.html'),
						'credits' => array('en'=>'reformed-courier-credits.html'),
						'title-en'=>'Reformed Courierspiel',
						'summary'=>t('Clément Bégnis, 2011'),
						'levels'=>array_values($cbLevels),
						'gameOptions'=>jocly_array_merge_recursive_distinct($gameOptions,array(
								'levelOptions'=> array(
										'distPawnPromo1Factor' => .3,
										'distPawnPromo2Factor' => .1,
										'distPawnPromo3Factor' => .05,
										'minorPiecesMovedFactor' => .1,
								),
						)),
				),
				'view' => array(  
						'js' => array(
								'base-view.js',
								'grid-board-view.js',
								'fairy-set-view.js',
								'reformed-courier-view.js',
						),
						'skins' => array(
								jocly_array_merge_recursive_distinct($skin3d,array(
										'preload'=>array_merge($preloadBase3d,$preloadWikipedia,
											$frPreloads['fr-pawn'],
											$frPreloads['fr-knight'],
											$frPreloads['fr-bishop'],
											$frPreloads['fr-king'],
											$frPreloads['fr-rook'],
											$frPreloads['fr-queen'],
											$frPreloads['fr-elephant'],
											$frPreloads['fr-lighthouse'],
											$frPreloads['fr-unicorn']
										),
								)),
								jocly_array_merge_recursive_distinct($skin2d,array(
										'preload'=>array_merge($preloadBase2d,array(
											'image|/res/fairy/wikipedia-fairy-sprites.png',
										)),
								)),
						),
						'visuals' => array(
							'600x600' => array('res/visuals/reformed-courier-600x600-3d.jpg','res/visuals/reformed-courier-600x600-2d.jpg'),
						),
				),
		),
		'tutti-frutti-chess' => array(
				'model' => array(
						'obsolete' => false,
						'js' => array(
								'base-model.js',
								'grid-geo-model.js',
								'tutti-frutti-model.js',
						),
						'released'=>1405068614,
						'thumbnail'=>"tutti-frutti-thumb.png",
						'rules' => array('en'=>'tutti-frutti-rules.html'),
						'description' => array('en'=>'tutti-frutti-description.html'),
						'credits' => array('en'=>'tutti-frutti-credits.html'),
						'title-en'=>'Tutti-Frutti Chess',
						'summary'=>t('Ralph Betza et Philip Cohen, 1978-79'),
						'levels'=>array_values($cbLevels),
						'gameOptions'=>jocly_array_merge_recursive_distinct($gameOptions,array(
								'levelOptions'=> array(
										'distPawnPromo1Factor' => .3,
										'distPawnPromo2Factor' => .1,
										'distPawnPromo3Factor' => .05,
										'minorPiecesMovedFactor' => .1,
								),
						)),
				),
				'view' => array(  
						'js' => array(
								'base-view.js',
								'grid-board-view.js',
								'fairy-set-view.js',
								'tutti-frutti-view.js',
						),
						'skins' => array(
								jocly_array_merge_recursive_distinct($skin3d,array(
										'preload'=>array_merge($preloadBase3d,$preloadWikipedia,
											$frPreloads['fr-pawn'],
											$frPreloads['fr-knight'],
											$frPreloads['fr-bishop'],
											$frPreloads['fr-king'],
											$frPreloads['fr-rook'],
											$frPreloads['fr-queen'],
											$frPreloads['fr-amazon'],
											$frPreloads['fr-marshall'],
											$frPreloads['fr-cardinal']
										),
								)),
								jocly_array_merge_recursive_distinct($skin2d,array(
										'preload'=>array_merge($preloadBase2d,array(
											'image|/res/fairy/wikipedia-fairy-sprites.png',
										)),
								)),
						),
						'visuals' => array(
							'600x600' => array('res/visuals/tutti-frutti-600x600-3d.jpg','res/visuals/tutti-frutti-600x600-2d.jpg'),
						),
				),
		),
		
		'musketeer-chess' => array(
				'model' => array(
						'obsolete' => false,
						'js' => array(
								'base-model.js',
								'grid-geo-model.js',
								'musketeer-model.js',
						),
						'released'=>1469532905,
						'title-en'=>'Musketeer Chess',
						'rules'=>array('en'=>'musketeer-rules.html'),
						'description'=>array('en'=>'musketeer-description.html'),
						'thumbnail' => 'musketeer-thumb.png',
						'summary'=>t('A modern Chess Variant'),
						'credits' => array('en'=>'musketeer-credits.html'),
						'levels'=>array_values($cbLevels),
						/* 'gameOptions'=>jocly_array_merge_recursive_distinct($gameOptions,array(
								'levelOptions'=> array(
										'distPawnPromoFactor' => -.05,
										'distKingThroneFactor' => -.1,
								),
						)),*/
				),
				'view' => array(
						'js' => array(
								'base-view.js',
								'grid-board-view.js',
								'fairy-set-view.js',
								'musketeer-view.js',
						),
						'skins' => array(
								jocly_array_merge_recursive_distinct($skin3d,array(
										'preload'=>array_merge($preloadBase3d,$preloadWikipedia,$musketeerCommonPreloads,
											$frPreloads['fr-pawn'],
											$frPreloads['fr-knight'],
											$frPreloads['fr-bishop'],
											$frPreloads['fr-king'],
											$frPreloads['fr-rook'],
											$frPreloads['fr-queen'],
											$musketeerPreloads['fr-leopard'],
											$musketeerPreloads['fr-fortress'],
											$musketeerPreloads['fr-spider'],
											$musketeerPreloads['fr-dragon-musketeer'],
											$frPreloads['fr-unicorn'],
											$frPreloads['fr-eagle'],
											$frPreloads['fr-elephant'],
											$frPreloads['fr-marshall'],
											$frPreloads['fr-cardinal'],
											$frPreloads['fr-cannon']																		
										)
								)),
								jocly_array_merge_recursive_distinct($skin2d,
									array(
										'preload'=>array_merge($preloadWikipedia,$musketeerCommonPreloads)
									)
								)
						),
						'visuals' => array(
							'600x600' => array('res/visuals/musketeer-600x600-3d.jpg','res/visuals/musketeer-600x600-2d.jpg'),
						),
				),
		),
		
		'sweet16-chess' => array(
				'model' => array(
						'obsolete' => false,
						'js' => array(
								'base-model.js',
								'grid-geo-model.js',
								'sweet16-model.js',
						),
						'released'=>1482940591,
						'title-en'=>'Sweet 16 Chess',
						'rules'=>array('en'=>'sweet16-rules.html'),
						'description'=>array('en'=>'sweet16-description.html'),
						'thumbnail' => 'sweet16-thumb.png',
						'summary'=>t('A huge 16x16 Chess Variant'),
						'credits' => array('en'=>'sweet16-credits.html'),
						'levels'=>array_values($cbLevels),
				),
				'view' => array(
						'js' => array(
								'base-view.js',
								'grid-board-view.js',
								'staunton-set-view.js',
								'sweet16-view.js',
						),
					'skins' => array(
						jocly_array_merge_recursive_distinct($skin3d,array(
								'preload'=>array_merge($preloadBase3d,$preloadWikipedia,$preloadStaunton),
						)),
						array(
							'name'=>'skin2d',
							'title'=>'2D Classic',
							'3d'=>FALSE,
							'preload'=>array_merge($preloadBase2d,$preloadWikipedia),
						),
					),
					'visuals' => array(
						'600x600' => array('res/visuals/sweet16-600x600-3d.jpg','res/visuals/sweet16-600x600-2d.jpg'),
					),
				),
		),
		

	);
	
	foreach($cbVariants as $name=>$game) {
		jocly_register_model($name,jocly_array_merge_recursive_distinct($cbModel,$game['model']));
		jocly_register_view($name,$name,jocly_array_merge_recursive_distinct($cbView,$game['view']));
	}

}

?>
