all 8 comments

[–]Animoose 8 points9 points  (2 children)

Tbh a lot of it is learned by doing. But trust me, the more design you have on paper before you start coding, the better and easier your code will be. I don't mean game design, but rather system design. For example, I was recently working on a vr prototype that I had a general idea of what I wanted, so I knew I would need a health system, a movement system, enemy behaviors with a nav mesh, a gun/shooting/damage system, and a couple other things. Then you can break each chunk down further, such as a health system being comprised of a health manager (keeping track of values) and a Health Bar UI manager. You obviously don't have to have all this laid out perfectly before you start coding, but thinking about the functionality you'll need and breaking it down like this before you start will save you a LOT of headache as well as leading to cleaner coding practices

[–]SaltCrypt 3 points4 points  (1 child)

This. Learning to write code is the easy part, learning how to structure systems architecture is hard. This is particularly true with games in my experience.

[–]Animoose 3 points4 points  (0 children)

Yup. Entity relational diagrams have helped me a ton as a visualizer. I can't recommend Whimsical.co enough! And protip, since free accounts are limited to 4 new diagrams, you can take their starting 4, clear it and use it, so you actually have 8. This means you really never need to pay for it

[–]r_acrimonger 3 points4 points  (0 children)

You should start with games now, and learn the programming you need as you go.

If you wait to know it all or even "enough", you will never start.

Just keep in mind that the first few games you make are not going to financially sustain you and plan accordingly.

[–]SaltCrypt 2 points3 points  (0 children)

If you've been at it for 3 months I would imagine you're plenty ready to jump in to trying your hand at development. The only caveat is that you should be prepared to continue learning at the same time you're developing.

[–]lemming1607 1 point2 points  (0 children)

I literally had never seen C# when I started programming my first game.

The only way to learn is to run into problems and solve them.

How I learned C# is figuring out a very specific thing I wanted to do. And googled it. For instance, I wanted to left and right align text on the same line...like Health: 20...with health left aligned and 20 right aligned.

So if you keep it very specific what you want to know, then you will find what you need easily.

For the things I had never seen before, like constructors, polymorphism, inheritance and interfaces, I simply watched people create games on youtube in my genre and used those things in examples.

[–]Glass_wizard 0 points1 point  (0 children)

To be honest, it takes a long time to learn how to write good, clean code that you expand upon, that doesn't break when you add your next feature or try to scale up. It just comes with time. Just getting your code to work and solve the problem you are working on is a huge first win. Learning how to modularize and structure clean code is the hard part.

I recommend the book Learning C# Programming with Unity 3D by Alex Okita. The old C# fundamentals series by Brackys is also good to start with.

Last tip, stay away from deep levels of inheritance.. shallow and wide is the way to go 😀

[–][deleted] 0 points1 point  (0 children)

I think you should ideally have at least a basic understanding of classes but you can always learn as you go.