Skip to content

SkyPeers was developed for the ENCODE and the Built to Explore hackathon.

License

Notifications You must be signed in to change notification settings

mikopeck/SkyGameSDK

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 

Repository files navigation

SkyGameSDK

developed for the ENCODE and the Built to Explore hackathons.

With SkyGameSDK, you can easily add tons of features to Unity WebGL games; multiplayer, screenshots, leaderboards, achievements, etc,,,

Inner workings

The cross-communication between the browser and Unity works through the PluginJS.jslib file in Unity's Assets/Plugins/WebGL file and the SendMessage() function in the game instance.

DACs will currently only be implemented to send entries to the leaderboard. Will use it for a lobby system/screenshot feed/etc in the future once those added features come.

Planned features similar to the roadmap

Screenshots will be implemented by using the passthrough using the Plugin.jslib, which will get the data for the screenshot and then get uploaded to Skynet.

Leaderboards will work through publishing a feed to a DAC, although there will be obvious problems with trusting that leaderboard as there's no way to verify how legitimate it is.

Realtime multiplayer will work through WebRTC, but since I can't add a decentralized TURN/STUN server I don't know how to make it acccessible to everyone, might work with websockets if those get added to Skynet.

A friendlist could be added with MySky, adding all friends to a path and then looping through them to see if they've done the same.

Lobbies could be built with DAC feeds once those are added, but might be hacky with unresponsive clients.

Chess can be built from the demo below right now, just needs to pass either moves or full states of the game and add a chess engine to the project and it should basically be it.

Setup

Download this file, unzip it, install WebGL for Unity, switch platform to WebGL, press "Build and Run" in Unity, swap out the generated .html file to the one provided in the project. Comments should hopefully be sufficient, and if not, I can guide you through discord (stelballe#2785).

License

This is covered by the MIT license. Feel free to use it almost however you like ;)

Demos

Community projects

  • If you want to be seen here, just push an edit with your project linked =) Ideas? Tic-tac-toe, rock-paper-scissors, anything luck-based using this, etc...

Potential additions // TODO(partly)

  • HTML cleanup
  • Integrate to webapp(right now having CORS issues, as I had been loading it as an <iframe>) develop branch
  • Real-time connections(might require websockets, as not everyone can connect with P2P without TURN/STUN servers)
  • MySky for communication instead of SkyDB
  • Screenshots (possible in Unity, and can then communicate to the browser with the WebGLPluginJS library)
  • Lobbies(done via mysky, host whitelists friends, friends posts publickey to skydb,,,)
  • Working chess example (should be here 27th-30th april, and then receive updates)
  • Extrapolation parameters in networking to simulate sync? (inclusion of time on send)
  • Make it work as a .js import to .html & .ts
  • Roadmap
  • .hns domain for Chess & Color-sharing demo

About

SkyPeers was developed for the ENCODE and the Built to Explore hackathon.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 69.8%
  • CSS 17.5%
  • JavaScript 12.7%