Age of Rust Dev Update #15

SpacePirate Games
4 min readMar 10, 2023

--

Using AI to fill in the team gaps

Greetings, fellow Rust-ians(?)! As I continue to develop my latest project, Age of Rust, I’m excited to share some updates on the progress I’ve made. One of the most significant advancements in game development technology in recent years has been the use of Artificial Intelligence (AI), and I’m proud to incorporate this innovative tool in various aspects of Age of Rust’s production. I’ve employed AI for character creation, enabling me to create unique and personalized characters that fit seamlessly into the game’s world. Additionally, AI has been instrumental in creating artwork and voice-overs, providing a high level of detail and quality to these elements. I’ve also integrated small sections of AI into my coding, enabling me to streamline the development process and create a more immersive and engaging gameplay experience.

So, for example, I’ve been able to model some things into a conversation with ChatGPT, it understands things about Age of Rust. It knows the plot, characters, missions for players, it knows about a weapons, places… things that define the world of Age of Rust. So as an example for this post, I told it, “create a couple of short sentences based on a character on Kanbar”. I created a some dialogue, which I fed into Sonantic for a quick and hasty AI voice audio:

As a solo indie game developer, the use of AI in game development has been a game-changer. It’s like having other team members who have very specific talents and can add value quickly at a low cost. With AI, I can focus on developing other aspects of the game while the AI contributes to areas that require a specialized talent on command. The use of AI also helps me to optimize my workflow and be more efficient, which is essential when working independently. It’s incredible to see how AI can contribute to different areas of game development, from character creation to voice-overs, and beyond. Overall, AI has become an invaluable tool for solo developers like me, enabling us to create high-quality games when you don’t have access to a large team of specialized people.

Wharf in NX City

I recently encountered a complex Unity problem that I couldn’t solve, despite asking for help on various forums. That’s when I had an idea: what if I tried using AI to help me? I turned to ChatGPT, my go-to source of knowledge, and explained my issue. To my surprise, ChatGPT was able to help me solve the problem in a matter of minutes!

Yes, ChatGPT can understand Unity C#.

Specifically, ChatGPT wrote some code to roughly determine the position of the artificial Sun Disc that Unity generates when you select “Affect Physically Based Sky” in a volume setting. This was an incredibly helpful solution, and I couldn’t believe that I had overlooked such a simple fix. It’s amazing to think about the endless possibilities that AI can offer, even in the context of game development. To be fair, it did get a couple of things incorrect, but it completely understood Altitude and Azimuth with respect to the Unity world and understood how to wrap and angle.

Here’s the code that AI assisted me with:

public class PlaceObjectOnSun : MonoBehaviour

{
public Transform sun; // The object representing the simulated sun
public float horizonDistance = 5000f; // Distance from the center of the world to the horizon
public float zenithHeight = 5000f; // Height of the zenith above the center of the world
public float azimuthDegrees; // Azimuth angle in degrees
public float altitudeDegrees; // Altitude angle in degrees
public Vector3 centerOfWorld = Vector3.zero; // Center of the world

private void Start()
{
azimuthDegrees = ((WrapAngle(transform.localEulerAngles.y) + 90f)) * -1.0f;
altitudeDegrees = ((WrapAngle(transform.localEulerAngles.x) - 90f)) * -1.0f;
calcSunPostion();
}


void calcSunPostion()
{
// Convert the Altitude and Azimuth angles to radians
float altitudeRad = altitudeDegrees * Mathf.Deg2Rad;
float azimuthRad = azimuthDegrees * Mathf.Deg2Rad;

// Calculate the position of the sun in the sky
float x = horizonDistance * Mathf.Sin(altitudeRad) * Mathf.Cos(azimuthRad);
float y = zenithHeight * Mathf.Cos(altitudeRad);
float z = horizonDistance * Mathf.Sin(altitudeRad) * Mathf.Sin(azimuthRad);

// Place the sun in the sky
sun.position = centerOfWorld + new Vector3(x, y, z);
}

private float WrapAngle(float angle)
{
angle %= 360;
if (angle > 180)
return angle - 360;

return angle;
}

}

You can quickly see how these concepts can then be tied together, if ChatGPT can understand the worldbuilding of Age of Rust, suggest character dialogue, and write code in Unity… can it help write a midjourney prompt to create a character portrait?

AI has played a crucial role in the development of Age of Rust, from character design to voice generation and coding. Tools like ChatGPT, Sonantic, and MidJourney have enabled me to create a highly immersive game that offers an unparalleled level of detail and complexity. As the field of AI continues to evolve, I’m excited to explore new ways to incorporate this technology into my work and to see how it can revolutionize the future of game development. Later this year, I can’t wait to share the finished product with all of you. Thank you for following along with me on this journey, and stay tuned for more updates on Age of Rust!

--

--