C# and Game Programming
eBook - ePub

C# and Game Programming

A Beginner's Guide

Salvatore A. Buono, Salvatore A. Buono

Buch teilen
  1. 532 Seiten
  2. English
  3. ePUB (handyfreundlich)
  4. Über iOS und Android verfügbar
eBook - ePub

C# and Game Programming

A Beginner's Guide

Salvatore A. Buono, Salvatore A. Buono

Angaben zum Buch
Buchvorschau
Inhaltsverzeichnis
Quellenangaben

Über dieses Buch

The second edition of C# and Game Programming offers the same practical, hands-on approach as the first edition to learning the C# language through classic arcade game applications. Complete source code for games like Battle Bit, Asteroid Miner, and Battle Tennis, included on the CD-ROM, demonstrates programming strategies and complements the comprehensive treatment of C# in the text. From the basics of adding graphics and sound to games, to advanced concepts such as the.Net framework and object-oriented programming, this book provides the foundations for a beginner to become a full-fledged programmer. New in this edition: - Supports DirectX 9.0 - Revised programs and examples - Improved frame rate for game examples

Häufig gestellte Fragen

Wie kann ich mein Abo kündigen?
Gehe einfach zum Kontobereich in den Einstellungen und klicke auf „Abo kündigen“ – ganz einfach. Nachdem du gekündigt hast, bleibt deine Mitgliedschaft für den verbleibenden Abozeitraum, den du bereits bezahlt hast, aktiv. Mehr Informationen hier.
(Wie) Kann ich Bücher herunterladen?
Derzeit stehen all unsere auf Mobilgeräte reagierenden ePub-Bücher zum Download über die App zur Verfügung. Die meisten unserer PDFs stehen ebenfalls zum Download bereit; wir arbeiten daran, auch die übrigen PDFs zum Download anzubieten, bei denen dies aktuell noch nicht möglich ist. Weitere Informationen hier.
Welcher Unterschied besteht bei den Preisen zwischen den Aboplänen?
Mit beiden Aboplänen erhältst du vollen Zugang zur Bibliothek und allen Funktionen von Perlego. Die einzigen Unterschiede bestehen im Preis und dem Abozeitraum: Mit dem Jahresabo sparst du auf 12 Monate gerechnet im Vergleich zum Monatsabo rund 30 %.
Was ist Perlego?
Wir sind ein Online-Abodienst für Lehrbücher, bei dem du für weniger als den Preis eines einzelnen Buches pro Monat Zugang zu einer ganzen Online-Bibliothek erhältst. Mit über 1 Million Büchern zu über 1.000 verschiedenen Themen haben wir bestimmt alles, was du brauchst! Weitere Informationen hier.
Unterstützt Perlego Text-zu-Sprache?
Achte auf das Symbol zum Vorlesen in deinem nächsten Buch, um zu sehen, ob du es dir auch anhören kannst. Bei diesem Tool wird dir Text laut vorgelesen, wobei der Text beim Vorlesen auch grafisch hervorgehoben wird. Du kannst das Vorlesen jederzeit anhalten, beschleunigen und verlangsamen. Weitere Informationen hier.
Ist C# and Game Programming als Online-PDF/ePub verfügbar?
Ja, du hast Zugang zu C# and Game Programming von Salvatore A. Buono, Salvatore A. Buono im PDF- und/oder ePub-Format sowie zu anderen beliebten Büchern aus Ciencia de la computación & Programación de juegos. Aus unserem Katalog stehen dir über 1 Million Bücher zur Verfügung.

Information

Programming Basics
I
Chapter One
C# from the Beginning
1
Everything should be made as simple as
possible, but not simpler
.”
–Albert Einstein
This chapter covers the basic aspects of the C# language including its history, compilers, algorithms, variables, and the use of the Base Class Library. Each section is designed to facilitate a quick and easy introduction and to ensure a strong foundation in programming and problem solving. Special attention was placed on what a new programmer needs to know and/or might be confused about; the sections can, however, be covered quickly. There are a few sections set aside to cover history and theory, but the core of this chapter is about programming. Two sections promote good programming habits and there is a section on runtime, programming, and compiler errors (recommended reading even if you don’t get into trouble). If you’ve skimmed the lessons, you know that this first chapter doesn’t include any games, but don’t let that fool you. All of the concepts covered here are just as important for games as they are for business and/or math related topics.
An Overview of the C# Language
C# is a high- or mid-level programming language (and just in case you didn’t know, a programming language is the collection of words, phrases, and syntax rules used to communicate with the computer). Although there are many high-level programming languages (BASIC, JAVA, FORTRAN, Pascal, Lisp, ADA, Modula-2 and Logo), few have reached the popularity of the original C and C++ languages. C and C++ have been used to create everything from operating systems and word processing packages to compilers for other high-level languages. C and C++ have been the programming languages of choice for more than 50 percent of all programming applications, and with their advances in object-oriented programming and Internet applications, both Managed C++ and C# are sure to fuel the popularity of C languages well into this new millennium.
A Little History on the Cs
C was developed in the 1970s by Dennis Ritchie while he worked at AT&T Bell Laboratories. Before C, there was a language called B developed by Ken Thompson. While there was an A language, B was actually developed from Basic Combined Programming Language (BCPL), which was developed from a combination of two other languages, namely CPL and Algol60. C++’s object-oriented portions are attributed to still another language known as Simula67. CPL begot BCPL; BCPL begot B; B begot C; C begot C++; and C++ begot C#. In 1979, Bjarne Stroustrup (also at AT&T Bell Laboratories) developed the first version of C++ to be an enhanced version of the C language (initially referred to as C with classes). C++ was significantly enhanced with the addition of the Standard Template Library (STL) developed by Alexander Stepanov and Meng Lee at Hewlett-Packard. The STL was based heavily on previous work done by both Stepanov and Musser, from Rensselaer Polytechnic Institute.
Both C and C++ spread quickly in power and use, but eventually all the added features and expansions lead to incompatibilities and frustrations. Two standards were created, first with the American National Standards Institute (ANSI) C standard of 1983, and then the American National Standards for Systems Information and International Standards Organization (ISO) C/C++ standards of 1998 (Note: C was also updated in this second standard). The 1998 ANSI/ISO standard is generally referred to as Native C++, while Microsoft’s .Net Extensions are known as Managed C++. C# was also standardized with its first release under what is known as the 2001/2002 ECMA certified standard.
C# was developed by a team of Microsoft programmers led by chief architect Anders Hejlsberg. It is intended to supplement the development of applications required for both stream users and intranet/internet programmers alike. C# is definitely one of the most sophisticated languages ever developed, and similar to the entire .Net architecture, it will alter the way programmers think about programming for many years to come. Hejlsberg was also responsible for the development of Microsoft’s Visual J++, Turbo Pascal, and Delphi, for which he finally received the Dr. Dobb’s Journal Award for Excellence in Programming early in 2001. For further information on the history of Turbo Pascal, Visual J++, and the Dr. Dobb’s Journal Award, you should consult your local library… now let’s get back to business.
Image
As you can see, C# evolved from the simpler languages.
Hey, I thought it was created by a programmer.
What is the .Net Framework?
The .Net framework is a multitasking, class-based programming library and interface that allows for both the interoperable exchange and execution of data. As a library, the .Net base classes are as powerful as the traditional Windows API function set, but have the added advantage of being completely object-oriented. Object-oriented programming (as explained throughout this book) is a practical method used to develop programs that promotes both the reusability and reliability of code. The .Net runtime (also known as the Common Language Runtime or CLR) serves as a shell or intermediate environment that assists the operating system with program execution(s).
The .Net framework also allows for program interoperability, requiring a Common Type System (CTS) governed through the Intermediate Language commonly known as Microsoft’s Intermediate Language (MSIL) and/or the Common Intermediate Language (CIL). I...

Inhaltsverzeichnis