Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentes Révision précédente Prochaine révision | Révision précédente | ||
ressource:logiciel:twine:start [2024/12/09 23:13] emoc [Ressources] |
ressource:logiciel:twine:start [2025/01/29 23:08] (Version actuelle) emoc [Quizz] |
||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
+ | {{tag>jeu-video code fiction-interactive narration game-jam em}} | ||
+ | |||
====== Twine ====== | ====== Twine ====== | ||
Ligne 12: | Ligne 14: | ||
* twine : https://github.com/klembot/twinejs/releases | * twine : https://github.com/klembot/twinejs/releases | ||
* tweego : https://github.com/tmedwards/tweego | * tweego : https://github.com/tmedwards/tweego | ||
+ | |||
+ | ===== TL;DR ===== | ||
+ | |||
+ | Pour découvrir Twine, les tutos vidéos francophones de Tourmaline Studio sont parfaits! : https://www.youtube.com/watch?v=dl_WlMMTt1s&list=PLFGDV4C3TmMGzuRN9In6MQducHbxqwTWI \\ | ||
===== Formats d’histoires : Harlowe et les autres ===== | ===== Formats d’histoires : Harlowe et les autres ===== | ||
Ligne 29: | Ligne 35: | ||
Harlowe est le format conseillé pour commencer en Twine 2, il est activé par défaut \\ | Harlowe est le format conseillé pour commencer en Twine 2, il est activé par défaut \\ | ||
+ | * Dans le [[https://twinery.org/cookbook/|Twine Cookbook]], on trouve pas mal d'exemples adaptés à chaque format d'histoires | ||
* Harlowe 2.1.0 doc : https://twine2.neocities.org/2 | * Harlowe 2.1.0 doc : https://twine2.neocities.org/2 | ||
* Harlowe 3.3.8 doc : https://twine2.neocities.org/ | * Harlowe 3.3.8 doc : https://twine2.neocities.org/ | ||
* Sugarcube doc : http://www.motoslave.net/sugarcube/2/ | * Sugarcube doc : http://www.motoslave.net/sugarcube/2/ | ||
+ | * Snowman : | ||
+ | * https://videlais.github.io/snowman/#/ | ||
+ | * https://github.com/videlais/snowman | ||
+ | * [[https://videlais.com/wp-content/uploads/2017/07/twine-2-1-snowman-1-3-cheatsheet.pdf|Snowman Cheatsheet]] | ||
Plus d’infos en français ici : https://www.bac-a-sable.eu/twine/quelformatchoisir/ \\ | Plus d’infos en français ici : https://www.bac-a-sable.eu/twine/quelformatchoisir/ \\ | ||
Ligne 38: | Ligne 49: | ||
A ces formats d’histoire proposé par Twine, on peut ajouter des formats préparés par la communauté, comme **trialogue** qui permet de rédiger des dialogues type messagerie instantanée. L’installation d’un nouveau format d’images se fait dans l’interface du logiciel (voir ci-dessous) en important le fichier **format.js** dédié (même principe pour la version en ligne que pour l’application desktop) | A ces formats d’histoire proposé par Twine, on peut ajouter des formats préparés par la communauté, comme **trialogue** qui permet de rédiger des dialogues type messagerie instantanée. L’installation d’un nouveau format d’images se fait dans l’interface du logiciel (voir ci-dessous) en important le fichier **format.js** dédié (même principe pour la version en ligne que pour l’application desktop) | ||
- | **Trialogue** | + | **Trialogue** \\ |
+ | Trialogue est un format d'histoire basé sur Paloma, qui à son tour est basé sur Snowman! | ||
* https://github.com/phivk/trialogue | * https://github.com/phivk/trialogue | ||
+ | * http://phivk.com/trialogue/ | ||
* https://phivk.gitbook.io/trialogue/making-a-scripted-chat-story | * https://phivk.gitbook.io/trialogue/making-a-scripted-chat-story | ||
* **lien direct vers le** [[https://phivk.github.io/trialogue/dist/Twine2/Trialogue/format.js|fichier format.js de Trialogue]] | * **lien direct vers le** [[https://phivk.github.io/trialogue/dist/Twine2/Trialogue/format.js|fichier format.js de Trialogue]] | ||
+ | **Paloma** \\ | ||
+ | Toute l’histoire à la suite avec le format d’histoire Paloma : https://mcdemarco.net/tools/scree/paloma/ | ||
==== Ajouter un format ==== | ==== Ajouter un format ==== | ||
Ligne 76: | Ligne 91: | ||
- | [{{:ressource:logiciel:twine:twine_tableaux_et_boucles.png?direct&600|Images extraites des très bons tutoriels vidéo de [[https://www.youtube.com/watch?v=dl_WlMMTt1s&list=PLFGDV4C3TmMGzuRN9In6MQducHbxqwTWI |Tourmaline Studio]]}}] | + | [{{:ressource:logiciel:twine:twine_tableaux_et_boucles.png?direct&800|Images extraites des très bons tutoriels vidéo de [[https://www.youtube.com/watch?v=dl_WlMMTt1s&list=PLFGDV4C3TmMGzuRN9In6MQducHbxqwTWI |Tourmaline Studio]]}}] |
==== Styles ==== | ==== Styles ==== | ||
Ligne 166: | Ligne 181: | ||
* Introduction to Twine (Harlowe) : https://docs.wixstatic.com/ugd/d1fd96_4cea140f718a483689aa26a67981671c.pdf | * Introduction to Twine (Harlowe) : https://docs.wixstatic.com/ugd/d1fd96_4cea140f718a483689aa26a67981671c.pdf | ||
- | ==== Autres formats d’histoire ==== | + | **Chat-like discussions** |
+ | * trialogue (voir plus haut) est très bien pour simuler des conversations messagerie instantanée, mais basé sur le format d'histoire snowman | ||
+ | * chat like discussion in harlowe : http://twinery.org/forum/discussion/7994/chat-like-conversations-for-harlowe / css voir https://codepen.io/2ne/pen/AXMLpj | ||
+ | * sur le même sujet une vidéo un peu datée… (2017) : https://www.youtube.com/watch?v=kjKRegikbYQ | ||
- | * **Paloma** : toute l’histoire à la suite avec le format d’histoire Paloma : https://mcdemarco.net/tools/scree/paloma/ | + | **Récits exemple** |
+ | * un exemple en Harlowe : https://www.bac-a-sable.eu/agneau/ | ||
- | ==== Récits exemple ==== | ||
- | * un exemple en Harlowe : https://www.bac-a-sable.eu/agneau/ | ||
- | ==== Chat-like discussions ==== | + | ===== Tutoriels ===== |
+ | |||
+ | **une série de 10 tutos vidéos par Tourmaline Studio, très bien faits pour découvrir Twine 2** (2021) : https://www.youtube.com/watch?v=dl_WlMMTt1s&list=PLFGDV4C3TmMGzuRN9In6MQducHbxqwTWI \\ | ||
+ | (en) vidéo d’intro très bien : https://www.youtube.com/watch?v=lhn39SPETMM | ||
+ | |||
+ | ===== Aides thématiques ===== | ||
+ | |||
+ | ==== Quizz ==== | ||
+ | |||
+ | |||
+ | |||
+ | (avec Sugarcube 2.37.3) Pour créer un **quizz type magazine : les réponses dessinent un profil que l'on découvre à la fin**\\ | ||
+ | doc : http://www.motoslave.net/sugarcube/2/docs/ | ||
+ | |||
+ | <accordion> | ||
+ | <panel title="quizz_type_magazine.twee (cliquer pour afficher le code)"> | ||
+ | <code quizz_type_magazine.twee> | ||
+ | :: StoryTitle | ||
+ | quizz | ||
+ | |||
+ | :: StoryData | ||
+ | { | ||
+ | "ifid": "B93FA341-C13B-4731-A513-AD27D51B5239", | ||
+ | "format": "SugarCube", | ||
+ | "format-version": "2.37.3", | ||
+ | "start": "Question IST", | ||
+ | "zoom": 1 | ||
+ | } | ||
+ | |||
+ | |||
+ | :: Question 1 {"position":"400,225","size":"100,100"} | ||
+ | Question 1: Comment ça va ? | ||
+ | |||
+ | |||
+ | <<link "bof" "Question 2">><<set $counts["A"] += 1>><</link>> | ||
+ | <<link "moyen" "Question 2">><<set $counts["B"] += 1>><</link>> | ||
+ | <<link "bien" "Question 2">><<set $counts["C"] += 1>><</link>> | ||
+ | <<link "bien bien" "Question 2">><<set $counts["D"] += 1>><</link>> | ||
+ | <<link "top" "Question 2">><<set $counts["E"] += 1>><</link>> | ||
+ | |||
+ | |||
+ | :: Question 2 {"position":"525,225","size":"100,100"} | ||
+ | Question 2 : on est quel jour ? | ||
+ | |||
+ | <<link "lundi" "Question 3">><<set $counts["A"] += 1>><</link>> | ||
+ | <<link "mardi" "Question 3">><<set $counts["B"] += 1>><</link>> | ||
+ | <<link "mercredi" "Question 3">><<set $counts["C"] += 1>><</link>> | ||
+ | <<link "jeudi" "Question 3">><<set $counts["D"] += 1>><</link>> | ||
+ | <<link "vendredi" "Question 3">><<set $counts["E"] += 1>><</link>> | ||
+ | |||
+ | |||
+ | :: Question 3 {"position":"650,225","size":"100,100"} | ||
+ | Question 3 : quelle garniture dans ta crêpe ? | ||
+ | |||
+ | <<link "complète" "Resultat">><<set $counts["A"] += 1>><</link>> | ||
+ | <<link "frites merguez harissa" "Resultat">><<set $counts["B"] += 1>><</link>> | ||
+ | <<link "sucre" "Resultat">><<set $counts["C"] += 1>><</link>> | ||
+ | <<link "beurre (beaucoup)" "Resultat">><<set $counts["D"] += 1>><</link>> | ||
+ | <<link "chocolat amandes chantilly" "Resultat">><<set $counts["E"] += 1>><</link>> | ||
+ | |||
+ | |||
+ | :: Resultat {"position":"400,350","size":"100,100"} | ||
+ | <<silently>> | ||
+ | /* Determine the maximum count and the choice(s) that equal it. */ | ||
+ | <<set _maxCount to 0>> | ||
+ | <<set _maxChoices to []>> | ||
+ | <<for _choice, _count range $counts>> | ||
+ | <<if _count gt _maxCount>> | ||
+ | <<set _maxCount to _count>> | ||
+ | <<set _maxChoices to [_choice]>> | ||
+ | |||
+ | <<elseif _count is _maxCount>> | ||
+ | <<set _maxChoices.push(_choice)>> | ||
+ | <</if>> | ||
+ | <</for>> | ||
+ | <</silently>>\ | ||
+ | |||
+ | \Result was _maxCount/10 for <<nobr>> | ||
+ | <<if _maxChoices.length gt 1>> | ||
+ | <<= _maxChoices.join(" and ") >> | ||
+ | <<else>> | ||
+ | _maxChoices[0] | ||
+ | <</if>> | ||
+ | <</nobr>> | ||
+ | |||
+ | \<<if _maxChoices.includes("A")>><br>Profil A<</if>> | ||
+ | \<<if _maxChoices.includes("B")>><br>Profil B<</if>> | ||
+ | \<<if _maxChoices.includes("C")>><br>Profil C<</if>> | ||
+ | \<<if _maxChoices.includes("D")>><br>Profil D<</if>> | ||
+ | \<<if _maxChoices.includes("E")>><br>Profil E<</if>> | ||
+ | |||
+ | |||
+ | :: StoryInit {"position":"400,100","size":"100,100"} | ||
+ | <<set $counts to { | ||
+ | "A": 0, | ||
+ | "B": 0, | ||
+ | "C": 0, | ||
+ | "D": 0, | ||
+ | "E": 0 | ||
+ | }>> | ||
+ | |||
+ | </code> | ||
+ | </panel> | ||
+ | </accordion> | ||
+ | |||
+ | (avec Sugarcube 2.37.3) Pour **afficher la réponse sur demande et passer à la question suivante** :\\ | ||
+ | doc : http://www.motoslave.net/sugarcube/2/docs/ | ||
+ | |||
+ | <code> | ||
+ | Qu'est-ce qu'une infection sexuellement transmissible ? | ||
+ | |||
+ | 1) une maladie qui se transmet uniquement par voir aérienne | ||
+ | 2) Une infection qui peut être transmise uniquement lors d'une relation non protégée | ||
+ | 3) Une douleur ressentie après un rapport sexuel | ||
+ | |||
+ | |||
+ | <<linkreplace "Réponse" t8n>>\ | ||
+ | Réponse 2, il s'agit d'une infection qui peut être transmise uniquement lors d'une relation non protégée | ||
+ | |||
+ | <<link "Cliquer pour la question suivante" "Question 4">><<set $counts["A"] += 1>><</link>> | ||
+ | <</linkreplace>>\ | ||
+ | </code> | ||
+ | |||
+ | |||
+ | |||
+ | (avec Sugarcube 2.37.3) Pour créer un **quizz à points avec résultat à la fin**\\ | ||
+ | doc : http://www.motoslave.net/sugarcube/2/docs/ | ||
+ | |||
+ | <accordion> | ||
+ | <panel title="quizz_a_points.twee (cliquer pour afficher le code)"> | ||
+ | <code quizz_a_points.twee> | ||
+ | :: StoryTitle | ||
+ | quizz_a_points | ||
+ | |||
+ | |||
+ | :: StoryData | ||
+ | { | ||
+ | "ifid": "D51B5239-87D3-4062-9C79-9B6628D5A31B", | ||
+ | "format": "SugarCube", | ||
+ | "format-version": "2.37.3", | ||
+ | "start": "Question 1", | ||
+ | "zoom": 1 | ||
+ | } | ||
+ | |||
+ | |||
+ | :: Question 1 {"position":"500,225","size":"100,100"} | ||
+ | Question 1: L'escargot est un ... | ||
+ | |||
+ | <<link "mammifère" "Question 2">><<set $points += 0>><</link>> | ||
+ | <<link "marsupial" "Question 2">><<set $points += 0>><</link>> | ||
+ | <<link "gastéropode" "Question 2">><<set $points += 1>><</link>> | ||
+ | |||
+ | |||
+ | :: Question 2 {"position":"625,225","size":"100,100"} | ||
+ | Question 2: le loup est un ... | ||
+ | |||
+ | <<link "mammifère" "Results">><<set $points += 1>><</link>> | ||
+ | <<link "marsupial" "Results">><<set $points += 0>><</link>> | ||
+ | <<link "gastéropode" "Results">><<set $points += 0>><</link>> | ||
+ | |||
+ | |||
+ | :: Results {"position":"500,350","size":"100,100"} | ||
+ | Bravo vous avez marqué $points points | ||
+ | |||
+ | <<if $points gte 0 and $points lte 2>> | ||
+ | Profile A | ||
+ | <<elseif $points gte 3 and $points lte 5>> | ||
+ | Profile B | ||
+ | <<elseif $points gte 6 and $points lte 8>> | ||
+ | Profile C | ||
+ | <<else>> | ||
+ | ERROR: The total number of points is outside the expected range, please contact the Developer. | ||
+ | <</if>> | ||
- | Surement à tester en premier : trialogue | ||
- | Discussions sur ce sujet + chat like discussion in harlowe : http://twinery.org/forum/discussion/7994/chat-like-conversations-for-harlowe / css voir https://codepen.io/2ne/pen/AXMLpj + sur le même sujet une vidéo un peu datée… (2017) : https://www.youtube.com/watch?v=kjKRegikbYQ ### Tutoriels | + | :: StoryInit {"position":"500,100","size":"100,100"} |
+ | <<set $points to 0>> | ||
+ | </code> | ||
+ | </panel> | ||
+ | </accordion> | ||
- | (en) vidéo d’intro très bien : https://www.youtube.com/watch?v=lhn39SPETMM une série de 10 tutos vidéos par Tourmaline Studio, très bien faits pour découvrir Twine 2 (2021) : https://www.youtube.com/watch?v=dl_WlMMTt1s&list=PLFGDV4C3TmMGzuRN9In6MQducHbxqwTWI | ||