Placeholder Image

字幕表 動画を再生する

  • All right.

  • Hello, world.

  • This is CS 50 on Twitch.

  • My name is Colton Ogden.

  • And today we're going Thio take a break away from Solitaire, which we've been spending two streams on so far.

  • And we're going to dive into a much simpler game.

  • But a game that's fairly new in a game that some of you might have played a very famous Web based game called Cookie Clicker.

  • I'll pull up the screen shot here in just a second, but thanks so much.

  • Everybody in the chat who, uh, wish me happy birthday before the stream started.

  • So as they started off and then started a trend here.

  • So thanks as Lisa Maher Babic, um Whip streak and all who wish me happy birthday several CS Otan Jobe Omega Togas I mus Colton sandwiches.

  • I believe that means Happy birthday.

  • I know I made it told means congratulations.

  • Both on Jobe, I do believe is birthday and Bella cures.

  • Thank you all so much.

  • Appreciate it.

  • Thank you very much for the birthday wishes.

  • 28 today, 22 years away from the magical 30 I'm gonna pull over to my screen here and I want to show everybody what cookie clicker looks like before we actually get into implementing it.

  • And to be fair, actually didn't test to see whether, um, we could play this, but it looks like we can.

  • This is cookie clicker.

  • So if I click this sort of cookie, you do see that I get a certain plus one.

  • I get a cookie animation and I can have a sort of a counter.

  • They're saying that I have 24 cookies thus far, so your goal is to accumulate cookies.

  • And I think there's a more macro level goal.

  • I think you're trying to take over the world or prevent, like, a candy invasion or something.

  • So if I keep clicking, you'll see that cookies do get increased over here on the right side.

  • And this is where the game play, you know, you see what we think you know.

  • This is kind of very simple, boring game.

  • Why, even why even have this game exist?

  • I'm just clicking cookies, you know, for the sake of clicking essentially on the screen, right?

  • But there's a bit of ah, larger scale, almost business aspect of the game, almost a tycoon aspect of the game whereby you can purchase these things in the store on the right hand side.

  • You're so I could buy a cursor and what that will do.

  • And it's kind of hard to see, but it's actually rotating around the cookie on the topside right here.

  • But what that cursor is doing is now it's actually clicking for me, or at least it should be.

  • It's looking like it's very slow 0.1.

  • Oh, it might be Oh, yes, either it is.

  • It just added one.

  • What's the rate on these, by the way?

  • Every 10 seconds.

  • So every 10 seconds will get one more cookie that I don't have to click myself so you can see that it went to 37 then to 38 by itself.

  • It should in a second here, go up to 39.

  • I'm not mistaken 39 cookies.

  • So the goal of the game isn't so much to click the cookies.

  • You know, indefinitely and sort of wasting your time is a human doing this, but rather well arguably.

  • But your goal is to amass sort of this empire of cookie generating structures, things like cursors, things like Grandma's, which is the next year of things that will bake cookies for you, things like factories and mines and much more.

  • I did a little bit of research into the game.

  • I just bought two more cursors.

  • So now I'll get a few more cookies per per second here, but you can see that you have a per second rate of cookies, which is 20.3.

  • So now I've increased my great generation by quite a bit.

  • By clicking.

  • I can keep buying more stuff up.

  • My rate, a generation that's ultimately your bulge up your rate of generation, get billions of cookies and take over the world with your cookie empire.

  • So we'll be doing a version similar to this today.

  • Our own version.

  • It's not gonna be wet.

  • Base is gonna be in love to D in Lieu, which have been doing in the past.

  • We could implement this as a Web based game, certainly, and that's the the version that the actual game itself is written.

  • But we're going to ourselves.

  • D'oh!

  • The, um do the framework that we've been using more recently.

  • So I'm just gonna read the chat here I own one was saying, Take the day off.

  • I enjoy doing these dreams.

  • I wouldn't want to take the day off.

  • To be honest, I don't do too much.

  • Remember days, actually, kind of Just take it easy and and, um, reflect on having grown a year older, I guess.

  • And Babbitt was saying that hey, hadn't been here for quite a Well, actually, I do remember.

  • I don't think I saw you in the last stream, so yeah, it has felt like it's been quite a while.

  • Send for exes.

  • Hello, Nano Machine or Happy Birthday.

  • Thank you very much.

  • Andre.

  • Sing every birthday.

  • True Guineas.

  • Thank you so much, baby togas.

  • I'm losses than a machine.

  • I appreciate it.

  • All is good that some good boats talk says hon JJ mu 999 Don't cause they're not a machine.

  • Er took his eye moss and some are gaming.

  • Happy birthday SMR gaming.

  • Interesting Is that eyes that the, um the sound like the like, the sensitive sound or whatever That you here with a special microphone?

  • I don't remember offhand, that's smr from Think of something else, but hello.

  • Later.

  • Happy birthday.

  • Thank you so much.

  • Um, smr gaming.

  • Oh, no.

  • Facebook cookies.

  • Me throughout my entire browser.

  • Usage everywhere.

  • Yeah, that's true.

  • That usually.

  • And this is a joke that I made.

  • And I think when I posted on Twitter was that usually in CS 50 we talk about cookies in a different context to cooking, being a sort of little file that websites gun store in your browser to keep track of some, you know, information to preserve a session or something for a website.

  • But we're actually today talking literally about cookies that you would bake in an oven or whatnot.

  • So it's a bit of a kn ironic and different change of pace.

  • Kloppenburg.

  • Good to see you.

  • Uh, let's appreciate how dedicated Colton is.

  • I mean, this is I mean, we're just making a fun game today.

  • This is this is this is no sort of exercise in and difficulty here, uh, am Kloppenburg saying, Actually, I don't know what language that is.

  • I apologize.

  • Invent hard toe get Phyllis Terracotta.

  • I'm gonna assume that probably says Happy birthday.

  • But if you can let me know what language that actually is every great Lovell, the emojis and whatnot, as he says, No, you have to enjoy your birthday.

  • Don't reflect on becoming older.

  • I think that's kind of unavoidable, girl say, says Ola.

  • Happy Birthday.

  • Thank you very much.

  • Let's Hello.

  • Are these games the same games that you make in your game day?

  • Of course, says l'm one.

  • Uh, no, it is not well, typically not we for a lab.

  • We did something similar to hangman and the tightening aim that we did in a prior stream.

  • But that's not public online.

  • That was for like, a summer version of the game score study teach.

  • This cookie clicker game is not actually a game that we've implemented.

  • Neither was solitaire.

  • Neither was snake or tick tack toe.

  • Even a lot of the games that were programming on streamer games that I have never made myself but know how to make conceptually.

  • I understand what needs to go on.

  • And you know, there's only enough time in the day.

  • You can't necessarily have expected to implement every possible game.

  • But, you know, doing these are fun exercises for me.

  • And there are fun teaching moment, I think, for other folks and Dutch got it.

  • Oh, actually, I did get your message that you were the first person, actually, uh to spur the Happy birthday messages.

  • So thank you very much for doing that.

  • I appreciate it.

  • Babak saying Internet problems Fiber cable broke a popped on Friday chat to wish, but it got repaired today afternoon.

  • Oh, that's rough.

  • I'm sorry to hear that Hope.

  • Hopefully, that's all solid now.

  • And the fiber cable won't break again in a different location.

  • But I can't imagine what it would be like to lose my Internet access.

  • I would feel lost and confused.

  • So, cookie clicker, Let's go ahead and set up a project.

  • So if your brand new to the stream, if you've never watched the stream before on twitch or if you never watched to see its 50 straight month, which I'm sure you've probably watched a twitch stream at some point.

  • But if you haven't watched a, um, CS 50 on twitch video, typically my videos on here, our game development of game projects that we develop from scratch.

  • Typically, what I like to use is love to deal that we have used the unity as well in the past.

  • But the framework that I like for using that I like using for teaching game development, particularly to the game development mostly out of necessity.

  • Love today is not a three framework, and therefore we can't use it for three development, but the framework that I enjoy using his love to do you go to love to d dot or GE and download it for your operating system is excellent lightweight to TM development framer that uses Lua as his programming language, which, if you're not familiar with Lou Lou, is a very sort of popular and ubiquitous programming language used in the context of games used for game engines all across all across the board.

  • But, yeah, it's good stuff.

  • I'm a big fan of it.

  • I use it in my game day, of course, and I use it on stream here.

  • It's very easy to get a project up and going quickly and to reiterate on it, it feels low level.

  • It feels like, Excuse me, feels you have a lot of control, even though there is a lot of abstraction for you and Lou itself as a language is fairly simple and lightweight and very flexible.

  • As a result, Police anniversary Oh says, Let's put a bar in forties, Thank you very much.

  • I appreciate I don't how to say.

  • I think it's a big Otto, which is Portuguese for thank you in Portuguese.

  • Correct me if I'm mistaken.

  • Um, thank you all so much for the very kind words.

  • I appreciate it.

  • So if you have love to need installed, the next step is going to be actually creating a project folder that is going to hold your games finals, your source code files and your graphic Xander sounds, et cetera, And the version to be clear, The version of cookie clicker that we're gonna be making today isn't gonna be as robust as cook it clicker because we only have a few hours.

  • But we're going to implement the core loop of being able to click the cookie, generate cookies and then buy things that will let you generate cookies over time and talk about how we actually get cookies per second implemented and things like that.

  • And, um, I like to use your cookies as currency to buy stuff from the store.

  • So we'll take a look at all that stuff and see what we can accomplish in just a few hours, because hopefully we don't want to make this two or three parts dream like solitary have enough of that going on already.

  • And solitary will probably resume either next week or the week after that.

  • So I'm gonna go to my Streams folder here, which I've set up for all of the streams you done so far.

  • I'm gonna create a folder called Cookie Clicker.

  • And then this is just gonna be my Lou A folder and can click and drag it over to V s code visual studio code.

  • If you're not using a text editor of Modern Text editor like V s Code or Adam or sublime text a highly recommended, you can technically program in a lot of different environments that aren't normally recommended, like Microsoft Word or WordPad or text at it.

  • And there are other smaller applications, like no pad plus plus and text Wrangler and certain many other programs can use vim.