Success... and thank you

I’m very proud of myself, and I’d like to tell everyone about it… cuz 'mericuh.

Ben challenged me in this video to add the sound on collision method to the ball. I paused the video and did just that. When I tested, before unpausing the video, I noticed the sound was being played on start. Before Ben discussed it in the video, I wrote the if (hasStarted) statement to guard against playing that sound before launching the ball.

I’ve done a lot of different online courses in my time… from CCNA to MCSA to Java and JS/HTML/CSS… every single time I’ve sat here, watching videos and reading countless pages, thinking “am I really retaining this?” This is the first time I’ve been able to prove to myself that I am retaining it. I’ve noticed over the last few days that I know where he is going and what he is going to do with a lot of the stuff he does. I may not know the syntax he is going to use, but the logic has been built in to my head. It’s tremendous to me that I’m actually learning a thing from my time spent on the internet instead of scratching my head going “do I really know this thing?”…

I’d like to offer a heartfelt thank you to the team operating this course. Ben does a wonderful job. Rob has replied to me in the forums and helped on multiple occasions. I’m not even sure if he’s part of the team, but without the work done here, I would not have had that support.

I’m learning! And it feels great.


This is fantastic to hear, as is how proud you are feeling, it’s that sense of growing confidence that will help you progress even further :slight_smile: I’m sure @Ben will appreciate your feedback and kind words.

Please do continue to post and share your successes and obviously any questions you may have. I am fairly confident that there are often many people all wondering the same thing but don’t want to be the first to post the question. By asking questions we can all learn from each other and the community grows and benefits as a whole - which is great! Sharing your screenshots or links to your games with your own changes/implementations is so worth while as not only can you get some feedback from the rest of the community, praise, kind words of encouragement, feature suggestions, but your posts will often serve as inspiration to others who haven’t got as far with the course(s) as yourself yet. :slight_smile:

I do gr8 cuz Canada!..anyone?

1 Like

I know how you feel. Earlier in the course Ben wasn’t programming the bricks to break yet, but even though that was several videos ahead I assumed it would be in the next one so I programmed them to destroy, which was correct and felt really chuffed at that.

Sadly that hasn’t worked on the part of Statics and Booleans though, but i’m sure one of these videos will help me understand so I won’t need much hand-holding when it comes to those.

I’ve got a pretty solid grasp on bools. Statics are still a bit out there, but I sort of get them.

What are you having trouble with, specifically? Maybe I can help.

I might just be a bit early in the course. Doing blockbreaker and when Ben asks about pausing the video and doing the bool yourself I had no idea where to begin.

Hard to explain really and like you said, I’ve sort of gotten Statics, but I’m just worried that once the course is finished I’ll have no idea where to even begin or if/when I’d need them.

If you need any help/support just pop up a message on the forums and you have an entire community at your disposal :slight_smile:

1 Like

Thanks, for the moment I may just wing-it until I get to a point where I’m designing my own game or perhaps a prototype so I can get a good idea of how to get what I want working to work and then copy the code into the main project.

1 Like

Okay, I’m no expert, but here goes:

Booleans are true or false statements. That’s all.

Think of it as binary. It’s either on or off.

So if you declare a thing, you can check against it, right?

bool isOn; 

This declares that the variable exists. All you’re doing here is saying make an object that is a boolean and call it isOn.

Now you can act against that variable and do/determine things with it.

Let’s say you wanted to know if someone pressed a button…

bool isOn;

void ButtonPress () {
if (buttonPress) {
isOn = true;
print (isOn);

Now all we’re doing is saying if a user presses a button (this buttonPress I’m checking for would be declared in another method) then print the true or false value of isOn. If the user presses a button, then we make the boolean true (changing it from 0 to 1, essentially).

Booleans are just a type of data that says on or off, true or false, 1 or 0. Just the same way that int means a whole number, bool only means true or false.

Statics are a bit more complicated, but from my research I’ve found that a lot of the programming community frowns on using statics often because they tend to cause bugs. I’ll share my understanding nevertheless, and others can correct me if I’m wrong:

Statics declare global “things”; these “things” are available to any class anywhere in your game. So say you made a static class that did some addition. You can call that script from any other script because it’s static, and anywhere you manipulate that static influences the original. This is where it causes bugs. If you change the + in the addition static class from another script, it’s going to effect every other call to that static script. So you end up with unintended consequences.

To better understand, I think of it as cloning (although it doesn’t quite fit that mold, it makes it easier to visualize):

If I cloned you tomorrow under the pretense that if I made a change to the genetic code I used to clone you it would change every copy I make… then I changed your genetic code to change you to female rather than male, then all the copies I created prior to making that change would then be changed to female.

As you can see, this can cause serious unintended consequences when you use statics often in your code. One mistake, and you’ve changed all your enemies to friendlies or something like that.

Basically, statics are used to create globally accessible content within C#, but it is often recommended that you do not use globally accessible content because the often use of it can cause you to lose track of what you’re doing and can cause very difficult to track down bugs.

I don’t fully understand them, and though I see a use for them, they are dangerous and should be used sparingly.

This could be a handy resource regarding static… they can be very useful when you are creating helper type classes…

Static Classes and Static Class Members (C# Programming Guide)

There’s a useful example regarding temperature conversion (not particularly game related but should help).

Hope this is of use.

Privacy & Terms