Introducing Dragonfly Cloud! Learn More

Question: What Game Engine Was Used to Create Hollow Knight?

Answer

Hollow Knight, the critically acclaimed indie game developed by Team Cherry, was built using the Unity game engine. Unity is a flexible and powerful cross-platform game development engine that allows developers to create 2D, 3D, AR, VR, and mobile games.

Unity's versatility was key for the small team at Team Cherry, providing them with a comprehensive set of tools to develop Hollow Knight's intricate, hand-drawn art style and complex gameplay mechanics. The engine supports both C# and JavaScript for scripting, although C# is more commonly used due to its performance advantages and extensive community support.

Below is an example of how you might script a simple player movement in Unity using C#. This is just a basic illustration and not necessarily reflective of how Hollow Knight's more sophisticated movement system is programmed:

using UnityEngine; public class PlayerMovement : MonoBehaviour { public float speed = 5f; // Update is called once per frame void Update() { // Get input from the player float horizontal = Input.GetAxis("Horizontal"); float vertical = Input.GetAxis("Vertical"); // Move the player Vector3 movement = new Vector3(horizontal, vertical, 0f).normalized; transform.position += movement * speed * Time.deltaTime; } }

This code snippet is attached to a player character and uses Unity's Input.GetAxis method to get horizontal and vertical input from the keyboard or controller. It then applies this input to move the player character in the scene.

While "Hollow Knight" doesn't provide its source code, understanding Unity and C# can give you insights into what game development with these tools can look like. Developers interested in creating games like "Hollow Knight" should start by learning Unity’s interface, mastering C#, and studying game design principles, particularly those relating to platformers and Metroidvania-style games.

Was this content helpful?

White Paper

Free System Design on AWS E-Book

Download this early release of O'Reilly's latest cloud infrastructure e-book: System Design on AWS.

Free System Design on AWS E-Book

Start building today 

Dragonfly is fully compatible with the Redis ecosystem and requires no code changes to implement.