ShareShortcuts

Demo Multiplayer Game.

nobody5050
„Demo Multiplayer Game.“ forken

Hast du auf Basis dieses Kurzbefehls etwas Neues erstellt? Teile ihn als Fork: Er wird zu deinem eigenen Kurzbefehl, den du selbst verwaltest, und beide Seiten verlinken aufeinander, damit nobody5050 die Anerkennung erhält.

  1. 1Lade den Kurzbefehl und ändere ihn in der Kurzbefehle-App. Gib ihm einen eigenen Namen.
  2. 2Teile ihn in der Kurzbefehle-App und kopiere den iCloud-Link.
  3. 3Komm hierher zurück, füge den Link ein und beschreibe, was sich geändert hat, z. B. „Einen Schritt hinzugefügt, der Apple Intelligence nutzt, um den Text zu personalisieren.“
Downloads
56K
Gesichert
3
Aktionen
50
Kategorie
Fun
Version
1.0
Sprache
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.

Neue Funktionen

Version 1.0

First release

Versionsverlauf
1.0 23. Sep 2020

First release

Was er macht

50 Aktionen
  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

Als Code ansehen
Beta

Jede Aktion dieses Kurzbefehls als Cherri ausgeschrieben, eine Programmiersprache für Kurzbefehle. Ideal, um zu lernen, wie er funktioniert.

#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()
In Cherri Playground öffnen Mit cherri 2.3.0 (GPL-2.0) dekompiliert. Eventuell sind kleine Korrekturen nötig, bevor es kompiliert wird.

Bewertungen und Rezensionen

Rezension schreiben
–
von 5
★★★★★
★★★★
★★★
★★
★
0 ratings

No reviews yet. Be the first to share what you think!

Werbung

Das gefällt dir vielleicht auch

Alle anzeigen
Werbung