字幕表 動画を再生する 英語字幕をプリント We'll see if this is gonna live. It looks like it's gone life, just double checking. Everything would like to somebody to give me some feedback as to whether the audio is okay and you can hear me. That would be nice on welcome. Yes to the 100 k live party, Thank you very much. I see there's been quite a few people waiting this afternoon. So hello to everybody in the chat. If you see me looking at different windows, it's because I've got various chaps from different platforms. Exxon, Ojai. We've got some people recognize some familiar names already. That's good. S O. This is to celebrate Swell 2019. And it's been a good year for the channel. It's been a great year for the community. We just saw a community showcase, loads of cool things on dhe. I think what we're going to do today is a code it yourself, which has become a bit of a tradition on this channel. Whenever we've got a milestone to celebrate, I subject myself to this ritual humiliation off writing bugs live. So what we're going to do is code a sh mop or a shooting up on it's going to be in the vein of those like crazy Japanese ones with bullets all over the place on. We'll see how far we get because I'm not going to stream for hours and hours and hours, so we'll see how far we get today. Hopefully, we'll get a nice framework in place. And that's really what I'm aiming for because I've got a little prototype have put together. So I'm not coding it completely from scratch. We shouldn't be getting two lost like we did in the 50 k. Remember getting lost there? That was embarrassing. But what I'm hoping to provide is this framework, which is really extensible for creating your own shooting up. So I'll just have a quick glance at some of the chaps just to see what's going on. Well, it's quite a few people have turned up already. That's that's really good. Eso thank you to those with lots of nice messages. I'm not going t read them all out Now I will say some things before we start. There is a prize draw. The link should be below the video that you're currently watching. There are 4 25 great British pound steam vouchers up for grabs. It's za looking dip draw on. You've got to answer a silly question, which is to also be on the screen. I think for you to see read only my messages. There you go, Red cap, right? So I think we'll just get started. So the idea is going to be a shooting up like a side scrolling, shooting up with lots and lots of bullets. But I was quite keen to have a think about how we structure an engine. For that. They'll be a few of the announcements as well. I'm going to keep getting distracted until we get settled. Thanks for the congrats. What are we doing? We're programming a shooting up game in this style off 1942 which is that really horrible one for the nest. But we'll be adding a bit more Flor to It's certainly a lot more particles because we like perfect ALS in these life specials. I know some of you like to code along. That's fine. I will be probably going at quite a pace, but I think the gist will be quite acceptable for most of you on DDE. I'm going to be leaning quite a bit on. So what's his so called modern C plus plus in order to get things done? And this has come out of a drive of what? Of witnessing some conversations on the discord for about people not necessarily exploiting some of the things that modern C++ has to offer. And hopefully I can demonstrate through the course of this video that if you really do lean on the tools, you can get things working very quickly, as much as possible. I'm trying Thio Keep up with the chap, but it is going a little bit faster. If I do miss your messages, they're all recorded. And that's one of the reasons I like to put the chat on the screen so I can go back and look at the mall later. I do like to try and read them all, because sometimes you suggest some really wonderful things. There's a few moderators in the chat already. In fact, I'll just make this guy moderator. Now I can see that he's here. The Andi I think we'll get started, so I'm going to be using the pixel game engine now. You should all be very familiar with this from the channel, the pixel game engine, rather excitingly lows of announcements on it. It's going to get a bit of an update next year. I got some plans for it. It will be considered pixel game engine, too, but it will be 100% backward compatible with pixel game engine one. There's a few reasons, but I'll save that for for the new year. But anyway, yesterday were using pixel game engine what 11 final announcement to make? Because I'll make this a stars and I'll make it at the end as well. Let me just bring in this window here so you can see through. The community has decided that a one man coder community blawg platform is a good idea on dhe. I tend to agree with them that so I'm now hosting this at community 10.11 co dot com. On if the idea is that the community can write articles on get them up there dead logs or reviews of gains technology, anything that interests us is a community. Really. It's early days, yet there's not very many articles on it, but if you want to write something and get it seen because that gets a little bit of traffic. Hopefully. Now, you know, they've got a bit of a platform to push what the community is developing. Maybe, you know, be nice to get this sort of underway and get people involved. So if you if you want to write some articles register, reach out on the discord one way or another, contact me on, we can see about getting them posted. Its got things like source code highlighting and images and things. S o just wanted to get that in there before. We should not close that down now. Right. Are we ready? I think I'm ready for a mouthful of water. Quite a few people here and I don't often stream on YouTube. I tend to stream on twitch. Twitch is a little bit more accessible for streaming. Right. So we've got a basic pixel game engine application appear I'm using 6 40 by 4 80 resolution on my pixel to screen ratio is going to be too on. All it does is create an empty window. Now, if we're going to create a shooting up, I think the first thing we're going to need is a ship so I will be gone soon. Occasionally my prototype. But I just want to make sure I get the variable names that I come up with consistent in the first place S o for the ship. All I really care about is where the players position is s o. I'm going to use a O l f l c vector floating point to DIY type. And I used these quite a lot. Now on it. Call Aunt VI. Play it. Paul's very simple stuff on. I'm going to need a sprite to draw what the player ship looks like. It's gonna move my microphone slightly. So do let me know if it's a problem on bridges, and I will see spring type here. Create appointed to SP R Player now because I'm doing this live and I want to know quite a bit to get through tonight I will be cutting some corners regarding initializing variables and deleting things. But, you know, give me a break. Eso want to load that spite And I've created four graphics actually got them from an asset pack on humble bundle on. I'm just going to use these basic graphics for tonight s I want to load this sprite, and I've got them in a subdirectory. GI effects And I've called it 100 K player, one PNG. So we've got the Sprite, and I think we'll add some rudimentary control in on user update to move that sprite around on the screen. So we're gonna start very simply here. I'm will build on it as we as we go through the video. Hopefully, this will be available as a VOD straightaway if you if you're late or you just want things to slow down a little bit. So I'm going to control the ship with the W A S and D Keys S o. If we get key, we'll see w now I'm going don't to respond to the events. I want to respond to the keys actually being held down. That gives it a more really time field. So if that's held down, if it w I wanted the player to move towards the top screen. So player past, get all the typos now, can't edit these out. Player past minus now. How fast are they going to move? Well, I don't know yet, so I think we'll have another variable which is the player speed because we might want to tune that later. Let's just default that it's something ridiculous is probably far too high for now. F place speech. So I want to adjust the wine, coordinate, play speed Now, whenever we're doing movement. And if you watch the channel on gathering the people that are here tonight or not, brand new to the channel, so you'll know that we use f elapsed time Thio modulate the movement across the screen. So we got it going up the screen. There you have it going down this screen down being positive. Of course, when we hold down the S ky on, we probably want the same for the X axis as well. So it will be the A and D Keys A and deal day on instead of why change those by X? Very nice. So very simple. I got that the right way around A is going left. So yes, that's going to be reducing the value of a quick glances at the chat fruit pastels or jelly tucks. I really do like both, but I think you know occasionally want to treat myself to jelly tots. That's an exceptionally British right s. So now I've got to the player movement. Let's just draw the play. And the reason I'm showing this first is it's also a nice demonstration of just how simple we can do things using the pixel game engine s. Oh, well, we'll basically have in our main loop here, the top will have user input. You know what? We'll flag these input in the middle here will have all of the mechanics and movement. I'm going to call those. Not that I'm going to call these gubbins. Oh, just got a subscriber via twitch. Thank you, Lord Chrissy, thank you very much. We'll have Gubbins for there and then we'll have a display in the bottom. Gubbins is an English word. I let I let some of you look that up. Oh, hey, clarified. Nice to see that, right? What was I doing? I was drawing a ship. Got distracted by a subscriber on twitch. I'm drawing the player, and that's very simple because it's just going to be drawing the sprite at the location that we've just been creating. So take the player. Pause, variable. Andi, I'll give it this Sprite player on. I'm not going to scale it anything. So that's it.