ChatGPT and learning

Does anyone know how reliable ChatGPT is when answering questions about common Unity code? I’ve been asking it stuff like “When to use Lists vs Arrays” and i got this answer:

"In Unity Engine, you can use both Lists and Arrays to store collections of objects. However, each has its advantages and disadvantages, so it’s important to understand when to use each one.

Arrays are generally used when you know the size of the collection beforehand and you don’t need to add or remove items dynamically. Arrays can be more efficient in terms of memory usage and performance, but they can be less flexible than Lists. If you need to frequently add or remove items from the collection, you may have to create a new array each time, which can be costly.

Lists, on the other hand, are more flexible and allow you to add and remove items dynamically at runtime. They are generally used when you don’t know the size of the collection beforehand or when you need to modify the collection frequently. Lists can be slightly less efficient in terms of memory usage and performance than arrays, but the difference is often negligible.

In summary, use arrays when you know the size of the collection beforehand and don’t need to add or remove items dynamically, and use lists when you need to add or remove items dynamically at runtime or when you don’t know the size of the collection beforehand."

And then another question concerning Time.time and Time.deltatime and this is the answer i got:

"In Unity 2D games, it is often necessary to measure elapsed time between frames to make sure that gameplay mechanics are consistent across different devices with varying hardware specifications. The Time.deltaTime variable can be used to measure the time it took to render the last frame, and it is typically used for movement calculations and other time-based calculations.

It is correct to use Time.deltaTime instead of Time.time in the following scenarios:

1. Movement calculations: If you want to move a game object at a constant speed regardless of frame rate, you can multiply the speed by Time.deltaTime . For example, if you want to move a game object at 5 units per second, you would set the movement speed to 5 * Time.deltaTime .

2. Physics calculations: When working with physics simulations, it is important to use Time.deltaTime to ensure that the physics simulations are consistent across different hardware. This is particularly important when calculating the velocity and position of rigid bodies.

3. Animations: When animating game objects, it is often necessary to synchronize the animation with the game’s frame rate. By using Time.deltaTime , you can adjust the animation’s speed to match the frame rate, ensuring that the animation runs smoothly and consistently.

In general, Time.deltaTime should be used whenever you need to measure elapsed time between frames, particularly for movement and physics calculations. However, there may be situations where you don’t need to use Time.deltaTime , such as when measuring the total time the game has been running. In those cases, Time.time would be more appropriate."

Can you actually use this information or is it just wrong?

there is no wrong in the answers !

You were using this engine for casual search ! You can ask more specified question for it to guide you.

Or may be you can do a course that details each and every feature of ChatGpt. I have come across a course on Udemy, probably ChatGPT for Programmers by Ardit Sulce. It is for Python but the methods can be used for any language.

ChatGPT may occasionally be wrong, which is why I suggest double checking with Google from time to time. ChatGPT basically checks billions of websites for it’s information, so if the website is wrong, then you’ve got wrong info. Despite this, ChatGPT is generally correct.

I use chatGPT all the time to answer simple questions regarding things like how do you set up a queue in python. I usuallly recommend it to everyone, the only thing is don’t expect 100% reliability because like KID_TEACHER says it is getting its information from other websites and doing the research for you. It doesn’t know exactly what the right answer is sometimes because of this.

Basically using ChatGPT is a great resource, just don’t let it do all your problem solving for you. All the info it provided is correct by the way.

There’s a bit of a belief that it’s accurate about 90% of the time. My experience is that it’s a little worse when dealing with Unity topics. It’s often good, but sometimes completely misses the mark.

Yeah true, usually what I do is ask for possible solutions to a unity problem, then ChatGPT will give me like 5 or so, then I can test them, or research more about what ChatGPT suggested.

One thing that we all must remember is that ChatGpt is trained till 2021.

UE has changed much since though !

Yeah this is a negative, but I usually just use ChatGPT as research, and it seems to work out, and besides when you are givin the general idea of what you need to do I find that to be enough

Agreed!