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.
Что нового
First release
Что делает
Действий: 50-
Get File
-
If
-
Text
-
Set Name
-
Quick Look
-
Number
-
Create Folder
-
Save File
-
Dictionary
-
Get Contents of URLhttps://routinehub.co/api/v1/shortcuts/…/versions/latest
-
Get Dictionary Value
-
If
-
Text
-
Choose from Menu…
-
Choose from MenuInstall | تثبيت
-
URLhttps://routinehub.co/download/…
-
Open URLs
-
Stop This Shortcut
-
Choose from MenuLater | في وقت لاحق
-
If
-
Text
-
Text
-
Set VariablePlayername
-
Set VariablecurrentRoom
-
Number
-
Repeat
-
Get Contents of URLhttps://game-thing-565d2.firebaseio.com/rooms.json
-
Get Dictionary from Input
-
Choose from MenuActions
-
Choose from Menutravel | السفر
-
Get Dictionary Value
-
If
-
If
-
Choose from List
-
Set VariablecurrentRoom
-
Choose from Menuwho is here? | من هنا
-
Get Dictionary Value
-
Count
-
Show AlertThere is/are currently … people here:
-
Choose from Menuwhat is here | ما هو هنا
-
Get Dictionary Value
-
Count
-
Show AlertThere is currently … item(s) here:
-
Choose from Menuexamine item | فحص البند
-
Get Dictionary Value
-
Choose from List
-
Get Dictionary Value
-
Count
-
Show Alert
-
Stop This Shortcut
Посмотреть как код
Все действия этой команды, записанные на Cherri — языке программирования для приложения «Быстрые команды». Отлично подходит, чтобы разобраться, как она работает.
#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()
Оценки и отзывы
Написать отзывПока нет отзывов. Поделись мнением первым!