C# is a programming language that's been around since 2001. It's one of the programming languages included in Microsoft's .NET framework, and it can be used to develop all kinds of programs, including games. Why did we pick C# as the language to teach in this book? For two important reasons. First, it's a robust, modern language that's easy to learn as a first programming language. Second, and more importantly, C# is the preferred language to use when we write scripts in the Unity game engine. Because scripts are the things that actually implement the gameplay in our games, it's pretty important that you know how to write them as you develop your own games!
If we're going to write C# programs to run on our computer (or our professor's computer), it will sure help if we understand the basics of what a typical computer looks like. In this chapter, we'll look at basic computer organization, talk about how software works on that organization, and even get to writing and running our first C# program.
Before we start talking about how the hardware in a computer is organized, what is hardware in the first place? Well, the easiest way to think about it is that hardware will hurt if you drop it on your foot! In other words, hardware consists of the parts of the computer that we can see and touch. Most computers, and certainly almost all PCs, are composed of 4 different kinds of hardware – the Central Processing Unit (CPU), memory (main and secondary), input devices, and output devices.