Hi,
I don’t know about you, but I developed 3d games since years, usually not finishing stuff. I learned the unity basics some years ago but I have to say since GPT is around, boy my output skyrocketed!
I’m surprised how good some of the tips are, and also if you just want to do something specific without googling alot, you get your answer in no time.
GPT is a gamechanger for devs in general but for game development its even more usefull since I don’t have to look up most stuff anymore and can instruct GPT to build me specific code snippets!
What a time to be alive!
(I’m a almost senior dev with around 7-8 years of general programming experience)
oh thanks ill try it out, man solo / or small team game dev is going to be on the next level. I think this will contribute to alot more creative games coming out
Just want to mention that chatgpt and other AI dont just make the answers out of thin air, they just summarize the search result in more humane way.
If you asked a question that no one have ever answered (on internet), I’m sure the AI will just output some generic useless response
I have to disagree, I indeed had some problems where I was going from chatgpt to googling hours, then I got back to chatgpt and described my problem as detailed as possible, and voilà I had something to work with. It wasnt a perfect solution as I still had to remove some errors but it was the right hint.
But as you said, its like googling but on 50x the speed (depending on the issue)
I dont know about GPT 3.5, but with 4 the code is pretty good (but never perfect), but its a fast start if you wont to implement something
Also gpt 4 can use bing to find you a result, but most of the time GPT is indeed able to form answers to problems that are not on the internet. I used it together with unity for the last two weeks non stop 8-10 hours a day and its the best thing ever if you know what questions to ask
my experience of chatgpt helping with unity was lacking… in fact, very lacking, but as @bart_the_13th said if you ask a question everyone and their dogs asked, sure you’ll probably get a good answer, if you ask something way more obscure or unique in that its an odd case usage, then you wont… but I didnt think asking it for the code to take x objects, to take the 2 furthest apart pieces and place all the others in a straight line equally spaced out. Wasnt that hard.
what gpt did you use? 3.5 or 4? I’m not here to argue about anything or to be right in something, I just want to share that it skyrocketed my performance. I use 4. And e.g. I wanted to add an inspector image and added “just give me code”. The code was exactly what I was looking for. That is what you are saying, I could have googled and visited 3-4 pages and get the same result but. You can ask followup question. E.g. “the image seems to small” and it will adjust the code.
Another thing which is kindof more advanced. I had created a procedural recoil pattern I did use before in an old project, but this time I used cinemachine and my camera setup was different. I had no idea why it didnt work with cinemachine. So I asked gpt: “Hey I have this code in unity: XYZ and I’m using cinemachine but if I use it mouse input doesnt work anymore and only the recoil is applied to the camera”. So it gave me a script for recoil control just like I wanted using cinemachine (which was an completely different approach). Ofc this script didnt work like I wanted it to be, so I gave it 3 more tries and one part of code did work somehow good. So I used it and adjusted it myself so it would work as intended.
If you already programmed 30 games or you do it in your job daily, it wont be of much use. But I’m a frontend developer with quit alot of programming experience but limited experience when it comes to unity.
For me GPT helped me code/build something in a week which would have taken me a month if I had to use google. Just saying try GPT 4 and if it doesnt work at first maybe try to improve your questioning. I noticed the answers you get from GPT are only as good as your questions are.
But I agree some edge case problems may not be on the internet, therefore GPT guesses by “logical thinking” how to combine things he knows with the question I asked.
I love it, but if you dont and find google better I’m not here to tell you otherwise
People say GPT is just based on the internet which on one hand is true, but on the other hand GPT is able to combine the knowledge just like a human brain does but faster. Wont be good every time but most of the time its very good. At least the way I use it.
Also if you want to do refactoring of code this is really helpful, GPTs ability to refactor code is, I would say 90% correct.
I can just encourage you to play around with it and learn how you can use it to YOUR benefit. Its just like with programmers ability to google. Its learned and you learn what to google and where to look. The same goes for GPT, it wont be good on first try, you have to get warm with it and learn its limits and possibilities.
ChatGPT 4.0 is, from my experience, good at two things: 1. Producing boilerplate I don’t want to write and 2. adding comments to a piece of code to make it more understandable. BUT, that is assuming the code is a bit understandable to begin with: for example, I had an old spaghetti-fest badly written script and the comments it added also made no sense.
I also used it to convert an editor UI script to UIToolkit and it sort of worked, but it ate one of the 2 things the script did and I needed to add it. It was probably a bit faster than doing it from scratch, but like… 10 percent?
3.5 gets things wrong so often, it is completely useless.
When I teach coding skills, I say “Strategy in comments, tactics in code.” You explain the goal or purpose of code in human language, and you use code to execute the mission. The best comments don’t explain the code in terms of how variable assignment works or even use implementation words like array, they explain the reason or thing you’re trying to accomplish with a stanza of lines.
// Find the closest applicable enemy.
float min = float.PositiveInfinity;
Enemy target;
Collider[] candidates = Physics.Overlap(...);
foreach (Collider collider in candidates)
{
if (...)
{
...
If you can analyze that sort of loop into something as succinct as “find the closest applicable enemy” using GPT, instead of a transliterated mess like “Start with a value of infinity. Collect an array of colliders which overlap…” then I would agree with your premise.
I mean, I don’t want to defend ChatGPT, but sometimes I’ve had an old uncommented script and plopping it into ChatGPT to add comments did refresh my memory of what it was doing somewhat faster than just looking at it.
I didn’t keep the comments afterwards. And the overall usefulness I got wasn’t enough to keep paying the subscription for 4.0 (I paid for one month out of curiosity).
Assuming there is more context in the script, comments fall somewhere in between. And again I’m assuming somewhat clear code and maybe good variable names.
Also I don’t think it goes to “transliterated mess” when it fails, it is just writes wrong nonsense.
Wait, okay I don’t want people to think GPT can replace writing own code, for me it just helps me to replace using google and it gives me new ideas on how I can solve a problem. I find it fascinating at what it is able to do in the perspective of an AI, not saying its nearly as good as a human at writing good code. I feel like alot of programmers try to talk down on it because it could make programming more accessible for everyone.
But maybe we have different experiences, I have colleges that say the same, but for me its a useful tool. For me its just fascinating what it can do.
From the code i have in my project, maybe 5-10% is with the help of GPT but still it saved me alot of time googling around and ending up nowhere. Most of the code i have from GPT is small stuff.
I understand that people are sometimes frustrated with the code it produces, and I agree, sometimes the code is complete sh**. But I use GPT alot and I find it a helpful tool and a one up to google. I understand what you guys are saying, its not good at producing complex or large amounts of code. At least most of the time. Sometimes its even bad at writing simple code. But thats not the usecase I need it for.