The goal of this project is to enhance Rocket.Chat apps.engine’s abilities to make RocketChat support chat-based games.
Here is the final submission report: https://github.com/WideChat/Rocket.Chat.Android/wiki/Rocket.Chat-FRVR-Games-Google-Summer-of-Code-Project-2019-Submission
Here is the working branch: https://github.com/RocketChat/Rocket.Chat.Apps-engine/tree/alpha
2 Likes
Can you attach a video or screenshots so we can better understand what’s happening here?
Yeah, sure @aaron.ogle . So there are 5 main parts of my project:
Firstly, I extended the current Rocket.Chat Apps.engine by adding externalComponent which can render the HTML5 games in a modal or contextual bar as the video shown below:
Secondly and thirdly, I implemented the AppEmbeddedSDK and Webhooks for the externalComponent so that the game could call the APIs to get the users’ context and the room’s info easily and the developers of the game can also receive the notifications when the game starts or ends.
And for the next, some efforts have been made into the invitation part to make sure the players could be in a separate private group when playing the games. You can check the video bellow for the detail:
The last part I’ve finished is the storage APIs for the externalComponent. Currently, I have implemented the following persistence APIs to make sure the externalComponent can access our apps_persistence collection easily.
setItem(key: string, value: any) // add new item to the app's persistence
getItem(key: string) // get the item's value by key
removeItem(key: string) // remove the item by key
clear() // clear the app's persistence
getAll(): Array<IItem> () // get all items of in this app's persistence
The above picture can show that how the storage APIs work.
@aaron.ogle Please let me know if you have any questions or the points you are interested in, I am so glad to introduce the details of my project to you!
This looks very cool! So I see the inviting action, I see the game action and I see the different calls. But do all 3 work together? Can you actually invite someone and play a game with them?
Yeah, they can work together. Our goal is to create a “Rocket.Chat Games Foundation” to support FRVR games. Now the work in the Rocket.Chat side is almost finished. And FRVR team is working on porting the first game to Rocket.Chat.