First Run

If you are using VSCode, all we have to do now is run our build and run task.

Hit Ctrl-Shift-B (or Cmd-Shift-B on OSX) to bring up the Build Tasks window.

Build Tasks window

There’s a lot of options here so let’s break it down a bit.

Build tasks simply build the program, but do not execute it. Run tasks execute without building. Build & Run tasks build and then execute.

Framework means that the game will execute using .NET Framework (or Mono if you are on OSX or Linux). Core means that the game will execute using .NET Core.

FNA recommends developing and shipping using Framework/Mono, but I find the Core debugger to be pretty powerful, so I switch to Core sometimes when I have a tricky bug to track down.

Debug means that the game will build in Debug mode. Release means that the game will build in Release mode. Debug modes are typically larger and slower than Release builds, but they allow you to use powerful debugging tools. When you are shipping your game you should always, always use Release mode.

Anyway, for our first run, let’s select Build & Run: Framework Debug.

Exciting!! Let’s see what happens…

pong first run

Look at that! Terrific.

Cornflower blue is a lovely color, but for authenticity we probably want the background to be black instead.

In the Draw method, change Color.CornflowerBlue to Color.Black:


pong second run

Thaaaaaaat’s more like it. But it’s pretty boring right now. Games need action! Let’s move on and get this paddle moving.