Description
Introduction 1-1
1 Getting started 1-91.1 A simple program 1-91.2 Creating an SSDL project 1-121.3 Shapes and the functions that draw them 1-271.4 consts and colors 1-351.5 Text 1-37 Prominent examples from this chapter: a drawing of a bug's head; a neatly printed poem.
2 Images and sound 2-432.1 Images and changing window characteristics 2-432.2 Multiple images together 2-482.3 Adding transparency with GIMP 2-502.4 Sound 2-54Example: a slide show (Your yard gnome's travel pics).
3 Math: types, operations, consts, and math functions 3-563.1 Variables 3-563.2 const, constexpr, constinit 3-573.3 Math operators 3-593.4 Built-in functions and casting 3-62Examples: diver on a diving board; a 5-pointed star.C++20 updates: constexpr, constinit.
After this chapter, constexpr/constinit show up in most examples.
4 Mouse, and if 4-674.1 Mouse functions 4-674.2 if 4-694.3 Boolean values and variables 4-734.4 A hidden-object game 4-75Example: The hidden-object game.
5 Loops and text input 5-795.1 Keyboard input 5-795.2 while and do-while 5-815.3 for loops 5-855.4 chars and cctype 5-905.5 switch 5-94Examples: the Monty Hall problem; menus.
6 Algorithms and the development process 6-976.1 Adventures in robotic cooking 6-976.2 Writing a program from start to finish 6-100
Example: a bullseye pattern.
7 Functions 7-1067.1 Functions that return values 7-1067.2 Functions that return nothing 7-1097.3 Global variables and why they're evil 7-1117.4 How to write a function in four easy steps (and call it in one) 7-1137.5 Why have functions, anyway? 7-117Example: a multi-frame comic (illustrates code reuse).
8 Functions (Continued) 8-1268.1 Random numbers 8-1268.2 Boolean functions 8-1318.3 Multiple values provided: using & parameters 8-1338.4 Identifier scope 8-1388.5 A final note on algorithms 8-140 Examples: various functions using random number generation.
9 Using the debugger 9-1419.1 A flawed program 9-1419.2 Breakpoints and watched variables 9-1459.3 Fixing the stripes 9-1459.4 Going into functions 9-1499.4 Fixing the stars 9-1499.4 Wrap-up 9-1509.4 Other debugging techniques 9-1539.4 More on antibugging 9-156
Example: a national flag.
10 Arrays and enum class 10-15910.1 Arrays 10-15910.2 Arrays as function parameters 10-16010.3 enum class 10-16610.4 Multidimensional arrays 10-166Examples: monthly temperatures, checkers, tic-tac-toe.C++20 update: using enum class (which significantly improves the usefulness of enum class).
11 Animation with structs and sprites 11-17311.1 struct 11-17311.2 Making a movie with struct and while 11-17611.3 Sprites 11-182Examples: bouncing balls; a video aquarium.C++20 update: designated initializers for structs.
12 Building your own arcade game: input, collisions, and putting it all together 12-18812.1 Determining input states 12-18812.2 Events 12-19012.3 Cooldowns and lifetimes 12-19
Author: Will Briggs
Publisher: Apress
Published: 01/12/2021
Pages: 677
Binding Type: Paperback
Weight: 2.66lbs
Size: 10.00h x 7.00w x 1.42d
ISBN13: 9781484263051
ISBN10: 1484263057
BISAC Categories:
- Computers | Programming | Open Source
- Computers | Languages | General
1 Getting started 1-91.1 A simple program 1-91.2 Creating an SSDL project 1-121.3 Shapes and the functions that draw them 1-271.4 consts and colors 1-351.5 Text 1-37 Prominent examples from this chapter: a drawing of a bug's head; a neatly printed poem.
2 Images and sound 2-432.1 Images and changing window characteristics 2-432.2 Multiple images together 2-482.3 Adding transparency with GIMP 2-502.4 Sound 2-54Example: a slide show (Your yard gnome's travel pics).
3 Math: types, operations, consts, and math functions 3-563.1 Variables 3-563.2 const, constexpr, constinit 3-573.3 Math operators 3-593.4 Built-in functions and casting 3-62Examples: diver on a diving board; a 5-pointed star.C++20 updates: constexpr, constinit.
After this chapter, constexpr/constinit show up in most examples.
4 Mouse, and if 4-674.1 Mouse functions 4-674.2 if 4-694.3 Boolean values and variables 4-734.4 A hidden-object game 4-75Example: The hidden-object game.
5 Loops and text input 5-795.1 Keyboard input 5-795.2 while and do-while 5-815.3 for loops 5-855.4 chars and cctype 5-905.5 switch 5-94Examples: the Monty Hall problem; menus.
6 Algorithms and the development process 6-976.1 Adventures in robotic cooking 6-976.2 Writing a program from start to finish 6-100
Example: a bullseye pattern.
7 Functions 7-1067.1 Functions that return values 7-1067.2 Functions that return nothing 7-1097.3 Global variables and why they're evil 7-1117.4 How to write a function in four easy steps (and call it in one) 7-1137.5 Why have functions, anyway? 7-117Example: a multi-frame comic (illustrates code reuse).
8 Functions (Continued) 8-1268.1 Random numbers 8-1268.2 Boolean functions 8-1318.3 Multiple values provided: using & parameters 8-1338.4 Identifier scope 8-1388.5 A final note on algorithms 8-140 Examples: various functions using random number generation.
9 Using the debugger 9-1419.1 A flawed program 9-1419.2 Breakpoints and watched variables 9-1459.3 Fixing the stripes 9-1459.4 Going into functions 9-1499.4 Fixing the stars 9-1499.4 Wrap-up 9-1509.4 Other debugging techniques 9-1539.4 More on antibugging 9-156
Example: a national flag.
10 Arrays and enum class 10-15910.1 Arrays 10-15910.2 Arrays as function parameters 10-16010.3 enum class 10-16610.4 Multidimensional arrays 10-166Examples: monthly temperatures, checkers, tic-tac-toe.C++20 update: using enum class (which significantly improves the usefulness of enum class).
11 Animation with structs and sprites 11-17311.1 struct 11-17311.2 Making a movie with struct and while 11-17611.3 Sprites 11-182Examples: bouncing balls; a video aquarium.C++20 update: designated initializers for structs.
12 Building your own arcade game: input, collisions, and putting it all together 12-18812.1 Determining input states 12-18812.2 Events 12-19012.3 Cooldowns and lifetimes 12-19
Author: Will Briggs
Publisher: Apress
Published: 01/12/2021
Pages: 677
Binding Type: Paperback
Weight: 2.66lbs
Size: 10.00h x 7.00w x 1.42d
ISBN13: 9781484263051
ISBN10: 1484263057
BISAC Categories:
- Computers | Programming | Open Source
- Computers | Languages | General
About the Author
Will Briggs, PhD is a professor of computer science at the University of Lynchburg in Virginia. He has 20+ years of experience teaching C++, 12 of them using earlier drafts of this book, and about as many years teaching other languages including C, LISP, Pascal, PHP, PROLOG, and Python. His primary focus is teaching of late while also active in research in artificial intelligence.