About 'Text101 Instructor Hangout #1'!

In this video (objectives)…

  1. Further discussion regarding state as a class and state as a variable.
  2. Further discussion on how scriptable objects work, where they are saving and what is required.
  3. Code formating - where it matters and where it doesn't.
  4. Why we didn't dig into more narrative design in this section.

After watching (learning outcomes)…

Deeper understanding of the concepts covered thus far in this section.

(Unique Video Reference: 14_TX_CUD)

We would love to know…

  • What you found good about this lecture?
  • What we could do better?

Remember that you can reply to this topic, or create a new topic. The easiest way to create a new topic is to follow the link in Resources. That way the topic will…

  • Be in the correct forum (for the course).
  • Be in the right sub-forum (for the section)
  • Have the correct lecture tag.

Enjoy your stay in our thriving community!

10 Likes

great discussion, good to hear an extra perspective on some things.

just taking a moment to say I am thoroughly enjoying the course.

I should point out I took the quiz twice and it the second time it said I completed it on my first try, even though it was my second try, because I only got 6/10 the first try. :slight_smile:

3 Likes

Thanks for taking the time to dig into these topics a bit more. It was really helpful to hear that we shouldn’t expect to understand EVERYTHING right now. (I especially loved the comparison to slow internet loading pictures from blurry to clear over time :stuck_out_tongue_closed_eyes:)

Please do more of these! Definitely helped give me confidence to keep going.

5 Likes

I’d also like to add that I very much enjoyed the extra perspective and input on some of the things we’ve been learning.

Specifically, I liked the breakdown of the State state; and why textComponent.text = state.GetStateStory(); works, etc.

I also appreciate the fact that you tell us why you do / don’t do certain things. It keeps me from straying too far from the course content and confusing myself.

Please do more of these; they’re a nice refreshing step away from the course progression and give us room to reflect on what we’re doing.

4 Likes

Made an account just to say thanks for this one! For the same reasons stated!

2 Likes

In the Unity Docs, they say that GameObject and its descendant classes are all stored by ref and not value.
So, MonoBehaviour should also behave like ScriptableObject with the exception that since it’s a behavior, it must be applied to a subject. Am I correct in my assumptions. Also, then when exactly is it beneficial to use ScriptableObject, in which scenarios should it be used. I mean we could’ve simple create a master state class with an array of public serealized string fields and attach it to an invisible object. Please shed some light on this

The main benefit of scriptable objects is that we can have a lot of data in repeated fields without needing to add them to a script file. When added to a script we need to ensure our syntax is perfect, we need to worry about formatting so that our lines dont go off the screen, we need to be able to quickly find what we’re looking for which gets tough if you have 100 states in a script and probably the most important, we need easy ways to link various states together - this is easier to do in the inspector with scriptable objects than it would in a file.

Hope this answers your question.

5 Likes

Nice! Now I don’t feel so bad! I was so worried about getting my code to look exactly like what I saw in the videos that it was becoming frustrating! I know I need to follow some guidelines but it is nice to know that it’s not the most important thing. Nice analogy with the “image loading”, comparison!

I’m new to C#, but I’m not new to debate of code formatting. I love Ben’s quote, “Strive for consistency in the code you write, but forgive inconsistency in others.”

2 Likes

“…but forgive inconsistency in others… publicly…”

What is muttered under a developers breath when reviewing other people’s code is his/her own business :wink:

3 Likes

Just a another quick note to throw in that I really appreciated this section. I’m not (entirely) new to coding, so I was wondering how much I was ‘supposed’ to know up until this point from this course, what was going to be covered in the context of unity, how much I should go dig myself etc.

Look forward to seeing more of these discussions going forward!

2 Likes

Hi,
I’m currently on lecture 31, and i try too do all code on my own but…(Same practice as Text101)
I can read the code , i mean i understand what different line code do, but to implement it on my own i mean i don’t know how to start, and what to do next, or why i should do this way .
When i see code i understand it , but too write it on my own it’s almost impossible too me.
[Apologies for bad grammar ]

Hi, Rick,

I think the course is really good. Thanks for all your hard work and clear explanations! This instructor hangout is a good idea: the thing that struck me most here was the phrase “no magic numbers.” I’ve been coding as a hobbyist for decades, with no one to look over what I’ve written to point out errors and flaws. I’ve often wondered when I really should declare a variable rather than just using a number with a comment. Ben’s rule is pretty simple: if it isn’t 0 or 1, name it.

Personally, I didn’t have trouble with “State state.” The thing i had to go over and over had to do with text. First, in the script you have “Text textComponent.” Then later on you access “textComponent.text.” (It took me a long time to figure out that Unity changes the formatting of the names of serialized fields: “textComponent” in VS becomes “Text Component” in Unity.) OK, then in Unity, you add an object of type Text to the canvas, and that Text object has a Text component which has a field called “Text.” Finally you assign the Unity Text object to the script’s Text Component.

It makes sense now: C# has Text objects that have to record font and other things in addition to the text itself. And Unity has UI Text objects that have to record the text itself, font, and graphical placement. But it’s a lot of things called “Text” or “text.”

Anyway, thanks for a great course!

Ken

1 Like

Thanks for your thoughts Ken. Yep, there are a lot of ‘texts’ to trip us up. It looks like you’ve nailed it though!

1 Like

Yes! Excellent advice – not just for coding.

1 Like

Sharing:

  1. Really cool!

  2. I wasted (for lack of better word) a couple of hours trying to figure out some of the specific questions myself, and those exact questions were somewhat explained here very fast and clearly. I know Rick always says in the video “you don’t have to understand 100% yet” so maybe that’s on me :slightly_smiling_face:

  3. Doing this section all I could think was “when I am making my own project, how will I know if I must implement X or Y”, so I was very reassured to hear Ben say, that you’re not supposed to know when to pick X or Y yet and that I will 1. Look how they do it 2. Follow along 3. Start deciding for myself.

  4. Rick is a really cool guy and has a very positive attitude, makes learning to code much more bearable :slight_smile:

That’s my my 2 ¢

3 Likes

Hey!

Loving the course so far! Feedback/input re:

  1. Further discussion regarding state as a class and state as a variable.
  • Excellent, this made it “click” for me regarding “State state” in particular :slight_smile:
  1. Further discussion on how scriptable objects work, where they are saving and what is required.
  • Great, also good that you pointed out why you didn’t dig deep regarding this yet. Cudos to Ben for being really clear about when we should start to be able to make these kinds of decisions on our own.
  1. Code formating - where it matters and where it doesn’t.
  • Good point for me (hehe), i’m a bit of a perfectionist and I really need to dial that down a notch.
  1. Why we didn’t dig into more narrative design in this section
  • Appreciated this one (although i’m more in it for the coding sections)
  • What you found good about this lecture?
  • See notations above.
  • What we could do better?
  • No real constructive feedback as of yet, loving it!
1 Like

Interesting hangout guys.

I’ve gotta say - I’m an experienced C# developer (I’m here mostly to learn about Unity), but that was a really interesting point @ben made about code formatting and about there being no right or wrong way to format code. It really does depend on the project and the environment you code in, for example when I worked in insurance building quote engines they have really strict code formatting rules and some of them weren’t the way I was used to coding but I had to adapt. For personal projects though I can do what’s comfortable and when I’m learning a new language or syntax I try not to get too hung up on formatting - as long as I can read it I’m happy. Plus, just to add to that further, I tend to comment everything I do when I’m learning anyways so I know what does what and what belongs where and why, which can help alongside your chosen formatting style.

Hope that makes sense and helps beginners you have an experienced developers POV on formatting. Overall I’d say when you’re learning, format in the style that makes you comfortable, but when you hit the industry be prepared and open to change. :slight_smile:

3 Likes

Hello there, just want to say Thanks for the hangout, I think it was really awesome.

I’m a programmer with some experience in the industry, just not with games - sadly, and wanna point out that the discussion about formatting was really good for new people getting into the field.

1 Like

Really enjoyed this Instructor Hangout. Brand new to C# and Unity so this really helped answer some of my immediate questions as a I was following along through the Text101 section.

Keep these coming, I expect they will help people (like me) tie a knot on the concepts and ideas that are bouncing around in the lessons.

Thanks!

Privacy & Terms