Initial Setup
Last updated
Last updated
Before we begin building our first game, we need to setup our local developer environment and a sample project. Follow these steps.
We strongly recommend you join our developer Discord server! Our developer server is a great place to showcase your work, chat with other developers, quickly get technical questions answered, and much more.
You can join our developer Discord server here:
HYTOPIA uses as its JavaScript runtime.
Open your terminal and run:
You should see a log confirming successful initialization. If you received an error on the bunx
step to initialize the project, you likely need to upgrade your bun installation, run bun upgrade
in your terminal.
Start your HYTOPIA game server with:
This runs index.ts
, the entry point of your game. Your server is now live at https://localhost:8080
.
When prompted for a server URL, enter https://localhost:8080
.
Explore and enjoy your first HYTOPIA game!
Go to
You can quickly resolve this by visiting in a new tab. You'll likely be prompted with a warning saying this website is insecure (Due to the self-signed certificate for local development). Click "Advanced" or "Continue to website" depending on the browser - this will cause your browser to allow connections to your local server. The page should load with just "OK" text shown.
Now, return to - you should now be able to connect without issues.
Brave Browser: If you have tried visiting https://localhost:8080 in a new tab, it loads, but you still can't connect through , if you're using a browser like Brave, or any browser with a built-in firewall, you can try disabling it for - this in most all cases will resolve connectivity with localhost on Brave and similar browsers.
Create Your First Game
Learn how to use the HYTOPIA SDK to build a simple game!