48 lines
1.7 KiB
Markdown
48 lines
1.7 KiB
Markdown
---
|
|
title: "First Run"
|
|
date: 2019-05-23T12:21:05-07:00
|
|
weight: 20
|
|
---
|
|
|
|
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](/images/build_tasks.png)
|
|
|
|
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](/images/pong_first_run.png)
|
|
|
|
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:
|
|
|
|
```cs
|
|
GraphicsDevice.Clear(Color.Black);
|
|
```
|
|
|
|
![pong second run](/images/pong_second_run.png)
|
|
|
|
Thaaaaaaat's more like it. But it's pretty boring right now. Games need action! Let's move on and get this paddle moving.
|