r/GraphicsProgramming • u/Proud_Instruction789 • 1h ago
Question Learning graphic api using Ai?
Hey all. I made a 2d game engine using opengl and using learnopengl awhile back and plan taking it a bit further and try to do 3d stuff. I found some resources and tutorials about vulkan and a little bit of metal but barely directx 12, I found chatgpt and was wondering if its a good idea to give claude or chatgpt the sources that I found, have ai simply it for me so I can understand and then write everything myself. Ai could code everything for me but I rather just do everything myself so I get the experience of being a programmer. What do you guys think?
5
u/Maui-The-Magificent 1h ago
So i am going to post some unsolicited advice. The following is a part from a learning aid I wrote for some class-mates about 3 years ago. I think it might help even if it is answering a different question than your post.
Learn to Use AI (The Double-Edged Sword)
I am going to be very honest with you: using AI is incredibly useful. It is so useful, in fact, that if you don't control yourself, you will end up not learning much at all. Despite the risk of being misused, it is very important that you learn to use it. Most of a programmer's job is to find information; experience in using AI to find that information is quickly becoming an important skill to have as a programmer. Soon it might even become a mandatory skill.
So, heed my words! If you take any advice at all away from reading all this, I pray it is this one. Don't use AI to look for solutions; use it as a tutor. Remember these questions:
How?
Why?
When?
Is it like […]?
They should generally be asked in this order as well. Let us go through them so that you can understand how to use AI responsibly.
The Four-Question Framework
You have a problem or an idea of something you want to do; what it is isn't important. You open up Claude, ChatGPT, or any other AI of your choice. You might feel stressed because you are short on time but understand that following these steps is important for you to not only do a good job but to learn how to do it in the future.
You put your fingers to the keyboard and ask:
"I have an idea/problem…"
Explain your particular situation and what you want to do in as much detail as you can. Try to use your own words as much as possible to describe what you want done. This helps you understand how to ask questions to an AI and makes you more familiar with all the new words and terminology you will be exposed to.
You then end your explanation by asking how:
How?
"How would I do that?" "How does this work?" "How will this turn out?"
A few moments later, the AI will give you an answer. You should read it carefully. If you don't understand how something works or should be done, ask another how question. If you still find it difficult, ask it to explain it to you in another way, maybe in relation to something else you are already familiar with. When you feel that you are starting to understand a little of what the AI is trying to do, you then ask why.
Why?
"Why would I do it that way?" "Why shouldn't I do it this way?" "Why must I do that?"
Asking why will give you an understanding of the rationale for what the AI is proposing. It will also help you build up an intuition about code structure of your own. AI will often give you bad solutions to problems. It will often give you code that either doesn't work or that won't work further down the line. It is therefore important to understand the motivation behind what the AI is suggesting. Remember, you can ask as many why questions as you want.
When you are satisfied with the answers you have gotten thus far, it wouldn't be strange if you felt you could stop there, but the next two steps are equally important. We often want to hurry and get things done, but if you think back to what I said in the beginning, programming is hard. If you want that feeling of everything about programming being absolute gibberish to go away, you need to persevere, so what do you do? You ask when:
When?
"When would I use that loop?" "When would I use that method?" "When shouldn't I use this?"
By now, you know what you can do and why you should do it; you also need to know when it should be done. This step is sometimes not as obvious as it might seem. It might not be clear to you when a solution should be implemented or what it depends on to function. There are often situations where one solution is better than another; asking when to use something will help you understand it in the context of actually using it. This knowledge, as it grows, also helps you to intuitively understand what steps you need to take to realize your ideas. You can't build a project without knowing what to do or where to start, right? Now that you feel like you understand how something is done, why one would do it that way, and when to do it, it's time to confirm our understanding. We end this journey with, So it's like…
So, it's like…?
"So, it's like working as a postman?" "So, it's similar to how a bank stores my money?" "So, it's like a combination of a number and a string?"
These questions look different each time; the point is to put what you've learned into something that is similar to something you already understand. You would be surprised how often you can compare some abstract concept in programming to something mundane in everyday life. Asking these questions not only affirms your understanding but also allows the AI to potentially fill any gaps in your comparison.
1
u/Proud_Instruction789 1h ago
Thats alot! But I just thought if Ai was a good choice to use to study with to get from point a to point b. I dont want it to code everything including messy code and no optimization
2
u/Maui-The-Magificent 55m ago
I understand, which is why i think the path is worth following. In my humble opinion, I would say it will make you able to create better software.
Ironically, the more you know and understand about what you want to build, the less you need to type manually. But getting that understanding is very difficult to teach, very easy to learn by experience. Does that make sense?
1
u/Proud_Instruction789 43m ago
Most def, I just didn't like the idea of me using ai to cheat my way through something. If folks are ok with giving study resources to ai and then simply it for them to better understand something, then cool. But I like your approach on this matter though, even though I actually gave chatgpt some of my responses and it did an ok job with what I was trying to say
2
u/S48GS 1h ago
... 3d rendering engine as tool for humans - already exist - Unity/Godot - go use those
without AI - you need 10 years to make copy of today Godot4 engine
with AI - you get something to "make screenshot" and never ever touch again - glued from billion parts piece of unmaintainable code
Ai could code everything for me but I rather just do everything myself so I get the experience of being a programmer. What do you guys think?
realistically - you wont finish 10 years project
make small projects that you can finish in few days - week max
1
u/Proud_Instruction789 1h ago
I could make a Godot clone or even a unity 3d clone, but that will take 10-20 years max. Besides I rather just code in everything including loading models and just programming game logic
•
u/AutoModerator 1h ago
Recently updated rules. Please check that your post is in compliance with Rules 1, 4, 5, and 6 on the sidebar. TL;DR:
No showcases.
Disclose AI usage in post or project.
Present a topic to talk about, e.g. how something works.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.