1st Edition

A Gamer's Introduction to Programming in C# Welcome Brave Adventurer!

By Aaron Langille Copyright 2024
    380 Pages 23 Color & 40 B/W Illustrations
    by Chapman & Hall

    380 Pages 23 Color & 40 B/W Illustrations
    by Chapman & Hall

    The first in an ongoing series designed to take readers from zero experience to writing their own video games and interactive digital experiences using industry standard languages and tools, this book is a great way to turn a love of video games into a new love of programming. It teaches the coding ins-and-outs of how we keep track of high scores, what video game heroes and loot boxes are made of, how the dreaded RNG or, random number generation works, and much, much more.

     

    But coding books are technical, boring, and scary, aren’t they? Not this one. Within these pages readers will find a fun and approachable adventure that will introduce them to the essential programming fundamentals like variables, computer-based math operations, random number generation, logic structures including if-statements and loops, and even some object-oriented programming. Using Visual Studio and C#, readers will write simple, but effective console programs and text-based games that will gradually build up their coding skills and confidence. 

     

    Packed with practical examples and plain-language explanations, this book is structured like a video game, complete with levels to progress through, bonus levels for extra practice, cutscenes that offer breaks from coding, and end-of-level code rewards to illustrate how everything fits together.

    Engaging and concise, this book is appealing to both a general readership as well as course convenors and students of programming. Put on a cap of +5 courage and level up by joining the coding adventure that awaits inside!

    Contents


    Cutscene 1: Backstory (Introduction)

    Level 1: Prepare For Adventure (Hardware, Software, and Basics of Programming)

    Code Quest 1: Hello, World!

    Level 2: Adventure Begins (Common Data Types, Data Literals, and Ouput)

    Code Quest 2: Great Game Quotes

    Level 3: A Variable Inventory Of Items (Variables, Declarations, and Assignments)

    Code Quest 3: Character Builder (Part 1)

    Level 4: Some Friendly Input (User Input On The Console)

    Code Quest 4: Character Builder (Part 2)

    Cutscene 2: Recipes For Success (Algorithms and Algorithmic Thinking)

    Level 5: Divide And Conquer (Working With Built-in Math Operations and Functions)

    Code Quest 5: Tiny Tournament Stats

    Level 6: A Random Opportunity (Generating Random Numbers)

    Code Quest 6: A Random Encounter (Part 1)

    Level 7: A Fork In The Road (Simple if Statements and Conditional Logic)

    Code Quest 7: A Random Encounter (Part 2)

    Level 8: Decisions, Decisions (Advanced if Statements and Boolean Operators)

    Code Quest 8: My First Loot Box (Part 1)

    Level 9: Here We Go Again, And Again (Working With Loops and Repetition Structures.

    Code Quest 9: My First Loot Box (Part 2)

    Cutscene 3: Yikes, Gremlins! (Types of Errors and Troubleshooting Tips)

    Level 10 - Crafting Custom Objects (Introducing Objects and Writing Custom Classes)

    Code Quest 10: A Companion For Our Hero (Part 1)

    Level 11 - A Factory For Our Objects (Creating and Using Instances of Objects)

    Code Quest 11: A Companion For Our Hero (Part 2)

    Cutscene 4: The Adventure Ends…Or Does It?

    Bonus Code Quest: Cornflower Blue! (MonoGame Sneak Peek)

    Bonus Level 1 - A Bit About Binary

    Bonus Level 2 - A Slight Miscalculation (Unexpected Math Behaviours)

    Bonus Level 3 - Input Made (A Little Bit) Friendlier (Parsing Tricks)

    Bonus Level 4 - The Return Of Decisions, Decisions (Conditional Logic Revisited)

    Bonus Level 5 - A Matter Of Scope (Variable Scope)

    Bonus Level 6 - Let’s Take This Online (Online Resources)

    Biography

    Aaron Langille (PhD) is a public speaker and radio columnist, game player and designer, writer and editor, and award-winning post-secondary educator. After teaching computer science for almost two decades, he recently levelled up to teaching video game design. In his current role, Aaron sits joyfully at the intersection of video games, education, visual arts, media, technology, and storytelling.