Newbie
I've tried my hand at making a few C# scripts for unity, specifically for use in VRChat. I got my hands on this book, but I feel like I'm missing some fundamental knowledge about coding. What are some good resources for getting started besides diving right into learning the programming language that could help me make sense of this.
I'm 100% new to this, and any suggestions are greatly appreciated 💜
22 Replies
where are you struggling?
My goal is to be able to build functionality from C# to Udongraph or Udon# in Unity. I'm unsure how much C# knowledge I need to get there.
This is one of the examples it had me do. I got it to launch, but Im not understanding why/how it works.
what helps is to google the idividual statements
Console.ReadLine.. well reads what the user has typed into the console.
convert.todouble uses what has been typed and converts it into a double the result gets saved into the variable num
on the second time what gets typed into the console gets added to num and saved as sum
console.writeline just prints it to console.
console.readkey at the end is just there so the window doesnt close instantly and wait for the user to press any key
And that makes sense! But do I need to understand truth tables and discrete math to write code?
I only have a fundamental understanding of basic algebra 😬
to just write code? no.
for gamedev some knowledge in math is preferable but tbh anything you need you can look up.
truthtables in the basic sense are kinda required but dont worry to much about it. with a bit of practice it basicly becomes second nature
whats important as a dev is to know how to find the necessary information to solve a problem where you dont have the experience yet for
so a big part of a dev is googling a ton
getting started besides diving right into learning the programming languagehow do u want to get started without learning the fundamental basics? generally speaking - tho i dunno anything about that book - work through it. game dev is a complex topic even if u dont take the math behind it into account. then maybe start with some small $projects to gain a bit experience and then dive into unity
Collections of application ideas that anyone can solve in any programming language to improve coding skills:
https://github.com/dotnet/dotnet-console-games
https://github.com/karan/Projects
https://github.com/florinpop17/app-ideas
and ofc 100% agreed on that part
All of this is helpful thank you!
Basically just asking if there were any prerequisites before getting started. I'll stick with reading and taking notes/doing examples.
I love that this is a thing, felt like I was "cheating" by trying to google things. The new ai suggestions are sometimes helpful.
that book seems like to guide ya through the fundamentals, so it should be fine following that for now
The new ai suggestions [...]not sure if u mean the code completion stuff like copilot or chatgpt. but generally u should avoid them. code completion ai is on the free tier garbage and not useful at all. chatgpt and alike to answer questions is even worse. LLMs spit out stuff that sounds valid at first glance, but is actually utterly senseless garbage as well. and even if either of that would spit out stuff thats actually correct, u wouldnt learn stuff, so its not helpful at all. if u continue after the beginner/intermediate stuff, u will find urself needing to solve problems where there is no tutorial/guide to help u through and u have to deal with it urself by the knowledge and experience u acquired and information u can gather in anyway (internet, forums, libraries, etc)
You've described my experience perfectly, tried cranking code through gpt and it's garbage.
Gave up on that and decided to figure it out myself.
And I was referencing those ai suggestions at the top of Google search they added.
tbh i only find them useful to rephrase documentational comments on what a method does, but thats it
try playing number guessing with them. that sort of reflects the quality of their answers.
(spoiler: they are cheating!)
basically follow the book, sometimes play around with what u learned so far, if u r stuck try to research for information to find solutions online and if all that didnt help, ask in communities like this server for further advice.
we wont spoon feed u a working code either tho, but would be leading ya to the necessary information and help ya coming up with the solution. but the majority of work is still on u 🙂
Completely understand, no one works for free
its not about working for free, its about, if we spoon feed, u will come back with a similar question within the next days as well.
we are lazy. its ur typical "give a man a fish and he is sated for a day, teach him how to fish and he is sated for a life time" (or something like that)
That makes sense, tbh I felt a little out of my depth after looking in #chat I'm willing to put in the time to give it a go though.
in #chat are some really experienced people writing, some even are the devolpers of the c# language itself
so dont get discouraged if you cant follow everything
tbh i think #chat is a bad place to ask questions, there is a lot of noise because ppl are chatting about everything in there.
then there are quite sarcastic/trolling statements that are not beginner friendly
and then also a lot of drift instead of staying at the topic (partially because the noise)
yep that aswell
That's pretty wild
the only questions regarding programming in #chat i ask are usually about naming, stuff like if
WriteIf(...)
or IfWrite(...)
would be a better name. and out of the 5 ppl who respond u get around 10 opinions xD
for relative short questions regarding C#, depending on topic, i either choose #help-0 or #advanced, if its going into more detail as in i have to explain a lot i create a thread in #help (just like we ended up here)
(im leaving #allow-unsafe-blocks out, because thats far beyond the advanced stuff)