Placeholder Image

Subtitles section Play video

  • COLTON OGDEN: All right.

  • Welcome, everybody, to CS50 on Twitch.

  • My name is Colton Ogden and today we're going to be taking a look at--

  • to depart from prior streams we're going to transfer or transition from 2D

  • and using Love and Lua to 3D and using Unity and C# today.

  • So a little bit of a transition from a dynamic

  • to a sort of statically typed languages and object

  • oriented programming languages, but should be a good time.

  • Some people in the chat already here.

  • So I see [? Bavik ?] is here.

  • So hello [? Bavik. ?] Good to see you again.

  • [INAUDIBLE] good to see you.

  • ForSunlight, good to see you.

  • We've got a bunch of people here.

  • [INAUDIBLE], nice to see you.

  • Thanks for joining us today.

  • Ann100, thanks for coming in again from Peru.

  • Good to see you, as well.

  • Yeah, we've got a lot of people in here already.

  • A lot of people are interested in Unity.

  • So if you're unfamiliar--

  • I'm going to transition to my desktop here--

  • I have a couple of things going on here.

  • I've got Unity in the background, but if you don't have Unity already,

  • you're going to want to go to Unity3D.com and then if you click

  • on this button that says--

  • I'll make it a little bit bigger so we can see a little bit better

  • here and zoom in--

  • it probably looks something similar to this if you're looking at this video

  • maybe in the future, should still be somewhat similar.

  • But on the front page is a Get Unity button

  • that takes you to a page where you can choose which version of Unity you want.

  • There's different versions.

  • There's a plus, a pro, and a personal.

  • Plus and Pro would be for if you're working for a company,

  • or not even necessarily a company-- well,

  • I guess probably it would be in a company situation,

  • but a small or a large company.

  • Or if you're just a hobbyist or making below a certain threshold of income,

  • you can go to the personal option.

  • Try Personal and then it will ask you to accept the terms and conditions

  • and then download the installer for your operating system,

  • or what's called Unity Hub, which is a fairly new thing that they've

  • done which allows you to actually maintain multiple different versions.

  • [? Bavik ?] says, "wow, yeah, I wish we could

  • get a certificate similar to professional development."

  • 42Force, "hello Colton."

  • Hello 42Force, good to see you.

  • And Reema7 says, "Unity star."

  • Reema7, I don't believe I've seen you yet, so thank you for joining us today.

  • Got a fair number of people here already.

  • So yeah, it should be a fairly painless process, no matter what operating

  • system you're running.

  • But definitely go here.

  • Go to the front page.

  • Click the blue button.

  • Follow the instructions.

  • Download Unity Hub or the installer for your operating system.

  • I chose Unity Hub, just cause I think that's where

  • they're sort of trending towards.

  • They've made a lot of changes in the last year or so with Unity,

  • and that is one of them.

  • Once you have that up and running, which should be relatively

  • painless, although it might take a long time because Unity is rather large

  • and also comes with a bunch of different packages

  • for building games for different platforms, like for Android, for WebGL,

  • for Xbox, PS4, all sorts of different platforms.

  • Unity is amazing in that respect.

  • So it may take you a little bit of time.

  • But it's very much well worth it.

  • So once you do have Unity Hub installed, it

  • should look something like similar to this when you first open it up.

  • It'll ask you to log in, so you will need a Unity account, as well.

  • So I believe the Unity sign up link is fairly painless.

  • Looks like id.unity.com will allow you to actually create a Unity ID.

  • You will need to specify a username and a password and email or password

  • and then you will need to log in on your machine in order to use it.

  • But it is a free account and relatively easy to setup,

  • just like Unity personal is free and rather painless to set up.

  • 42Force says, "from Manila in the Philippines.

  • Had to stay up and catch you again."

  • Thanks so much for staying up.

  • We're trying to make the streams a little bit earlier,

  • especially on the Friday streams where we do

  • the longer ones, the game dev ones.

  • So hence why we're starting at 1:00 today.

  • Often we start at 3:00.

  • So thanks for staying up.

  • I'm not sure what time it is in the Philippines.

  • Philippines time.

  • Right now it is 2:00 AM in the Philippines?

  • OK, wow.

  • Well, thank you very much for staying up that late to tune in today.

  • And feel free to go to sleep.

  • We will post the video later on YouTube.

  • And if you're watching on YouTube, you can tune in live at twitch.tv/CS50TV,

  • which will probably be in the YouTube description.

  • So once you have Unity Hub all set up, you have a Unity ID,

  • you've downloaded Unity Hub for your operating system

  • and it's taken you probably a half hour or so because it's a large download,

  • it'll look something like this when you go to create a new project.

  • So there's different tabs up here, all the projects that you have.

  • It has some tutorials baked in so that you can actually

  • walk through some preset projects, and then a bunch of different versions.

  • If you decide to-- maybe you have different Unity projects that have

  • different compatibilities--

  • you can go to the installs thing here.

  • You can also go to a new project, open a project, settings,

  • look at your account, blah, blah, blah.

  • The important thing is the new project because that's

  • what we're going to do today.

  • We're going to build a project from scratch.

  • We're going to look at pong in 3D today.

  • And actually, let me make sure my mixer is set appropriately.

  • It is not.

  • So I should-- now I should sound a little bit better.

  • I forgot to turn off my mixer.

  • So now I should sound a little crisper and not as weighty, I guess.

  • There shouldn't be as much background noise.

  • Let me know if that sounds any better.

  • It looks like now my volume might need to be turned up a little bit, actually.

  • So I'm going to do that, as well.

  • And then if all is good, we should be set to go.

  • 42Force says, "thanks for checking."

  • I was genuinely curious.

  • I wasn't aware that it was that far east or west,

  • depending on how you look at it.

  • KeithSCH says, "hello from the UK."

  • Hello, Keith.

  • Thanks so much for joining us today.

  • Ann says, "it's lunchtime here."

  • It's about lunchtime here, as well.

  • OK, awesome.

  • This is worth to watch live, very engaging lectures as always.

  • Thank you so much.

  • I appreciate it.

  • That's why I love twitch so much.

  • We can have a sort of back and forth.

  • And maybe today we'll cooperate on sort of implementing this project.

  • So what are we doing today?

  • Well, we're going to make a version of pong.

  • So if you're familiar with what pong is, we teach it in my games course.

  • It looks something similar to this.

  • The image is not quite working the way that I wanted it to.

  • It looks like they changed their Google Images UI today, which is hilarious.

  • But it looks something similar--

  • and you can't see because of the chat, as well--

  • but it looks something similar to this where

  • you have a paddle on the left, paddle on the right,

  • or vice versa, because I'm currently flipped.

  • And the goal is to sort of make the ball bounce past your opponent's paddle

  • and strike some area beyond where it exists.

  • And that will trigger a point for you on your side of the screen

  • where you can see there's a score written there, four and two.

  • And it'll be something very similar to what we did today,

  • except we're going to do this in 3D instead of 2D

  • because Unity is, first and foremost, a 3D engine,

  • although it is a 2D engine, as well.

  • 2D was not something it originally came with many years ago.

  • But as of the last few years, it's had quite a good solid set of 2D features.

  • But it's fun to explore it in 3D.

  • So that's what we're going to do today.

  • We're going to make a 3D version and we're

  • going to implement it from scratch.

  • I do have some notes that I took when I implemented it just

  • in case I do hit a stumbling block.

  • But we should be fine.

  • It's a fairly easy project to undertake, even as a completely beginner at Unity.

  • Although we will be doing some coding today.

  • So the nice thing about Unity is it does allow