ShareShortcuts

Demo Multiplayer Game.

nobody5050
Dupliquer « Demo Multiplayer Game. »

Tu as créé quelque chose de nouveau à partir de ce raccourci ? Partage-le comme version dérivée : il devient un raccourci à toi, que tu gères, et les deux pages renvoient l’une vers l’autre pour que nobody5050 soit crédité.

  1. 1Obtenez le raccourci et modifiez-le dans l’app Raccourcis. Donnez-lui un nom bien à lui.
  2. 2Partage-le depuis l’app Raccourcis et copie le lien iCloud.
  3. 3Reviens ici, colle le lien et décris ce qui change, par exemple : « Ajout d’une étape qui utilise Apple Intelligence pour personnaliser le texte. »
Créer mon fork
Téléchargements
56K
Enregistré
3
Actions
50
Catégorie
Fun
Version
1.0
Langue
EN

Realtime Multiplayer

====================

>*Wait really?*

**Yup!** This is just a demo of my framework for building your own multiplayer games within shortcuts! In this game you can join with a unique username, chat with other users, and explore the world around you!

>*How can I make my own games like this?*

More details will be provided with the release of the framework but suffice to say your game world is built in one single large JSON file, and each time the player interacts with the world they retrieve the latest version of this JSON giving the game real-time updates.

>*Can I beta test your framework?*

As of now, I have enough beta testers for now, but this might change in the future. If you’d like to be notified when I ask for testers join the r/shortcuts discord server because I’ll post there!

>*Can I make **X** in this framework?*

You sure can! It might require a few modifications to your shortcut to support it but anything is possible! If you’d like help implementing X game just ping me on the r/shortcuts discord server!

>*I found a bug!*

That's too bad! Please ping me in the r/shortcuts discord server and I’ll post an update soon!

Configuration:

========================================

To configure this shortcut and join the game, please enter your desired username when shortcuts prompts you. Please don't include expletives or profanities in your username, or your account will be deleted. I have an automation that purges undesirable words from the database every night at 12:00am.

Thanks for taking the time to read this! If you have any questions not answered in WWSC or here ping me in the r/shortcuts discord server.

Nouveautés

Version 1.0

First release

Historique des versions
1.0 23 sept. 2020

First release

Ce qu’il fait

50 actions
  1. Get File
  2. If
  3. Text
  4. Set Name
  5. Quick Look
  6. Number
  7. Create Folder
  8. Save File
  9. Dictionary
  10. Get Contents of URL
    https://routinehub.co/api/v1/shortcuts/…/versions/latest
  11. Get Dictionary Value
  12. If
  13. Text
  14. Choose from Menu
    …
  15. Choose from Menu
    Install | تثبيت
  16. URL
    https://routinehub.co/download/…
  17. Open URLs
  18. Stop This Shortcut
  19. Choose from Menu
    Later | في وقت لاحق
  20. If
  21. Text
  22. Text
  23. Set Variable
    Playername
  24. Set Variable
    currentRoom
  25. Number
  26. Repeat
  27. Get Contents of URL
    https://game-thing-565d2.firebaseio.com/rooms.json
  28. Get Dictionary from Input
  29. Choose from Menu
    Actions
  30. Choose from Menu
    travel | السفر
  31. Get Dictionary Value
  32. If
  33. If
  34. Choose from List
  35. Set Variable
    currentRoom
  36. Choose from Menu
    who is here? | من هنا
  37. Get Dictionary Value
  38. Count
  39. Show Alert
    There is/are currently … people here:
  40. Choose from Menu
    what is here | ما هو هنا
  41. Get Dictionary Value
  42. Count
  43. Show Alert
    There is currently … item(s) here:
  44. Choose from Menu
    examine item | فحص البند
  45. Get Dictionary Value
  46. Choose from List
  47. Get Dictionary Value
  48. Count
  49. Show Alert
  50. Stop This Shortcut

Afficher en tant que code
Bêta

Chaque action de ce raccourci écrite en Cherri, un langage de programmation pour Raccourcis. Idéal pour comprendre son fonctionnement.

#include 'actions/web'
#include 'actions/documents'
#define color darkorange
#define glyph gameController

const File = getFileFromFolder(, "DemoGame/isnew.txt", false)

if !File {
	const Text = "<!-- code generated with ScreenKit by alombi (© alombi 2020)-->\n<html>\n<head>\n<title>Welcome</title>\n    <meta charset=\\"UTF-8\\">\n    <meta name=\\"viewport\\" content=\\"width=device-width, initial-scale=1.0, user-scalable=no\\">\n\n<style>\n  body {\n    background-color:#f2f2f2;\n    color:#333333;\n    font-family: system-ui;\n    margin-left: auto;\n    margin-right: auto;\n    padding: 5%;\n    max-width: 650px;\n    }\n    p{\n      font-size:18px;\n      color:black;\n      font-weight:400;\n    }\n    h1{\n      font-size:45px;\n      font-weight:800;\n      background:linear-gradient(to bottom left, #e7735a, #e86553);\n      -webkit-background-clip: text;\n      -webkit-text-fill-color: transparent;\n  \n    }\n    .sub {\n      font-weight:200;\n      font-size:35px;\n      margin-top:-40;\n      color:black;\n    }\n      h2{\n     font-weight:600;\n     font-size:33px;\n     color:black;\n    }\n        b{\n      color:#007AFF;\n    }\n\n        @media (prefers-color-scheme: dark) {\n            body {\n                background-color: #1C1C1E;\n                color: #AAAAAA;\n            }\n\n            #transaction {\n                background-color: #191919;\n                box-shadow: none;\n            }\n            p {\n                color: #AAAAAA;\n            }\n            h2{\n              color:white;\n            }\n            .sub, .sub2{\n              color:white;\n            }\n      \n        }\n\n    </style>\n\n    <body>\n      <h1>Demo Multiplayer Game</h1>\n      <h2 class=\\"sub\\">Welcome</h2>\n      <p>Hey! Looks like this is the first time you're running Demo Multiplayer Game. <br>First of all, welcome and thanks for downloading! </p>\n      <p>Demo Multiplayer Game is A quick demo of multiplayer framework's functionalities.</p>\n\n<h2>Included:</h2>\n<p>•Game world with 4 rooms</br>\n•Each room has unique items with unique attributes</p>\n\n<h2>Enjoy Demo Multiplayer Game!</h2>\n<p>When you are ready, tap <b>Done</b> and start with a quick setup before enjoying Demo Multiplayer Game.</p>\n</body>\n</html>"
	const RenamedItem = setName(Text, "Welcome.html")
	quicklook(RenamedItem)
	const Number = 694206942069420
	createFolder("DemoGame")
	saveFile("DemoGame/isnew.txt", Number, false)
}
const ContentsOfURL = downloadURL("https://routinehub.co/api/v1/shortcuts/{['ID']}/versions/latest")
const LatestVersion = getValue(ContentsOfURL, "Version")

if LatestVersion != Dictionary['Version'] {
	menu  {
	item "Install | تثبيت":
		const URL = url("https://routinehub.co/download/{ContentsOfURL['id']}")
		openURL(URL)
		stop()
	item "Later | في وقت لاحق":
	}
} else {
}
@Playername = ""
@currentRoom
const Number1 = 9999999999999

repeat _ for Number1 {
	const ContentsOfURL1 = downloadURL("https://game-thing-565d2.firebaseio.com/rooms.json")
	const Dictionary1 = getDictionary(ContentsOfURL1)
	menu "Actions" {
	item "travel | السفر":
		const DictionaryValue = getValue(Dictionary1, "{@currentRoom}.connectedTo")
		if !DictionaryValue {
		} else {
			chooseFromList(DictionaryValue, "Travel to which room?")
			@currentRoom
		}
	item "who is here? | من هنا":
		const DictionaryValue1 = getValue(Dictionary1, "{@currentRoom}.people")
		count(DictionaryValue1)
		alert(DictionaryValue1, "There is/are currently {} people here:")
	item "what is here | ما هو هنا":
		const DictionaryValue2 = getValue(Dictionary1, "{@currentRoom}.itemsNames")
		count(DictionaryValue2)
		alert(DictionaryValue2, "There is currently {} item(s) here:")
	item "examine item | فحص البند":
		const DictionaryValue3 = getValue(Dictionary1, "{@currentRoom}.itemsNames")
		chooseFromList(DictionaryValue3)
		const DictionaryValue4 = getValue(Dictionary1, "{@currentRoom}.itemsData.{}")
		count(DictionaryValue4)
		confirm("The chosen item has  {} attributes:\n{DictionaryValue4}")
	}
}
stop()
Ouvrir dans Cherri Playground Décompilé avec cherri 2.3.0 (GPL-2.0). Quelques corrections peuvent être nécessaires avant la compilation.

Notes et avis

Écrire un avis
–
sur 5
★★★★★
★★★★
★★★
★★
★
0 ratings

Aucun avis pour le moment. Sois le premier à partager ton avis !

Publicité

Ça pourrait aussi te plaire

Tout afficher
Publicité