From d56b320a58b22e018abc64c8902970ad1a47bc30 Mon Sep 17 00:00:00 2001 From: daformat Date: Tue, 20 May 2014 15:52:42 +0200 Subject: [PATCH 1/5] update sharing params to use cryptrisSettings.appUrl --- js/game_engine/share.js | 4 ++-- js/index.js | 4 ++-- js/jeu.js | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/js/game_engine/share.js b/js/game_engine/share.js index 7c4bc2f..d8371e8 100644 --- a/js/game_engine/share.js +++ b/js/game_engine/share.js @@ -265,8 +265,8 @@ function createCryptedMessage() { var hrefPath = url, title = "Défi! Cryptris, un jeu gratuit sur la cryptographie asymétrique", text = "Déchiffrez le message: ", - preview = "http://daformat.github.io/cryptris/img/cryptis-social-preview-600x600.png", - preview_xl = "http://daformat.github.io/cryptris/img/cryptis-social-preview-1200x630.png", + preview = cryptrisSettings.appUrl + "/img/cryptis-social-preview-600x600.png", + preview_xl = cryptrisSettings.appUrl + "http://daformat.github.io/cryptris/img/cryptis-social-preview-1200x630.png", code = string_to_ternary(crypted_message.plain_message.toString()).join('').substr(0,80); /** Setup sharing urls **/ diff --git a/js/index.js b/js/index.js index 76c3551..0b9dcc9 100644 --- a/js/index.js +++ b/js/index.js @@ -4,8 +4,8 @@ $(function(){ hrefPath = url, title = "Cryptris, un jeu gratuit sur la cryptographie asymétrique", text = "Défiez l’ordinateur pour savoir qui arrivera à décrypter le plus rapidement. De nombreux défis cryptologiques vous attendent, êtes-vous prêts ?", - preview = "http://daformat.github.io/cryptris/img/cryptis-social-preview-600x600.png"; - preview_xl = "http://daformat.github.io/cryptris/img/cryptis-social-preview-1200x630.png"; + preview = cryptrisSettings.appUrl + "/img/cryptis-social-preview-600x600.png"; + preview_xl = cryptrisSettings.appUrl + "/img/cryptis-social-preview-1200x630.png"; /** Setup sharing urls **/ diff --git a/js/jeu.js b/js/jeu.js index fd27a89..39c2538 100644 --- a/js/jeu.js +++ b/js/jeu.js @@ -269,8 +269,8 @@ $(document).ready(function() { hrefPath = url, title = "Cryptris, un jeu gratuit sur la cryptographie asymétrique", text = "Je viens de terminer Cryptris - un jeu sur l’univers de la cryptographie asymétrique. Affrontez l’ordinateur", - preview = "http://daformat.github.io/cryptris/img/cryptis-social-preview-600x600.png"; - preview_xl = "http://daformat.github.io/cryptris/img/cryptis-social-preview-1200x630.png"; + preview = cryptrisSettings.appUrl + "/img/cryptis-social-preview-600x600.png"; + preview_xl = cryptrisSettings.appUrl + "/img/cryptis-social-preview-1200x630.png"; /** Setup sharing urls **/ From 4fef8cfca529fbe84a55d3307c43289983ca1c41 Mon Sep 17 00:00:00 2001 From: daformat Date: Tue, 20 May 2014 16:03:46 +0200 Subject: [PATCH 2/5] update sharing params to use cryptrisSettings.appUrl --- js/game_engine/share.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/game_engine/share.js b/js/game_engine/share.js index d8371e8..7c4a503 100644 --- a/js/game_engine/share.js +++ b/js/game_engine/share.js @@ -266,7 +266,7 @@ function createCryptedMessage() { title = "Défi! Cryptris, un jeu gratuit sur la cryptographie asymétrique", text = "Déchiffrez le message: ", preview = cryptrisSettings.appUrl + "/img/cryptis-social-preview-600x600.png", - preview_xl = cryptrisSettings.appUrl + "http://daformat.github.io/cryptris/img/cryptis-social-preview-1200x630.png", + preview_xl = cryptrisSettings.appUrl + "/img/cryptis-social-preview-1200x630.png", code = string_to_ternary(crypted_message.plain_message.toString()).join('').substr(0,80); /** Setup sharing urls **/ From fe6a450a349748c9813966f1f38d708e4a713333 Mon Sep 17 00:00:00 2001 From: daformat Date: Tue, 20 May 2014 16:13:50 +0200 Subject: [PATCH 3/5] update readme --- README.md | 42 ++++++++++++++++++++++++++++++++++++++---- 1 file changed, 38 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 3d6ec1a..f437247 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,38 @@ -cryptris +Cryptris ======== +##A game about asymetric cryptography -To test the board, go to game.html +Cryptris is a game designed to help people in getting a grasp about how cryptography works. +The game was developped by [Digital Cuisine][digital-cuisine] for [Inria][inria] and is based on a concept created by Léo Ducas. -Test the game +##Technology +This game uses html, css and javascript. No server were harmed during the developpment process. + +## Installation +The whole application is designed to be a serverless application, hence the installation is pretty straightforward: simply clone this repository or download it as an archive. + +## Launching the game +To launch the game, simply open the `index.html` file in a compatible web browser. + +## Configuring the game for using on a custom domain / url +Changin the app's url is just a matter of changing the url that social networks will use to fetch data about Cryptris (title, descriptions, picture previews…). Unfortunately, due to the serverless nature of this project, a few occurences of this url _had to be_ hard-coded in the html files' meta tags. A global configuration variable is used everywhere else where the app's url is needed, this variable can be found in the `js/cryptris-settings.js` file. + +**Before publishing the game,** make sure that you proceed to the following: + +* open up `js/cryptris-settings.js`. +* look for the line where `cryptrisSettings.appUrl` is defined. +* copy `appUrl`'s actual value (e.g. http://daformat.github.io/cryptris) +* search and replace this url in the game's `.html` files. +* set `cryptrisSettings.appUrl` to whatever your new url is. +* upload to your new url and carefully test that every sharing function still works as expected. + +Be sure to update the app settings for facebook (facebook apps) and google+ (google API console), as of may 2014, twitter doesn't ask for this. + + + +### Test the game 'r' => Generate a key. @@ -31,4 +58,11 @@ currentGame.switchDialog(dialogNumber); To know the current dialog number : -currentGame.currentDialog(); \ No newline at end of file +currentGame.currentDialog(); + +___ + +## Links & references + +[digital-cuisine]: www.digitalcuisine.fr +[inria]: www.inria.fr From 77b499575ea3aba801312be017fc27fc89794a4f Mon Sep 17 00:00:00 2001 From: daformat Date: Tue, 20 May 2014 16:14:40 +0200 Subject: [PATCH 4/5] update readme --- README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index f437247..a4f138d 100644 --- a/README.md +++ b/README.md @@ -1,22 +1,22 @@ Cryptris ======== -##A game about asymetric cryptography +###A game about asymetric cryptography Cryptris is a game designed to help people in getting a grasp about how cryptography works. The game was developped by [Digital Cuisine][digital-cuisine] for [Inria][inria] and is based on a concept created by Léo Ducas. -##Technology +###Technology This game uses html, css and javascript. No server were harmed during the developpment process. -## Installation +### Installation The whole application is designed to be a serverless application, hence the installation is pretty straightforward: simply clone this repository or download it as an archive. -## Launching the game +### Launching the game To launch the game, simply open the `index.html` file in a compatible web browser. -## Configuring the game for using on a custom domain / url +### Configuring the game for using on a custom domain / url Changin the app's url is just a matter of changing the url that social networks will use to fetch data about Cryptris (title, descriptions, picture previews…). Unfortunately, due to the serverless nature of this project, a few occurences of this url _had to be_ hard-coded in the html files' meta tags. A global configuration variable is used everywhere else where the app's url is needed, this variable can be found in the `js/cryptris-settings.js` file. **Before publishing the game,** make sure that you proceed to the following: @@ -32,7 +32,7 @@ Be sure to update the app settings for facebook (facebook apps) and google+ (goo -### Test the game +#### Test the game 'r' => Generate a key. @@ -62,7 +62,7 @@ currentGame.currentDialog(); ___ -## Links & references +### Links & references [digital-cuisine]: www.digitalcuisine.fr [inria]: www.inria.fr From 87ad0bbc961d6cbeb9ffa5184633e96c4d8af4da Mon Sep 17 00:00:00 2001 From: daformat Date: Tue, 20 May 2014 16:45:49 +0200 Subject: [PATCH 5/5] update readme --- README.md | 55 ++++++++++++++++++++++++++++++------------------------- game.html | 20 ++++++++++++++++++++ 2 files changed, 50 insertions(+), 25 deletions(-) diff --git a/README.md b/README.md index a4f138d..7e33940 100644 --- a/README.md +++ b/README.md @@ -1,22 +1,30 @@ Cryptris ======== -###A game about asymetric cryptography +### A game about asymetric cryptography -Cryptris is a game designed to help people in getting a grasp about how cryptography works. +Cryptris is a game designed to help people in getting a grasp about how cryptography works, by playing an arguably tetris-like game. The game was developped by [Digital Cuisine][digital-cuisine] for [Inria][inria] and is based on a concept created by Léo Ducas. -###Technology + +### Technology + This game uses html, css and javascript. No server were harmed during the developpment process. + ### Installation + The whole application is designed to be a serverless application, hence the installation is pretty straightforward: simply clone this repository or download it as an archive. + ### Launching the game + To launch the game, simply open the `index.html` file in a compatible web browser. + ### Configuring the game for using on a custom domain / url + Changin the app's url is just a matter of changing the url that social networks will use to fetch data about Cryptris (title, descriptions, picture previews…). Unfortunately, due to the serverless nature of this project, a few occurences of this url _had to be_ hard-coded in the html files' meta tags. A global configuration variable is used everywhere else where the app's url is needed, this variable can be found in the `js/cryptris-settings.js` file. **Before publishing the game,** make sure that you proceed to the following: @@ -31,38 +39,35 @@ Changin the app's url is just a matter of changing the url that social networks Be sure to update the app settings for facebook (facebook apps) and google+ (google API console), as of may 2014, twitter doesn't ask for this. +### Hosting the game on github -#### Test the game - -'r' => Generate a key. - -'b' => Load a 8 column board with the message 24 +To publish on github the only thing you need to do is to make sure that your `gh-pages` branch is up-to-date and push it to your github account. You should be able to access it via http://[username].github.io/cryptris where [username] should be replaced by your actual github username. -'c' => Load a 10 column board with the message 78 -'d' => Load a 12 column board with the message 31 +### Credits +Basé sur une idée originale de Léo Ducas +#### Scénario +Mathieu Jouhet & Nicolas Pelletier -Test the Create Key test +#### Inria +* *Coordination :* Service communication du centre de recherche Inria Paris - Rocquencourt +* *Référents médiation :* Thierry Vieville et Laurent Viennot +* *Référent scientifique :* Léo Ducas -'a' => load the create_key screen. - -'e' => launch the computer process - - - -To switch at a specific dialog, in the console : - -currentGame.switchDialog(dialogNumber); - -To know the current dialog number : - -currentGame.currentDialog(); +#### Digital Cuisine +* *Directeur Artistique :* Mathieu Jouhet ([@daformat](https://twitter.com/daformat)) +* *Graphiste :* Nicolas Pelletier +* *Game engine :* Vincent Mézino +* *Intégration html, développement javascript:* Mathieu Jouhet +* *Test :* Olivier Lance, Pierre-Jean Quilleré ___ ### Links & references - +[Digital Cuisine][digital-cuisine] [digital-cuisine]: www.digitalcuisine.fr + +[Inria][inria] [inria]: www.inria.fr diff --git a/game.html b/game.html index 21702a3..8084653 100644 --- a/game.html +++ b/game.html @@ -38,4 +38,24 @@ + + +