Permalink
Browse files

Updated documentation, siteShim, and templates.

  • Loading branch information...
1 parent 86d1745 commit df296c619b1b6ee07651ddc7bf85e3055e16091f @lannymcnie lannymcnie committed Nov 14, 2012
View
@@ -1,15 +1,14 @@
-Welcome to the Atari Arcade SDK.
-
-This is the initial release of the SDK, which we hope to evolve over the next few weeks, adding
-* more documentation
-* examples
-* updates
-
-This repository contains
-* Atari Arcade SDK classes in scripts/libs
-* scripts necessary to run the SDK locally, in scripts/min
-* API documentation and a quick start guide in docs/
-* A test harness page to bootstrap and launch games
-
-Check out the Atari Arcade at http://atari.com/arcade
+Welcome to the Atari Arcade SDK.
+
+This repository contains
+* Atari Arcade SDK classes in scripts/libs
+* A test harness page to bootstrap and launch games
+* Scripts necessary to run the SDK locally, in scripts/min
+* API documentation and a quick start guide in docs/
+* PhotoShop design templates in docs/DeveloperTemplates.zip
+
+Please read the quick start guide to get started.
+Note that the test harness will NOT run without a local server.
+
+Check out the Atari Arcade at http://atari.com/arcade
Check out the Developer Center at http://atari.com/arcade/developers
View
@@ -1,3 +1,14 @@
-Version 0.1.0 [August 30, 2012]
-----------------------------------------------------------
+Version 1.1.0 [October 31, 2012]
+----------------------------------------------------------
+SDK Update for developers to submit games
+* General modifications and updates to the SDK
+* SDK hooks for mobile and responsive design support
+* Improvements to the test harness to automatically list games
+* Addition of mobile simulator options in the test harness
+* Provision of developer design templates
+* First draft of a game submission guide
+
+
+Version 1.0.0 [August 30, 2012]
+----------------------------------------------------------
Initial library release!
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
View
@@ -4,10 +4,20 @@
var shell = Atari.GameShell;
var progress = null;
var gameInfo = null;
- var performanceIndex;
- function quickPlay(gameId, basePath) {
+ var forceTouch = false;
+ var platform = null;
+
+ function quickPlay(gameId, basePath, p_forceTouch, p_platform) {
currentGame = gameId;
+ forceTouch = p_forceTouch;
+ platform = null;
+ if (p_platform != "") { platform = p_platform; }
+
+ progress = document.getElementById("progress");
+ progress.innerHTML = "Loading Game Manifest...";
+ progress.style.display = "block";
+
// Initialize is mandatory now.
shell.onManifestLoaded = handleManifestLoaded;
shell.initialize(basePath);
@@ -17,9 +27,8 @@
// It is safe to show an arcade layout here.
shell.onGameSetup = handleGameSetup;
shell.setupGame(currentGame);
- progress = document.getElementById("progress");
progress.style.display = "auto";
- progress.innerHTML = "Waiting...";
+ progress.innerHTML = "Setting Up Game...";
}
// Game manifest (and possibly start screen assets) are loaded.
@@ -28,13 +37,14 @@
shell.onGameReady = handleGameReady;
shell.onPlayersChanged = handlePlayersChanged;
+ progress.innerHTML = "Loading Game..."
+
// All games also provide progress. It is important to check progress even on multiplayer games.
shell.onGameProgress = handleProgress;
+ // Create the game.
shell.createGame(document.body);
- //var parent = document.getElementById('games');
- //$(parent).fadeOut(500, function () { shell.createGame(document.getElementById('games')); });
-
+ if (platform != null) { document.getElementById("gameFrame").className = "mobile"; }
setTimeout(function() {
$(parent).fadeIn(750);
@@ -50,28 +60,24 @@
var mode = GameLibs.GameInfo.SINGLE_PLAYER;
var manifest = shell.currentGameManifest;
- //Prompt user to start a multiplayer game
+ // Prompt user to start a multiplayer game
var mp = manifest.multiplayer;
- if (mp) {
+ if (mp && platform == null) {
if (confirm("Play Multiplayer?")) {
mode = GameLibs.GameInfo.MULTI_PLAYER;
}
}
- //If we're not in multiplayer, inject 1 player into the GameInfo
+ // If we're not in multiplayer, inject 1 player into the GameInfo
if(mode == GameLibs.GameInfo.SINGLE_PLAYER){
var players = [new GameLibs.Player("Player 1", "sp")];
}
- //Initialize GameInfo class
- gameInfo = new GameLibs.GameInfo(manifest.id, mode, roomName, players, mp, manifest.modes);
+ // Initialize GameInfo class
+ gameInfo = new GameLibs.GameInfo(manifest.id, mode, roomName, players, mp, manifest.modes, platform, 1024, 622);
Atari.trace("Joining room: " + roomName);
- //[SB] Check whether touch support is enabled and inject into gameInfo
- if('ontouchstart' in document.documentElement || (window.navigator && window.navigator.msMaxTouchPoints > 0)){
- gameInfo.touchEnabled = true;
- }
- var check = document.getElementById("forceTouch");
- if (check && check.checked) {
+ // Check whether touch support is enabled and inject into gameInfo
+ if(forceTouch || 'ontouchstart' in document.documentElement || (window.navigator && window.navigator.msMaxTouchPoints > 0)){
gameInfo.touchEnabled = true;
}
@@ -83,7 +89,7 @@
var mpg = new GameLibs.MultiPlayerGame(gameInfo);
}
- //Pass both mpg and gameInfo to the shell to initialize the game.
+ // Pass both mpg and gameInfo to the shell to initialize the game.
shell.initializeGame(gameInfo, mpg);
// Multiplayer games return a room which is connected to the socket. It will provide
@@ -93,6 +99,7 @@
mpg.onTimeout = handleTimeout;
mpg.onGameReady = startGame;
mpg.onPlayersChanged = handlePlayersChanged;
+ mpg.onPlayerLeave = handlePlayerLeave;
mpg.onConnectionSuccess = handleConnectionSuccess;
mpg.onGameCanceled = handleGameCancelled;
@@ -105,7 +112,8 @@
// The game is ready to play. Either call startGame(), or show a button that does it.
function startGame() {
// Set the selected mode!
- if (gameInfo.gameModes != null) {
+ // Note: No mode is set for mobile.
+ if (gameInfo.gameModes != null && platform == null) {
var msg = "Choose a game mode:";
var modes = gameInfo.gameModes;
for(var i = 0, l = modes.length; i < l; i++) {
@@ -153,10 +161,15 @@
progress.innerHTML += "<br />[Multiplayer] Player Joined! There are now "+ roster.length +" people in the room.";
}
+ // Players left the room, either during the pre-game, or during the game.
+ function handlePlayerLeave(playerId) {
+ shell.removePlayer(playerId);
+ }
+
// Players left or joined the room, either during the pre-game, or during the game.
- function handleConnectionSuccess(roster) {
- progress.innerHTML += "<br />[Multiplayer] Connected to server...";
- }
+ function handleConnectionSuccess(roster) {
+ progress.innerHTML += "<br />[Multiplayer] Connected to server...";
+ }
// The game was canceled because not enough players are present. This will only happen in-game when players leave.
function handleGameCancelled(roster) {
@@ -3,25 +3,46 @@
<head>
<title>Atari Arcade: Game Viewer</title>
+ <!-- META no-index tags? -->
+
<script>
- // Legacy CreateJS code.
+ // Required to allow non-namespaced createjs classes.
var createjs = window;
+ var AtariSite = {};
</script>
- <script src="{BASE_URL}scripts/min/jquery-1.7.2.min.js"></script>
+
+ <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
+ <script src="{BASE_URL}scripts/BrowserDetect.js"></script>
<script src="{BASE_URL}scripts/min/json2.min.js"></script>
<!-- CreateJS libs -->
+ <!--
<script src="{BASE_URL}scripts/min/preloadjs-0.2.0.min.js"></script>
<script src="{BASE_URL}scripts/min/easeljs-0.5.0.min.js"></script>
<script src="{BASE_URL}scripts/min/tweenjs-0.3.0.min.js"></script>
- <script src="{BASE_URL}scripts/min/soundjs-0.3.0.min.js"></script>
- <script src="{BASE_URL}scripts/min/soundjs.flashplugin-0.3.0.min.js"></script>
+ -->
+ <script src="http://code.createjs.com/easeljs-0.5.0.min.js"></script>
+ <script src="http://code.createjs.com/tweenjs-0.3.0.min.js"></script>
+ <script src="http://code.createjs.com/preloadjs-0.2.0.min.js"></script>
+
+ <script src="{BASE_URL}scripts/min/soundjs-NEXT.min.js"></script>
+ <script src="{BASE_URL}scripts/min/soundjs.flashplugin-NEXT.min.js"></script>
+
+ <!-- Easel Filters -->
+ <script src="{BASE_URL}scripts/easeljs/filters/ColorMatrix.js"></script>
+ <script src="{BASE_URL}scripts/easeljs/filters/ColorMatrixFilter.js"></script>
+ <script src="{BASE_URL}scripts/easeljs/filters/BoxBlurFilter.js"></script>
+
+ <!-- PreloadJS classes
+ <script src="{BASE_URL}scripts/preloadjs/AbstractLoader.js"></script>
+ <script src="{BASE_URL}scripts/preloadjs/PreloadJS.js"></script>
+ <script src="{BASE_URL}scripts/preloadjs/XHRLoader.js"></script>
+ <script src="{BASE_URL}scripts/preloadjs/TagLoader.js"></script>-->
<!-- Framework libs -->
<script src="{BASE_URL}scripts/libs/atari/Atari.js"></script>
<script src="{BASE_URL}scripts/libs/atari/Fonts.js"></script>
<script src="{BASE_URL}scripts/libs/atari/GameBootstrap.js"></script>
- <script src="{BASE_URL}scripts/libs/atari/HighScores.js"></script>
<script src="{BASE_URL}scripts/libs/atari/GameMediator.js"></script>
<!-- Library libs -->
@@ -49,7 +70,6 @@
<script src="{BASE_URL}scripts/libs/gamelibs/input/GamePad.js"></script>
<script src="{BASE_URL}scripts/libs/gamelibs/input/TouchBar.js"></script>
<script src="{BASE_URL}scripts/libs/gamelibs/input/Joystick.js"></script>
- <script src="{BASE_URL}scripts/libs/gamelibs/input/TouchBar.js"></script>
<script src="{BASE_URL}scripts/libs/gamelibs/input/ArcadeButton.js"></script>
<script src="{BASE_URL}scripts/libs/gamelibs/input/Throttle.js"></script>
@@ -58,17 +78,41 @@
<script src="{BASE_URL}scripts/libs/gskinner/Rnd.js"></script>
<script>
+ var startGameTimeout = null;
+
function init(){
window.BASE_PATH = "{BASE_URL}";
Atari.GameBootstrap.initialize();
- setTimeout(startGame, 250);
+
+ var mtiTracking=document.createElement('link');
+ mtiTracking.type='text/css';
+ mtiTracking.rel='stylesheet';
+ mtiTracking.href=('https:'==document.location.protocol?'https:':'http:')+'//fast.fonts.com/t/1.css?apiType=css&projectid=b7bb98c2-e492-419b-8a30-eee475b57fb1';
+ (document.getElementsByTagName('head')[0]||document.getElementsByTagName('body')[0]).appendChild( mtiTracking );
+
+ window.onunload = handleWindowUnload;
+
+ startGameTimeout = setTimeout(startGame, 250);
}
+ function handleWindowUnload() {
+ //Get rid off all the cache canvases
+ createjs.DisplayObject._hitTestCanvas = null;
+ createjs.Graphics._ctx = null;
+ createjs.SpriteSheetUtils._workingCanvas = null;
+ createjs.Text._workingContext = null;
+ clearTimeout(startGameTimeout);
+ window.Atari = null;
+ window.onunload = null;
+ }
+
function startGame(gameId) {
Atari.GameBootstrap.startGame("{GAME_ID}", "{BASE_URL}", document.getElementById("gameCanvas"));
}
- //The main window has passed in keyboard, mouse, or touch input.
+ /**
+ * The main window has passed in keyboard, mouse, or touch input.
+ */
function handleRelayedInput(type, event, data) {
if (window.Atari == null) { return; }
if (Atari.gameMediator == null) { return; }
@@ -86,7 +130,50 @@
user-select: none;
}
</style>
- <link rel="stylesheet" href="{BASE_URL}testharness/css/game.css" />
+
+ <!--
+ FONT SUPPORT: These only work when embedded directly in the page, it won't work via a .css include
+ [SB] Talk to caldwell for deets...
+ -->
+ <style type="text/css">
+ @font-face{
+ font-family:"AvantGardeGothicITCW01B 731069";
+ src:url("{BASE_URL}fonts/2a334c60-3e0d-4f43-b0e9-5284ea33961a.eot?iefix") format("eot");}
+ @font-face{
+ font-family:"AvantGardeGothicITCW01B 731069";
+ src:url("{BASE_URL}fonts/2a334c60-3e0d-4f43-b0e9-5284ea33961a.eot?iefix");
+ src:url("{BASE_URL}fonts/c68f0543-0caf-4988-b234-355520476b8c.woff") format("woff"),url("{BASE_URL}fonts/2d4f1d98-ddb3-4acc-ae78-c8b1863f780e.ttf") format("truetype"),url("{BASE_URL}fonts/80f98a03-905d-49e6-8614-cec7c32ca4f2.svg#80f98a03-905d-49e6-8614-cec7c32ca4f2") format("svg");
+ }
+
+ @font-face{
+ font-family:"AvantGardeGothicITCW01B 731072";
+ src:url("{BASE_URL}fonts/d6c308a1-6908-40bc-b732-0fec02d083ac.eot?iefix") format("eot");}
+ @font-face{
+ font-family:"AvantGardeGothicITCW01B 731072";
+ src:url("{BASE_URL}fonts/d6c308a1-6908-40bc-b732-0fec02d083ac.eot?iefix");
+ src:url("{BASE_URL}fonts/7571e8e6-97a2-48aa-97c1-b8aeeefc5409.woff") format("woff"),url("{BASE_URL}fonts/8f1e17ad-3b38-4d51-83f5-4e5469174a77.ttf") format("truetype"),url("{BASE_URL}fonts/1ee7d1fd-0f7c-4d70-b970-f4dc602eab62.svg#1ee7d1fd-0f7c-4d70-b970-f4dc602eab62") format("svg");
+ }
+
+ @font-face{
+ font-family:"AvantGardeGothicITCW01D 731075";
+ src:url("{BASE_URL}fonts/b74e5f86-4477-435a-abdf-32d8215f21bc.eot?iefix") format("eot");}
+ @font-face{
+ font-family:"AvantGardeGothicITCW01D 731075";
+ src:url("{BASE_URL}fonts/b74e5f86-4477-435a-abdf-32d8215f21bc.eot?iefix");
+ src:url("{BASE_URL}fonts/c18aee57-7585-4a8b-9a1c-69d226301d73.woff") format("woff"),url("{BASE_URL}fonts/44ccbb2b-0fbc-4d95-b1da-0aa73bd26fb0.ttf") format("truetype"),url("{BASE_URL}fonts/f2de529c-11d2-43b7-be7c-05c5aaeaf133.svg#f2de529c-11d2-43b7-be7c-05c5aaeaf133") format("svg");
+ }
+
+ @font-face{
+ font-family:"AvantGardeGothicITCW01D 731078";
+ src:url("{BASE_URL}fonts/11458aa4-54c5-4577-b6c7-03209f393c77.eot?iefix") format("eot");}
+ @font-face{
+ font-family:"AvantGardeGothicITCW01D 731078";
+ src:url("{BASE_URL}fonts/11458aa4-54c5-4577-b6c7-03209f393c77.eot?iefix");
+ src:url("{BASE_URL}fonts/4e9994cb-061f-4678-850d-527f1d636f44.woff") format("woff"),url("{BASE_URL}fonts/cb81a665-3c91-4f41-a739-dbf62a943154.ttf") format("truetype"),url("{BASE_URL}fonts/a662b8b1-1550-4c01-9eec-437f22cab36e.svg#a662b8b1-1550-4c01-9eec-437f22cab36e") format("svg");
+ }
+ </style>
+
+ <link rel="stylesheet" href="{BASE_URL}testharness/css/game.css" />
</head>
<body class="game" onload="init()">
Oops, something went wrong.

0 comments on commit df296c6

Please sign in to comment.