Showing posts with label folks.. Show all posts
Showing posts with label folks.. Show all posts

Wednesday, 23 October 2024

Build triple A games with C++ in Visual Studio 2022

[MUSIC] >> Hi, folks. My name is David Li. I am the C++ Game Dev PM at Visual Studio. I'm here to talk to you about some new and exciting changes in Visual Studio 2022. Recently, our CEO, Satya Nadella, has said, as a company, Microsoft's all-in on gaming. At Visual Studio, we're all-in on gaming too. We have been creating new and exciting experiences for Visual Studio based on your feedback. Whether your Unreal developer, an indie game developer, whether you make your game on our proprietary engine or work on AAA game studio, let me show you why VS 2022 is the IDE for you. First, let me get started with the demo on Hot Reload. Now for game developers, this might sound familiar to you. Have you ever spend 30 minutes playing your game just to get to a specific state? Spend all those minutes and hours getting to that state just to find out your bug fix didn't work? Or if you're a technical artist. If you repeatedly have to restart a game just to see your [inaudible] iterations, Hot Reload is a feature for you. Let me show you how Hot Reload works. Imagine you're building an open source, cross-platform [inaudible] project like Bitfighter here. In Bitfighter, you have a ship that has a red round shield. You can activate the shield with a press of a button. Now what if you want to make the shield a little bit more exciting? Let's do that in Visual Studio. Here, instead of the color red, I'm going to make it cyan, and instead of a circle, I'm going to draw a star. Normally, without Hot Reload, you will have to close down the game, rebuild it, and click through the menus just to get to the same state. With Hot Reload, all you have to do is to press the "Hot Reload" button. It takes a few seconds for Hot Reload to run. Let's see here, a giant 10-point blue star. Isn't that crazy? Oh, okay. Maybe that's a little bit too exciting. Let's change it back to something a little bit more reasonable. Instead of the star, I'm going to go back to the circle. But this time, instead of red, I'm going to change the color to gold. Instead of pressing the "Hot Reload" button, you can also activate Hot Reload on File Save. To enable that, go to the dropdown next to the Hot Reload button. Click "Hot Reload on File Save". Once that is enabled, every time you save the game through Ctrl +S or the Save button, the change are automatically applied. Here, a gold round shield. Hot Reload supports any changes that are currently supported by Edit and Continue, and is not limited to only game developers. With Hot Reload, you no longer have to close your application, recompile it, get the application back to the same state, only to find out your fix doesn't work. Instead of spending minutes and hours getting to the same state when debugging, take those precious minutes back with Hot Reload for C++. Next, let me show you a demo with Intellicode for Unreal Engine. We build Intellicode for Unreal Engine by parsing many Unreal Engine databases and making an AI model. When enabled, Intellicode for Unreal Engine shows up in Unreal projects. For established developers, Intellicode saves time by suggesting the most common suggestions and sorting them to the top of the member list. For new developers, Intellicode suggests the right APIs in the right place. For Teams, you can train custom team models over your codebase, which makes the effects of Intellicode even more powerful, but providing suggestions on internal types as well as more specified suggestions based on your Team's coding patterns. This also makes it easier to onboard new developers as it help suggest things the Team is using elsewhere. Here, let me demonstrate how Intellicode works with member access. When you press a "Dot", Intellicode suggestions will show up with a star. The star denotes that this suggestion is from Intellicode. Similar down here, when you press the "Dot" operator, you'll get another Intellicode base suggestion. Down below, the Arrow operator also brings up a list of Intellicode suggested suggestions denoted by the stars. In this case, the top suggestion is GetController. With Intellicode for Unreal Engine, power up your experience of developing Unreal Engine games in Visual Studio. We have been working closely with Epic Games to make a great experience of developing Unreal Engine games in Visual Studio. Haven't tried the Unreal Engine? You can check it out under the game development with C++ workload in the Visual Studio Installer. One of the things that we have been working with Epic Games is increasing the responsiveness of IntelliSense. IntelliSense for UE projects is now significantly more responsive due to utilizing PCH when generating VS project files. Look for this new updates in a new version of Unreal Engine 4.27 coming soon. Similarly, Intellicode for Unreal Engine 5 is coming in an upcoming release. What do you want as an Unreal Engine developer in Visual Studio? We want to know. Connect with us on Twitter, and leave us your feedback. Aside from making Unreal Engine IntelliSense improvements, we have also been making core performance in C++ IntelliSense improvements in Visual Studio 2022. We have made a test based on Unreal Engine 4.27, a large project, and benchmarked it with VS2019 against the VS2022. The timings we're taking when VS opens a project for the first time and subsequent times average over three runs. Visual Studio 2022 feels faster when getting to code. You can get to code quicker in Visual Studio 2022 and open the file twice as fast. You can also wait less time for IntelliSense ready. Get the syntactic highlighting and code changes to appear in member list twice as fast. With the new improved IntelliSense performance in Visual Studio 2022, you can save seconds each time you open a file. We hear pain about IntelliSense performance with game developers. Now these are only few seconds each action. But imagine, how many times are you opening a file every day? How many times are you waiting for IntelliSense to open every time you open a new file? These are only a few seconds but add up over time. Especially for bigger projects, this will scale. These are small numbers, but they add up. We want more feedback because we aren't done making improvements. Install Visual Studio 2022 side-by-side with VS2019. We want to make it easy. VS2022 is binary compatible with previous C++ two sets in 2019 or older. If you are coming from VS2019, you may be familiar with our built throughput improvements. Let me briefly tell you what you'll gain from upgrading to the latest tools. Using the latest tools, the Gears 5 team at The Coalition saw a 2.6. seven times faster end-to-end build time and 2.8 faster link time compared to VS2017. Similarly, at Turn 10 Studios, they saw a five times improvement and link times for Forza Motorsports. For Forza Horizon 4, the link times are now 18 times faster than in Visual Studio 2017. The decrease in build time enabled Playground Games to switch from /DEBUG:FASTLINK to /DEBUG:FULL. You can enjoy all the benefits of the latest toolsets by upgrading VS2022. When you load your projects, you'll be prompted to upgrade, but you don't have to. You can still use the old compilers and the older toolsets and they will still work. You can enjoy the IDE experience of Visual Studio 2022 that way. Third-party libraries that will also work. Don't have a package manager? Try vcpkg. Download Visual Studio 2022 today, and try out all the new and exciting features we have in store for you.

Monday, 21 October 2024

.NET Hot Reload for desktop & mobile with Visual Studio 2022

[MUSIC] >> Hello folks. Welcome to my video. My name is Dmitri Lyland and I'm a Program Manager in the Visual Studio and .NET team. Today I'm going to show you the Hot Reload user experience in Visual Studio 2022. This is a brand new experience we've added to Visual Studio, our goal is to save you time restarting your app in order to apply code changes. It's quite simple. We think, in fact, we know many times when you're running your application, you're going to run into some change you want to make. The app is already running, and traditionally having to shut that app down, apply the code change, and spend all that time rebuilding restarting can be very expensive for many applications. With highly reload experience, we're making this better, at least we hope so, for .NET and C++ developers. Today, I'm going focus on .NET desktop applications and show you how our hardware is going to make working with those applications just a little bit easier when it's set to make that code change. Let's go ahead and jump into the demo. Here we have our first demo application. These demo applications are available in the public. These are public samples of a desktop application, part of WPF sample applications. You can go ahead and find that over at GitHub. In this application that I'm already running, it's a little particle displayer. It's an app that's very visual and it makes it really easy for me to show you how to reload, so let's jump right into it. How do we load work exactly? Here we have an app that was started without the debugger. If you look at the top, you can see there's no debugger attached, and that's okay because this is a .NET 6 app. If you combine Visual Studio 2022 with .NET 6, you can use Hot Reload without the debugger. For everybody else, working with .NET Framework or older versions of .NET, you can use the debugger and Hot Reload will also be available. In this demo, my app is running and the Hot Reload button up here is available. This Hot Reload, it does all the magic when you press it. After you have a code change, the code change gets applied to your running app. Not only that, but we've made it available on File Save as well. If you prefer not to click the button, you can opt in. It's not on by default, but you can opt into this new setting called Hot Reload and Save. Let's go ahead and use the feature by changing some code and pressing "Save" and hopefully seeing the magic. Here I'm going to go ahead and I'm going to just do something fun. I'm going to add another variable here called P5, I'm going to add P5 into our collection. The moment I did that, the app went crazy. Now, traditionally, just to make even that simple code changes to experiment with my application, I would have to have shut it down and we get started. As you can see here, I made a code change and right away it's taking effect, doing some crazy things. The Hot Reload is really easy to undo the mess you started. Great. We're back to a much nicer particle. I'm going to continue editing this app live without stopping. I'm going to go in here and make some changes. First of all, we've got this value here. I'm going go ahead and add one to it. By adding one, as you can see, my app is changing quite drastically three, four, able to change it again without ever having to stop. Now, you don't even see me pressing the Hot Reload button up here because I'm using this unsave features. All I'm doing is on the keyboard hitting the "Save" button and the app is changing quite dramatically. It's pretty cool demo. Now, this is fun and all, me just tweaking values in this application to make the particles change. But let's do something a lot more dramatic. Let's switch to a different application. This one is called the calculator demo. I'm going go ahead and set that start-up. This time, just for a difference, we're going to start with the debugger. Again, all of this is available with other debuggers since these are all targeting .NET 6, but we're going to use the debugger in this case, and we're going to start this second application. This is a little calculator. Because we're using the debugger, we're not only just getting the calculator, we're getting this really cool related feature called XAML live preview because this is a XAML app. That's not my demo today, but if you want to learn more about it, we have other videos, they'll tell you all the details. I'll close this down just to get out of our way, and let's take a look at our application source code. Here, it's a very simple demo, I would not recommend making a calculator using same logic, but we have this really large method here, let's go find it, called process operation. For better or worse, this calculator demo is using a very large method to process your edit. If let's say press 5 plus 5 and you press equals to, it does the math over here, as you can see, gives me the output. Now, all of that is handled through this giant processing method. What I'm going to go and do, it just proves the how powerful Hot Reload is, I'm going go and I'm going to remove this whole method. I'm going to take out all the logic out of it. I'm going to press the button just to show you I'm really doing it. I'm Hot Reloading, changes were applied successfully down here. We know the changes made it to the running app, and I'm going to start pressing all buttons in this application. You're not going do anything to actually execute. The logic numbers might be going up here, but none of these buttons are functional because we're hitting process operations and exempting. Now let's believe I retyped all that code. I did cheat in pressing "Control+Z" to put the code back, but that's okay. I could have retyped that, there really is no difference. Now that all this code is back, I'm going to once again press the "Hot Reload" button, go back to my calculator, and now I'm going to clear it. Now I'm going press 5 plus 10 and it's going to tell me 15. At all levels possible with Hot Reload. Hot Reload can truly make a lot of changes while you're app is running. It's not that there's no limitations, there should be limitations and you will get an error message if you try to make an edit that we don't support. But we're hopeful that with some of these edits being supported and more over time, that adds a lot of value to you. Hope you enjoyed those demos, this is just a fraction of what Hot Reload can do for you and I really hope you try it in Visual Studio 2022. Definitely give it a try, give us feedback. We're hoping this feature is really useful to you. Again, I want to emphasize it's really broadly available. Even if you're working in a really old .NET application, a really new .NET application or an unoptimized C++ app, Hot Reload user experience is in Visual Studio and hopefully save you a lot of time. Thanks for watching and let us know what you think of our feature.

Building Bots Part 1

it's about time we did a toolbox episode on BOTS hi welcome to visual studio toolbox I'm your host Robert green and jo...