Sup folks! I hope everyone is doing well. I have decided to start a series of videos to explore how good of a game chatGPT can create with Unity. In this present time, I will be doing all the physical tasks such as attaching scripts or placing objects on the map, while all the script writing will be done by chatGPT.
To begin, I’m going to ask for two C# scripts: one for WASD movement and one for a top-down following camera. Once we have the scripts, we will move them over to Unity. Surprisingly, chatGPT not only wrote the code for me but also provided basic instructions.
Now, let’s create a script and name it according to the class that chatGPT has pulled. While that processes, I want to mention that I will be using City Graphics for the game. They are affordable and provide nice-looking graphics for indie developers.
We have successfully implemented movement, thanks to chatGPT. However, we still need to add rotation. It looks a bit silly when the player doesn’t rotate towards the direction they are facing. Let’s get chatGPT to edit our movement script to include rotation.
Next, we’ll make some adjustments to the camera to align it better with the player. We’ll open up the player game object, drag the game object from the hierarchy into the character model, and voila! We now have character rotation.
Moving on, let’s get chatGPT to edit the script once more to include a running animation while moving and an idle animation while not moving. For now, we’ll use some generic animations, but we can change them in the future.
After the script has processed, we’ll create a folder for our animators and an animator controller for our player. We’ll set the entry state as the idle animation and assign the animator controller to the player game object. Then, we’ll create a running animation and add it to the animator controller.
To make the animation transition smoothly, we’ll create a transition from any state to swap from running to idle when the player stops moving.
And there you have it! We now have a basic top-down action game created with Unity and chatGPT. Thank you for watching part one of this series. Don’t forget to like and follow to stay updated on part two. Have a terrific day!