Overview
This article will go over:
- Unity: Install Unity to create and export your game for IPFS.
- Github: Upload your game onto Github for continuous deployment. This will set up Fleek.
- Fleek: Fleek gets content from Github and publishes it on IPFS. Any updates to Github will automatically republish.
- Unstoppable Domain: Purchase a human readable domain name for your IPFS game and share it with the world.
- Pinata.cloud: Pin static content such as images. Useful for meta tags.
Unity Setup
Visit Unity and install.
Open Unity Hub and create a new project.
In this example, we’ll use a prebuilt FPS game.
The prebuilt version is already functional, so we can start exporting.
File > Build Settings
Select WebGL and Switch Platform.
Build and Save your project.
These files will be the ones hosted on IPFS.
Github Setup
Create a Github account, go to your repositories and click New.
Name the repository. Initialize a README if you want
Add the exported files from Unity to the Github repository.
If you’re unfamiliar with git, simply drag and drop the files in.
Wait…
Write a message and Commit changes.
The end result should look like
Fleek Setup
Visit fleek.co and sign in with your Github account.
Add a new site.
Connect with Github.
Select your Github account.
Allow permissions to your project.
Once connected, select the project.
There is no extra configuration. Deploy site
There should be your
- Content Identifier (CID):
Qm...
- URL:
https://foo-bar-9999.on.fleek.co
Test
Unstoppable Domain Setup
Visit Unstoppable Domains and search for an awesome name.
Add to card and follow the process.
Once purchased, visit My Domains and Manage.
Click Website
Add the CID from Fleek and Save Changes
While the transaction is waiting for approval, add the Unstoppable Extension. This allows you to visit .crypto and .zil domains.
If you’ve purchased a .zil domain and don’t want to install a plugin, append .sh
to your domain name. For example, if your website is helloworld.zil, then use helloworld.zil.sh For more information, visit https://zil.sh
Once completed, visit and share your decentralized game!
Pinata <meta> Bonus!
Pinata offers an easy to use pinning service which is great for static content. Upload an image:
Then use it in your meta tags.
<meta property="og:image" content="https://gateway.pinata.cloud/ipfs/QmfTfFRZTac5onepjgqBFDfmnqKcG4dVEBgrNKGqpxLgaD" />
Conclusion
This guide is starting point for building more complex web3 games. We hope you take this idea and run with it (multiplayer, chat, crypto payments). We’re excited to see future iterations!