Skip to content
This repository has been archived by the owner on Jan 5, 2024. It is now read-only.

first stab at unreal #1108

Merged
merged 2 commits into from
Dec 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions docs/onboarding/22 Gaming/0 Overview.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
slug: /gaming
title: Overview
hide_title: true
---

import QuickstartCard from "@components/QuickstartCard";

# Overview

thirdweb has tools that let you easily build web3 games for any platform - Browser, Native Desktop, Mobile, Console, and VR.

![thirdweb](./assets/preview.png)

## Features

- **Seamless onboarding**: Allow users to login with their wallets, email, social logins, usernames, passkeys, or build completely invisible login experiences.
- **Cross-platform support**. Build games on Unity, WebGL, or Unreal Engine.
- **Account abstraction support**. Easily integrate ERC-4337 compatible smart accounts into your games, enabling seamless user experiences and interoperability
- **Support for any EVM network.** thirdweb’s tools with any EVM-compatible network, allowing you to build games on the latest L2 chains
- **Customizable**. Our products let you control all aspects of the user experience. For example, you can our tools to bring your own authentication system and spin up in-game embedded wallets for users.
- **All-inclusive**. Our solutions come with prefabs, RPCs, Account abstraction infra (bundler and paymaster), fiat ramps, and storage out of the box. You get everything you need to build great games

### Full reference

<div className="row" style={{ marginBottom: 12 }}>
<div className="col col--3" style={{ padding: 8 }}>
<QuickstartCard
name="Unity"
link="/unity"
image="/assets/languages/unity.webp"
/>
</div>
<div className="col col--3" style={{ padding: 8 }}>
<QuickstartCard
name="Unreal Engine"
link="/gaming/unreal-engine"
image="/assets/languages/unreal.jpg"
/>
</div>
</div>

48 changes: 48 additions & 0 deletions docs/onboarding/22 Gaming/1 Unreal Engine.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
slug: /gaming/unreal-engine
title: Unreal Engine
hide_title: true
---

# Get Started

Learn how to set a production style setup for your Unreal Engine game.

In this guide, we’ll use a template to deploy a client/server compatible with Engine, and a template game.

![Unreal Engine](./assets/unreal-architecture.png)

## Set up Engine

This example makes use of thirdweb Engine, a backend HTTP server that calls smart contracts using your managed backend wallets.

You’ll need an instance running for your server to interact with the blockchain. [Learn how to set up your own Engine instance](/engine).

## Set up website and backend

We’ll need a website for users to sign up and link their wallets, and a backend to handle wallet authentication, user registration and interaction with engine.

Here’s a step by step guide to deploy your client/server:

To deploy a client/server:

1. Clone https://github.com/thirdweb-example/engine-express/
2. Install client dependencies `cd client` and `yarn`
3. Install server dependencies `cd server` and `yarn`
4. Navigate to the root folder and run `yarn`
5. Replace the `.env.example` in the client/server folder with your own [api key](http://thirdweb.com/create-api-key) values and engine url. Ensure your api key can be used to authenticate with your deployed engine
6. We’ll be claiming ERC20’s from Unreal in this demo. Navigate to the [engineController.ts](https://github.com/thirdweb-example/engine-express/blob/main/server/src/controllers/engineController.ts) file, and set your backend engine wallet as well as your [Token Drop](https://thirdweb.com/thirdweb.eth/DropERC20) contract details - make sure you have claim conditions set up for your drop
7. You can now run the client and server in two terminals using `yarn client` and `yarn server`
8. By default, the client runs on [localhost:3000](http://localhost:3000) and the server on [localhost:8000](http://localhost:8000)
9. Go ahead and create a user on your website, and link a wallet
10. You are now ready to head into Unreal!

## Set up Unreal Engine

To simplify this part, we created a template for you with a simple script to interact with your server as per the architecture illustrated above. A level blueprint instantiates the UI, which has its own blueprint to interact with your server.

Clone https://github.com/thirdweb-example/unreal_demo and navigate to `_Thirdweb/Scenes/Scene_Game` to start the level.

You will be able to log in and see the output as the game polls and updates your balance whenever you collect an item while driving.

All thirdweb related assets are under the `_Thirdweb` folder in your Content Browser.
5 changes: 5 additions & 0 deletions docs/onboarding/22 Gaming/2 Unity.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
slug: /unity
title: Unity
hide_title: true
---
Binary file added docs/onboarding/22 Gaming/assets/preview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions sidebars/onboarding.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,11 @@ const sidebars = {
label: "Signature Minting",
href: "/signature-minting",
},
{
type: "link",
label: "Gaming",
href: "/gaming",
},
{
type: "link",
label: "RPC Edge",
Expand Down Expand Up @@ -250,6 +255,13 @@ const sidebars = {
},
],

gaming: [
{
type: "autogenerated",
dirName: "22 Gaming",
},
],

smartWallet: [
{
type: "autogenerated",
Expand Down
1 change: 1 addition & 0 deletions src/theme/DocSidebarItem/Link/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ export const iconMapping = {
Engine: "/assets/product/sdk.png",
"Bundler & Paymaster": "/assets/wallets/smart-wallet.svg",
"RPC Edge": "/assets/product/sdk.png",
Gaming: "/assets/product/sdk.png",
};

export default function DocSidebarItemLink({
Expand Down
2 changes: 1 addition & 1 deletion src/theme/DocSidebarItems/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ function DocSidebarItems({ items, ...props }) {
},
{
title: "Solutions",
items: ["Signature Minting"],
items: ["Signature Minting", "Gaming"],
},
{
title: "Resources",
Expand Down
Binary file added static/assets/languages/unreal.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.