Hytopia is now allowing TypeScript and JavaScript developers to build games using their platform by using a Software Development Kit (SDK). Through the SDK, developers can access required tools and libraries to build game mechanics, design new worlds and manage assets. The SDK is still in its early version and, available on GitHub, and is shipped as an NPM package. Using the SDK, developers can create games directly into the Hytopia ecosystem.
From Initial Setup to Creating the First Game
Developers who choose to build a game with Hytopia SDK must first set up the local development environment and create a sample project using the following steps;
- Set up the run time environment: Hytopia SDK runs on Mac, Linux, and Windows with Bun for its JavaScript runtime. Once set up, developers can create a new directory, upgrade bun to its latest version, and then initialize the HYTOPIA project.
- Start Hytopia and Play: Before switching to development mode, developers must first load the server and make it live using the bun — watch index.ts command. Running this will create an entry point for the game, and the server will go live on https://localhost:8080. With this setup, developers can start playing their first HYTOPIA game.
Hytopia SDK offers a beginner-friendly development environment that creates an immersive gameplay environment.
Developers, once they set up the project directory using a compatible code editor, will experience a simplified server setup process. Hytopia ensures creators can immediately connect their game server and view the changes in real time.
While the SDK provides a default world to start with, developers can always design custom maps using their imagination and creative skills and add elements they like and want to express using Hytopia platform tools.
To create the core game functionality, developers need to use the startServer() function, which automatically handles server initialization, build game physics, and player connectivity, removing the need for manual configurations.
Moving on, developers can add entities, including characters, objects, vehicles, etc. which players will interact with and use in the game. The former must also ideate and add each entity’s properties and behavior. So, things like physical interaction (how each entity will work and act) when engaging with players to set their dimensions (size, volume, weight, height, etc.) must be furnished through Hytopia’s rigid body and collider systems.
In addition to these, the Hytopia platform also provides in-built debugging features, including simulation overlays. Game creators can use these to check and refine each element and gameplay mechanics accordingly.
Once the basics are set up, developers can take the game forward and create worlds in multiple ways. They can experiment with entity behaviors and also use templates and examples to build better games.
Templates are meant to help creators kickstart their game development journey using prebuilt code. Instructions are provided on how to use hytopia init with the –template flag for creating new projects on existing templates.
All the technical information about the run time environment and code scripts can be accessed from the following devlog.
Building the First Map and Multiplayer Testing for a Better Gameplay Experience
Hytopia has introduced several features and functionalities to make it easier for developers to build games. In addition to the features, Hytopia has shared documentation developers may need to get started with different development elements.
For building a map, it’s essential to visit build.hytopia.com select blocks, and use fill tools to create a basic structure of their world. To upload the map onto the server, it should be exported in JSON file format. Moreover, the build map tool has built-in functionality to check for missing textures and ensure proper asset management.
Then, there are dedicated features for multiplayer testing through ngrok.io, which lets developers create secure tunnels that lead to the local server. After creating an account on ngrok.io, developers will find relevant details on running the server and starting a tunnel.
The Hytopia game development platform offers several opportunities to budding and experienced developers to work together toward building an impressive game. There are in-built collaboration tools like a developer submitting their projects as templates onto the shared repository by completing a pull request.
The Hytopia team has also started a Discord channel for all developers to connect, ask questions, report bugs, and build games together.
About Hytopia
Hytopia is a voxel-based social gaming platform offering a modern game platform to creators and aims to bring people together. Through Hytopia, creators can build games according to the imagination while players get to explore different game mechanics, together creating a diverse community. While still in its internal alpha phase, registrations are open for the pre-beta phase, and the creator platform is also open.
Shortly, the Hytopia team will also hosting new games and run prize pools to encourage developers to adopt the SDK.