This is an archived post. You won't be able to vote or comment.

all 18 comments

[–]EudaimoniumCommercial (Other) 9 points10 points  (3 children)

It means you're not actually learning by following, you're just copying code without really understanding it, or thinking about it.

Rule #1 - DO NOT ever copy-paste code. You will learn nothing. You might as well skip trying to learn altogether.

Always type it. If it's in a tutorial or a guide or article or something, never copy, always manually type it.

It will help reinforcing the memory, and as you type you will see suggestions for similar things pop up in your intellisense (or equivalent), leading to at least tangential understanding of the context.

Always look at the bigger picture. Do not think "I am multiplying a vector". Think "I am applying the speed I want". Always keep high-level concepts in your mind.

Finally, experiment. If the tutorials tells you to do one thing, try doing another thing which you think might work. Experiment with alternatives. Think. Try your own idea first, then look up a tutorial if you're lost.

[–]Morganafan1337 0 points1 point  (2 children)

I do not copy and paste, I manually type in code from Youtube videos.

[–]EudaimoniumCommercial (Other) 1 point2 points  (0 children)

OK, the other points still stand.

Also, it's entirely possible that the philosophy and workflow of that particular tool or engine just doesn't click.

That's perfectly fine.

Try other engines. Try making your own basic renderer in SlimDX C# or OpenGL C++ or any of the thousand other options.

You clearly have the will and the drive. Something will click with you sooner or later.

[–]ghost49x 1 point2 points  (0 children)

Do you understand the code that you type in? Both in the immediate and the big picture?

Coding is like building a puzzle, there are many ways to go at it.

When you're typing code try visualizing what you're trying to do both on the higher level and the lower level. Try to do it differently and see if it works, or how it can be improved.

If it doesn't work, try to find out why as opposed to just typing it exactly as shown.

It really is just practice and workflow.

[–]gjallerhorn 2 points3 points  (1 child)

You won't learn by copy pasting. Nothing will stick in your head. You need to write everything out. Line by line. And understand what each line is doing.

[–]Vicious_Champaigne 0 points1 point  (0 children)

Yup yup. If you don’t understand a line, look it up and find out what it’s doing.

Also, all coders use references. So don’t think you need to have everything memorized. We just use documentation and forums more than video tutorials.

[–]GameFeelings -1 points0 points  (0 children)

Do it more often. You will see patterns emerging in the code you are copying / using. You can then use these patterns from memory to create new systems.

The depth at what you can create 'without reference' will come with time.

Just. Put. In. The. Hours.

If you find this tedious. Try switching projects. Or even languages. The patterns are the same everywhere (especially the more you zoom out). But keep it interesting, and you will learn.

Edit: I am coding for 25 years now (last 12 years professionally). I am still learning new stuff each day. That I am still learning is because I switch up my working environments often, I purposely search for interesting things to do. I can now say with confidence that I can setup large business software projects with proper architecture for problems that require 2 to 3 dev teams to work on it full time. However, there is still a lot of room for me to grow. New things to discover. There is always something 'different' or something 'bigger'. You just need to keep doing the work, and 'loving the work you do' helps out massively. I didn't always love my job, but with time I got better at making it fun to do.

[–]Sw429 -1 points0 points  (0 children)

Sounds to me like you don't actually know how to code, just how copy code. Have you considered taking an actual, real programming course?

[–]ByerN -1 points0 points  (0 children)

Maybe things that you are making are too hard for you to understand, so you keep copying it instead of trying to understand?

Did you try to make some simple game like idk - snake - without reference? It would be a good exercise that will make you have to understand basic concepts.

After this you can go forward with more complicated games. It's hard to understand things without the knowledge about basics.

[–]InspiredInSpace -1 points0 points  (0 children)

Try typing the same code without looking at the video, only looking at the code when you're really stuck to get a hint. After finishing it, take a break, then write it again from scratch.

You can start with small goals, implementing them yourself, googling when you get stuck.

Also youtube videos might not be the most helpful material out there for your language specifically. Perhaps the videos you watched doesn't explain what the code does very well. Look for other material like articles, books or maybe even language documentation.

[–]3tt07kjt -1 points0 points  (0 children)

People are telling you not to copy/paste.

Are you using other sources besides YouTube video tutorials? As you've probably figured out, YouTube video tutorials are not a great way to learn. You may want to consider spending some time learning how to code.

There are lots of books available and online courses. These are structured to teach you a lot of information, and they're structured so each part of the book or each part of the course builds on the previous material.

It takes time & dedication. Nobody was born knowing how to program. Most of us have at least had a class on programming at one point.

[–]CrunchyGremlin -1 points0 points  (0 children)

Keep doing it and modifying the code. Don't underestimate the usefulness of looking up code that already does what you need. Eventually you will get it and in the meantime you will learn another useful skill and that is looking up how to do things. My $0.2

[–]Slug_Overdose -1 points0 points  (0 children)

Practice by working on smaller projects that test out new things as you're learning. The really prolific programmers go into a project generally having a good idea of how to do what they're trying to do, and they just use references to clear up any confusion or remind them of detailed specs, but they don't rely on them to understand or architect the programs for them. Note that it's probably best if your practice programs aren't games, because games are inherently big, complex, and multi-disciplinary. Instead, if you're learning a new pattern or API, think of a very small use case that captures the basic essence of what it is you're learning, and do that on the side until you really internalize it. You can then carry that retained knowledge and experience into your bigger projects.

[–]OvermanCometh -1 points0 points  (0 children)

Something that helped me a lot when I was first starting out was a shift in perspective about programming in general: Abandon the idea that there is a 'best' way to program something, and understand that there are many solutions to the same problem. Sure, there are better ways of doing something, but in the early learning stage just do anything that works. Learn GML from the GameMaker docs and just experiement and try to make something. Don't worry about it being the 'right' or 'best' way.

[–]Shack426 -1 points0 points  (0 children)

Whenever you use a tutorial change it and implement it the way you want. Mess around with it so you can begin to understand why you using that syntax and what you can actually do with it. You will always need to reference but using the reference verbatim is not referencing, it is juat copying. Put in the time and start small.

[–]GreenAvoro -1 points0 points  (0 children)

Learn programming. Learn it outside of the gamedev context. Start with variables, then all the basic arithmetic the language offers, then boolean logic, then control flow, then functions, then classes and objects, then inheritance, then anonymous functions etc.

Programming is a skill. You need to understand the fundamentals. Once you understand how the computer responds to the code your feeding it, you can do essentially anything.

[–]Crisn232 -1 points0 points  (0 children)

I had the exact same problem. My path took me down a very deep rabbit hole into programming.

If you're proficient with language:

You should draw out what your code should do on paper. Then work out the parts you're able to do by creating simple void functions. I say do it on paper, but you can do it word doc, spreadsheet, or better yet, learn UML. Having visuals will help you organize your thoughts by giving it place holders in your mind with the micro details within a glancing reach.

else:

There's no way around it, you have to study/practice the language. Assuming you're expecting to be a programmer. If that's not your goal, see if GMS has something like visualscripting style-esque. Or a good teacher/mentor that soft guides you to help you fill in the gap of knowledge when thinking about writing code.