Beginning C++ game programming :: learn C++ from scratch and get started building your very own games /
Learn C++ from scratch and get started building your very own games About This Book This book offers a fun way to learn modern C++ programming while building exciting 2D games This beginner-friendly guide offers a fast-paced but engaging approach to game development Dive headfirst into building a wi...
Gespeichert in:
1. Verfasser: | |
---|---|
Format: | Elektronisch E-Book |
Sprache: | English |
Veröffentlicht: |
Birmingham, UK :
Packt Publishing,
2016.
|
Schriftenreihe: | Community experience distilled.
|
Schlagworte: | |
Online-Zugang: | Volltext |
Zusammenfassung: | Learn C++ from scratch and get started building your very own games About This Book This book offers a fun way to learn modern C++ programming while building exciting 2D games This beginner-friendly guide offers a fast-paced but engaging approach to game development Dive headfirst into building a wide variety of desktop games that gradually increase in complexity It is packed with many suggestions to expand your finished games that will make you think critically, technically, and creatively Who This Book Is For This book is perfect for you if any of the following describes you: You have no C++ programming knowledge whatsoever or need a beginner level refresher course, if you want to learn to build games or just use games as an engaging way to learn C++, if you have aspirations to publish a game one day, perhaps on Steam, or if you just want to have loads of fun and impress friends with your creations. What You Will Learn Get to know C++ from scratch while simultaneously learning game building Learn the basics of C++, such as variables, loops, and functions to animate game objects, respond to collisions, keep score, play sound effects, and build your first playable game. Use more advanced C++ topics such as classes, inheritance, and references to spawn and control thousands of enemies, shoot with a rapid fire machine gun, and realize random scrolling game-worlds Stretch your C++ knowledge beyond the beginner level and use concepts such as pointers, references, and the Standard Template Library to add features like split-screen coop, immersive directional sound, and custom levels loaded from level-design files Get ready to go and build your own unique games! In Detail This book is all about offering you a fun introduction to the world of game programming, C++, and the OpenGL-powered SFML using three fun, fully-playable games. These games are an addictive frantic two-button tapper, a multi-level zombie survival shooter, and a split-screen multiplayer puzzle-platformer. We will start with the very basics of programming, such as variables, loops, and conditions and you will become more skillful with each game as you move through the key C++ topics, such as OOP (Object-Orientated Programming), C++ pointers, and an introduction to the Standard Template Library. While building these games, you will also learn exciting game programming concepts like particle effects, directional sound (spatialization), OpenGL programmable Shaders, spawning thousands of... |
Beschreibung: | 1 online resource (1 volume) : illustrations |
ISBN: | 1786467771 1786466198 9781786466198 9781786467775 |
Internformat
MARC
LEADER | 00000cam a2200000 i 4500 | ||
---|---|---|---|
001 | ZDB-4-EBA-ocn962419845 | ||
003 | OCoLC | ||
005 | 20241004212047.0 | ||
006 | m o d | ||
007 | cr unu|||||||| | ||
008 | 161111s2016 enka o 000 0 eng d | ||
040 | |a UMI |b eng |e rda |e pn |c UMI |d IDEBK |d OCLCF |d STF |d DEBBG |d DEBSZ |d OCLCQ |d COO |d VT2 |d OCLCO |d UOK |d CEF |d KSU |d WYU |d YDX |d N$T |d AGLDB |d IGB |d QGK |d OCLCO |d OCLCQ |d OCL |d OCLCO |d OCLCL |d OCLCQ |d DXU |d OCLCQ | ||
020 | |a 1786467771 | ||
020 | |a 1786466198 | ||
020 | |a 9781786466198 | ||
020 | |a 9781786467775 |q (electronic bk.) | ||
035 | |a (OCoLC)962419845 | ||
037 | |a CL0500000800 |b Safari Books Online | ||
050 | 4 | |a QA76.73.C153 | |
072 | 7 | |a GAM |x 001000 |2 bisacsh | |
082 | 7 | |a 794.81526 |2 23 | |
049 | |a MAIN | ||
100 | 1 | |a Horton, John, |e author. | |
245 | 1 | 0 | |a Beginning C++ game programming : |b learn C++ from scratch and get started building your very own games / |c John Horton. |
246 | 3 | |a Beginning C plus plus game programming | |
264 | 1 | |a Birmingham, UK : |b Packt Publishing, |c 2016. | |
300 | |a 1 online resource (1 volume) : |b illustrations | ||
336 | |a text |b txt |2 rdacontent | ||
337 | |a computer |b c |2 rdamedia | ||
338 | |a online resource |b cr |2 rdacarrier | ||
490 | 1 | |a Community Experience Distilled | |
588 | |a Description based on online resource; title from cover (Safari, viewed November 11, 2016). | ||
520 | |a Learn C++ from scratch and get started building your very own games About This Book This book offers a fun way to learn modern C++ programming while building exciting 2D games This beginner-friendly guide offers a fast-paced but engaging approach to game development Dive headfirst into building a wide variety of desktop games that gradually increase in complexity It is packed with many suggestions to expand your finished games that will make you think critically, technically, and creatively Who This Book Is For This book is perfect for you if any of the following describes you: You have no C++ programming knowledge whatsoever or need a beginner level refresher course, if you want to learn to build games or just use games as an engaging way to learn C++, if you have aspirations to publish a game one day, perhaps on Steam, or if you just want to have loads of fun and impress friends with your creations. What You Will Learn Get to know C++ from scratch while simultaneously learning game building Learn the basics of C++, such as variables, loops, and functions to animate game objects, respond to collisions, keep score, play sound effects, and build your first playable game. Use more advanced C++ topics such as classes, inheritance, and references to spawn and control thousands of enemies, shoot with a rapid fire machine gun, and realize random scrolling game-worlds Stretch your C++ knowledge beyond the beginner level and use concepts such as pointers, references, and the Standard Template Library to add features like split-screen coop, immersive directional sound, and custom levels loaded from level-design files Get ready to go and build your own unique games! In Detail This book is all about offering you a fun introduction to the world of game programming, C++, and the OpenGL-powered SFML using three fun, fully-playable games. These games are an addictive frantic two-button tapper, a multi-level zombie survival shooter, and a split-screen multiplayer puzzle-platformer. We will start with the very basics of programming, such as variables, loops, and conditions and you will become more skillful with each game as you move through the key C++ topics, such as OOP (Object-Orientated Programming), C++ pointers, and an introduction to the Standard Template Library. While building these games, you will also learn exciting game programming concepts like particle effects, directional sound (spatialization), OpenGL programmable Shaders, spawning thousands of... | ||
505 | 0 | |a Cover -- Credits -- About the Author -- Copyright -- About the Reviewer -- www.PacktPub.com -- Table of Contents -- Preface -- Chapter 1: C++, SFML, Visual Studio, and Starting the First Game -- The games -- Timber!!! -- Zombie Arena -- Thomas was Late -- Meet C++ -- Microsoft Visual Studio -- SFML -- Setting up the development environment -- What about Mac and Linux? -- Installing Visual Studio Express 2015 on your desktop -- Setting up SFML -- Creating a reusable project template -- Planning Timber!!! -- Creating a project from the template -- Project assets -- Outsourcing assets -- Making your own sound FX -- Adding assets to the project -- Exploring assets -- Understanding screen and internal coordinates -- Starting to code the game -- Making code clearer with comments -- #including Windows essentials -- The main function -- Presentation and syntax -- Returning values from a function -- Running the game -- Opening a window using SFML -- #including SFML features -- OOP, classes, objects -- Using namespace sf -- SFML VideoMode and RenderWindow -- Running the game -- The main game loop -- While loops -- C-style code comments -- Input, update, draw, repeat -- Detecting a key press -- Clearing and drawing the scene -- Running the game -- Drawing the game background -- Preparing the sprite using a texture -- Double-buffering the background sprite -- Running the game -- Handling errors -- Configuration errors -- Compile errors -- Link errors -- Bugs -- FAQ -- Summary -- Chapter 2: Variables, Operators, and Decisions -- Animating Sprites -- C++ variables -- Types of variable -- Constants -- User-defined types -- Declaring and initializing variables -- Declaring variables -- Initializing variables -- Declaring and initializing in one step -- Declaring and initializing user-defined types -- Manipulating variables. | |
505 | 8 | |a C++ arithmetic and assignment operators -- Getting things done with expressions -- Adding clouds, a tree, and a buzzing bee -- Preparing the tree -- Preparing the bee -- Preparing the clouds -- Drawing the tree, the bee, and the clouds -- Random numbers -- Generating random numbers in C++ -- Making decisions with if and else -- Logical operators -- C++ if and else -- If they come over the bridge, shoot them! -- Or do this instead -- Reader challenge -- Timing -- The frame-rate problem -- The SFML frame-rate solution -- Moving the clouds and the bee -- Giving life to the bee -- Blowing the clouds -- FAQ -- Summary -- Chapter 3: C++ Strings, SFML Time, Player Input, and HUD -- Pausing and restarting the game -- C++ strings -- Declaring strings -- Assigning a value to strings -- Manipulating strings -- SFML Text and Font -- Adding a score and a message -- Adding a time bar -- FAQ -- Summary -- Chapter 4: Loops, Arrays, Switch, Enumerations, and Functions -- Implementing Game Mechanics -- Loops -- while loops -- Breaking out of a while loop -- for loops -- Arrays -- Declaring an array -- Initializing the elements of an array -- Quickly initializing the elements of an array -- So what do these arrays really do for our games? -- Making decisions with switch -- Class enumerations -- Getting started with functions -- Function return types -- Function names -- Function parameters -- The function body -- Function prototypes -- Organizing functions -- Function gotcha! -- Final word on functions -- for now -- Absolute final word on functions -- for now -- Growing the branches -- Preparing the branches -- Updating the branch sprites each frame -- Drawing the branches -- Moving the branches -- FAQ -- Summary -- Chapter 5: Collisions, Sound, and End Conditions -- Making the Game Playable -- Preparing the player (and other sprites). | |
505 | 8 | |a Drawing the player and other sprites -- Handling the player's input -- Handling setting up a new game -- Detecting the player chopping -- Detecting a key being released -- Animating the chopped logs and the ax -- Handling death -- Simple sound FX -- How SFML sound works? -- When to play the sounds -- Adding the sound code -- Improving the game and the code -- FAQ -- Summary -- Chapter 6: Object-Oriented Programming, Classes, and SFML Views -- Planning and starting the Zombie Arena game -- Creating a project from the template -- The project assets -- Exploring the assets -- Adding the assets to the project -- OOP -- What is OOP? -- Encapsulation -- Polymorphism -- Inheritance -- Why do it like this? -- What is a class? -- The class variable and function declarations -- The class function definitions -- Using an instance of a class -- Constructors and getter functions -- Jumping around in the code -- Building the Player-the first class -- Coding the Player class header file -- Coding the Player class function definitions -- Controlling the game camera with SFML View -- Starting the Zombie Arena game engine -- Managing the code files -- Starting coding the main game loop -- FAQ -- Summary -- Chapter 7: C++ References, Sprite Sheets, and Vertex Arrays -- C++ References -- References summary -- SFML vertex arrays and sprite sheets -- What is a sprite sheet? -- What is a vertex array? -- Building a background from tiles -- Building a vertex array -- Using the vertex array to draw -- Creating a randomly generated scrolling background -- Using the background -- FAQ -- Summary -- Chapter 8: Pointers, the Standard Template Library, and Texture Management -- Pointers -- Pointer syntax -- Declaring a pointer -- Initializing a pointer -- Reinitializing pointers -- Dereferencing a pointer -- Pointers are versatile and powerful -- Dynamically allocated memory. | |
505 | 8 | |a Passing a pointer to a function -- Declaring and using a pointer to an object -- Pointers and arrays -- Summary of pointers -- The Standard Template Library -- What is a Map -- Declaring a Map -- Adding data to a Map -- Finding data in a Map -- Removing data from a Map -- Checking the size of a Map -- Checking for keys in a Map -- Looping/iterating through the key-value pairs of a Map -- The auto keyword -- STL summary -- The TextureHolder Class -- Coding the TextureHolder header file -- Coding the TextureHolder function definitions -- What exactly have we achieved with TextureHolder? -- Building a horde of zombies -- Coding the Zombie.h file -- Coding the Zombie.cpp file -- Using the Zombie class to create a horde -- Bringing the horde to life (back to life) -- Using the TextureHolder class for all textures -- Change the way the background gets its textures -- Change the way Player gets its texture -- FAQ -- Summary -- Chapter 9: Collision Detection, Pickups, and Bullets -- Coding the Bullet class -- Coding the Bullet header file -- Coding the Bullet source file -- Making the bullets fly -- Including the Bullet class -- Control variables and the bullet array -- Reloading the gun -- Shooting a bullet -- Updating the bullets each frame -- Drawing the bullets each frame -- Giving the player a crosshair -- Coding a class for pickups -- Coding the Pickup header file -- Coding the Pickup class function definitions -- Using the Pickup class -- Detecting collisions -- Has a zombie been shot? -- Has the player been touched by a zombie? -- Has the player touched a pickup? -- FAQ -- Summary -- Chapter 10: Layering Views and Implementing the HUD -- Adding all the Text and HUD objects -- Updating the HUD each frame -- Drawing the HUD, and the home and level up screens -- FAQ -- Summary -- Chapter 11: Sound Effects, File I/O, and Finishing the Game. | |
505 | 8 | |a Saving and loading the high-score -- Preparing sound effects -- Leveling up -- Restarting the game -- Playing the rest of the sounds -- Adding sound effects while the player is reloading -- Make a shooting sound -- Play a sound when the player is hit -- Play a sound when getting a pickup -- Make a splat sound when a zombie is shot -- FAQ -- Summary -- Chapter 12: Abstraction and Code Management -- Making Better Use of OOP -- The Thomas Was Late game -- Features of Thomas Was Late -- Creating a project from the template -- The project assets -- Game level designs -- GLSL Shaders -- The graphical assets close-up -- The sound assets close-up -- Adding the assets to the project -- Structuring the Thomas Was Late code -- Building the game engine -- Reusing the TextureHolder class -- Coding Engine.h -- Coding Engine.cpp -- Coding the Engine class constructor definition -- Coding the run function definition -- Coding the input function definition -- Coding the update function definition -- Coding the draw function definition -- The Engine class so far -- Coding the main function -- FAQ -- Summary -- Chapter 13: Advanced OOP -- Inheritance and Polymorphism -- Inheritance -- Extending a class -- Polymorphism -- Abstract classes -- virtual and pure virtual functions -- Building the PlayableCharacter class -- Coding PlayableCharacter.h -- Coding PlayableCharacter.cpp -- Building the Thomas and Bob classes -- Coding Thomas.h -- Coding Thomas.cpp -- Coding Bob.h -- Coding Bob.cpp -- Updating the game engine to use Thomas and Bob -- Updating Engine.h to add an instance of Bob and Thomas -- Updating the input function to control Thomas and Bob -- Updating the update function to spawn and update the PlayableCharacter instances -- Spawning Thomas and Bob -- Updating Thomas and Bob each frame -- Drawing Bob and Thomas -- FAQ -- Summary. | |
650 | 0 | |a C++ (Computer program language) |0 http://id.loc.gov/authorities/subjects/sh87007505 | |
650 | 0 | |a Video games |x Programming. |0 http://id.loc.gov/authorities/subjects/sh95003476 | |
650 | 6 | |a C++ (Langage de programmation) | |
650 | 6 | |a Jeux vidéo |x Programmation. | |
650 | 7 | |a GAMES / Board |2 bisacsh | |
650 | 7 | |a C++ (Computer program language) |2 fast | |
650 | 7 | |a Video games |x Programming |2 fast | |
776 | 0 | 8 | |i Print version: |a Horton, John. |t Beginning C++ game programming : learn C++ from scratch and get started building your very own games. |d Birmingham, England : Packt Publishing, c2016 |h x, 492 pages |k Community experience distilled. |z 9781786466198 |
830 | 0 | |a Community experience distilled. |0 http://id.loc.gov/authorities/names/no2011030603 | |
856 | 4 | 0 | |l FWS01 |p ZDB-4-EBA |q FWS_PDA_EBA |u https://search.ebscohost.com/login.aspx?direct=true&scope=site&db=nlebk&AN=1399497 |3 Volltext |
938 | |a YBP Library Services |b YANK |n 13231713 | ||
938 | |a ProQuest MyiLibrary Digital eBook Collection |b IDEB |n cis34561625 | ||
938 | |a EBSCOhost |b EBSC |n 1399497 | ||
994 | |a 92 |b GEBAY | ||
912 | |a ZDB-4-EBA | ||
049 | |a DE-863 |
Datensatz im Suchindex
DE-BY-FWS_katkey | ZDB-4-EBA-ocn962419845 |
---|---|
_version_ | 1816882369080066048 |
adam_text | |
any_adam_object | |
author | Horton, John |
author_facet | Horton, John |
author_role | aut |
author_sort | Horton, John |
author_variant | j h jh |
building | Verbundindex |
bvnumber | localFWS |
callnumber-first | Q - Science |
callnumber-label | QA76 |
callnumber-raw | QA76.73.C153 |
callnumber-search | QA76.73.C153 |
callnumber-sort | QA 276.73 C153 |
callnumber-subject | QA - Mathematics |
collection | ZDB-4-EBA |
contents | Cover -- Credits -- About the Author -- Copyright -- About the Reviewer -- www.PacktPub.com -- Table of Contents -- Preface -- Chapter 1: C++, SFML, Visual Studio, and Starting the First Game -- The games -- Timber!!! -- Zombie Arena -- Thomas was Late -- Meet C++ -- Microsoft Visual Studio -- SFML -- Setting up the development environment -- What about Mac and Linux? -- Installing Visual Studio Express 2015 on your desktop -- Setting up SFML -- Creating a reusable project template -- Planning Timber!!! -- Creating a project from the template -- Project assets -- Outsourcing assets -- Making your own sound FX -- Adding assets to the project -- Exploring assets -- Understanding screen and internal coordinates -- Starting to code the game -- Making code clearer with comments -- #including Windows essentials -- The main function -- Presentation and syntax -- Returning values from a function -- Running the game -- Opening a window using SFML -- #including SFML features -- OOP, classes, objects -- Using namespace sf -- SFML VideoMode and RenderWindow -- Running the game -- The main game loop -- While loops -- C-style code comments -- Input, update, draw, repeat -- Detecting a key press -- Clearing and drawing the scene -- Running the game -- Drawing the game background -- Preparing the sprite using a texture -- Double-buffering the background sprite -- Running the game -- Handling errors -- Configuration errors -- Compile errors -- Link errors -- Bugs -- FAQ -- Summary -- Chapter 2: Variables, Operators, and Decisions -- Animating Sprites -- C++ variables -- Types of variable -- Constants -- User-defined types -- Declaring and initializing variables -- Declaring variables -- Initializing variables -- Declaring and initializing in one step -- Declaring and initializing user-defined types -- Manipulating variables. C++ arithmetic and assignment operators -- Getting things done with expressions -- Adding clouds, a tree, and a buzzing bee -- Preparing the tree -- Preparing the bee -- Preparing the clouds -- Drawing the tree, the bee, and the clouds -- Random numbers -- Generating random numbers in C++ -- Making decisions with if and else -- Logical operators -- C++ if and else -- If they come over the bridge, shoot them! -- Or do this instead -- Reader challenge -- Timing -- The frame-rate problem -- The SFML frame-rate solution -- Moving the clouds and the bee -- Giving life to the bee -- Blowing the clouds -- FAQ -- Summary -- Chapter 3: C++ Strings, SFML Time, Player Input, and HUD -- Pausing and restarting the game -- C++ strings -- Declaring strings -- Assigning a value to strings -- Manipulating strings -- SFML Text and Font -- Adding a score and a message -- Adding a time bar -- FAQ -- Summary -- Chapter 4: Loops, Arrays, Switch, Enumerations, and Functions -- Implementing Game Mechanics -- Loops -- while loops -- Breaking out of a while loop -- for loops -- Arrays -- Declaring an array -- Initializing the elements of an array -- Quickly initializing the elements of an array -- So what do these arrays really do for our games? -- Making decisions with switch -- Class enumerations -- Getting started with functions -- Function return types -- Function names -- Function parameters -- The function body -- Function prototypes -- Organizing functions -- Function gotcha! -- Final word on functions -- for now -- Absolute final word on functions -- for now -- Growing the branches -- Preparing the branches -- Updating the branch sprites each frame -- Drawing the branches -- Moving the branches -- FAQ -- Summary -- Chapter 5: Collisions, Sound, and End Conditions -- Making the Game Playable -- Preparing the player (and other sprites). Drawing the player and other sprites -- Handling the player's input -- Handling setting up a new game -- Detecting the player chopping -- Detecting a key being released -- Animating the chopped logs and the ax -- Handling death -- Simple sound FX -- How SFML sound works? -- When to play the sounds -- Adding the sound code -- Improving the game and the code -- FAQ -- Summary -- Chapter 6: Object-Oriented Programming, Classes, and SFML Views -- Planning and starting the Zombie Arena game -- Creating a project from the template -- The project assets -- Exploring the assets -- Adding the assets to the project -- OOP -- What is OOP? -- Encapsulation -- Polymorphism -- Inheritance -- Why do it like this? -- What is a class? -- The class variable and function declarations -- The class function definitions -- Using an instance of a class -- Constructors and getter functions -- Jumping around in the code -- Building the Player-the first class -- Coding the Player class header file -- Coding the Player class function definitions -- Controlling the game camera with SFML View -- Starting the Zombie Arena game engine -- Managing the code files -- Starting coding the main game loop -- FAQ -- Summary -- Chapter 7: C++ References, Sprite Sheets, and Vertex Arrays -- C++ References -- References summary -- SFML vertex arrays and sprite sheets -- What is a sprite sheet? -- What is a vertex array? -- Building a background from tiles -- Building a vertex array -- Using the vertex array to draw -- Creating a randomly generated scrolling background -- Using the background -- FAQ -- Summary -- Chapter 8: Pointers, the Standard Template Library, and Texture Management -- Pointers -- Pointer syntax -- Declaring a pointer -- Initializing a pointer -- Reinitializing pointers -- Dereferencing a pointer -- Pointers are versatile and powerful -- Dynamically allocated memory. Passing a pointer to a function -- Declaring and using a pointer to an object -- Pointers and arrays -- Summary of pointers -- The Standard Template Library -- What is a Map -- Declaring a Map -- Adding data to a Map -- Finding data in a Map -- Removing data from a Map -- Checking the size of a Map -- Checking for keys in a Map -- Looping/iterating through the key-value pairs of a Map -- The auto keyword -- STL summary -- The TextureHolder Class -- Coding the TextureHolder header file -- Coding the TextureHolder function definitions -- What exactly have we achieved with TextureHolder? -- Building a horde of zombies -- Coding the Zombie.h file -- Coding the Zombie.cpp file -- Using the Zombie class to create a horde -- Bringing the horde to life (back to life) -- Using the TextureHolder class for all textures -- Change the way the background gets its textures -- Change the way Player gets its texture -- FAQ -- Summary -- Chapter 9: Collision Detection, Pickups, and Bullets -- Coding the Bullet class -- Coding the Bullet header file -- Coding the Bullet source file -- Making the bullets fly -- Including the Bullet class -- Control variables and the bullet array -- Reloading the gun -- Shooting a bullet -- Updating the bullets each frame -- Drawing the bullets each frame -- Giving the player a crosshair -- Coding a class for pickups -- Coding the Pickup header file -- Coding the Pickup class function definitions -- Using the Pickup class -- Detecting collisions -- Has a zombie been shot? -- Has the player been touched by a zombie? -- Has the player touched a pickup? -- FAQ -- Summary -- Chapter 10: Layering Views and Implementing the HUD -- Adding all the Text and HUD objects -- Updating the HUD each frame -- Drawing the HUD, and the home and level up screens -- FAQ -- Summary -- Chapter 11: Sound Effects, File I/O, and Finishing the Game. Saving and loading the high-score -- Preparing sound effects -- Leveling up -- Restarting the game -- Playing the rest of the sounds -- Adding sound effects while the player is reloading -- Make a shooting sound -- Play a sound when the player is hit -- Play a sound when getting a pickup -- Make a splat sound when a zombie is shot -- FAQ -- Summary -- Chapter 12: Abstraction and Code Management -- Making Better Use of OOP -- The Thomas Was Late game -- Features of Thomas Was Late -- Creating a project from the template -- The project assets -- Game level designs -- GLSL Shaders -- The graphical assets close-up -- The sound assets close-up -- Adding the assets to the project -- Structuring the Thomas Was Late code -- Building the game engine -- Reusing the TextureHolder class -- Coding Engine.h -- Coding Engine.cpp -- Coding the Engine class constructor definition -- Coding the run function definition -- Coding the input function definition -- Coding the update function definition -- Coding the draw function definition -- The Engine class so far -- Coding the main function -- FAQ -- Summary -- Chapter 13: Advanced OOP -- Inheritance and Polymorphism -- Inheritance -- Extending a class -- Polymorphism -- Abstract classes -- virtual and pure virtual functions -- Building the PlayableCharacter class -- Coding PlayableCharacter.h -- Coding PlayableCharacter.cpp -- Building the Thomas and Bob classes -- Coding Thomas.h -- Coding Thomas.cpp -- Coding Bob.h -- Coding Bob.cpp -- Updating the game engine to use Thomas and Bob -- Updating Engine.h to add an instance of Bob and Thomas -- Updating the input function to control Thomas and Bob -- Updating the update function to spawn and update the PlayableCharacter instances -- Spawning Thomas and Bob -- Updating Thomas and Bob each frame -- Drawing Bob and Thomas -- FAQ -- Summary. |
ctrlnum | (OCoLC)962419845 |
dewey-full | 794.81526 |
dewey-hundreds | 700 - The arts |
dewey-ones | 794 - Indoor games of skill |
dewey-raw | 794.81526 |
dewey-search | 794.81526 |
dewey-sort | 3794.81526 |
dewey-tens | 790 - Recreational and performing arts |
discipline | Sport |
format | Electronic eBook |
fullrecord | <?xml version="1.0" encoding="UTF-8"?><collection xmlns="http://www.loc.gov/MARC21/slim"><record><leader>14316cam a2200589 i 4500</leader><controlfield tag="001">ZDB-4-EBA-ocn962419845</controlfield><controlfield tag="003">OCoLC</controlfield><controlfield tag="005">20241004212047.0</controlfield><controlfield tag="006">m o d </controlfield><controlfield tag="007">cr unu||||||||</controlfield><controlfield tag="008">161111s2016 enka o 000 0 eng d</controlfield><datafield tag="040" ind1=" " ind2=" "><subfield code="a">UMI</subfield><subfield code="b">eng</subfield><subfield code="e">rda</subfield><subfield code="e">pn</subfield><subfield code="c">UMI</subfield><subfield code="d">IDEBK</subfield><subfield code="d">OCLCF</subfield><subfield code="d">STF</subfield><subfield code="d">DEBBG</subfield><subfield code="d">DEBSZ</subfield><subfield code="d">OCLCQ</subfield><subfield code="d">COO</subfield><subfield code="d">VT2</subfield><subfield code="d">OCLCO</subfield><subfield code="d">UOK</subfield><subfield code="d">CEF</subfield><subfield code="d">KSU</subfield><subfield code="d">WYU</subfield><subfield code="d">YDX</subfield><subfield code="d">N$T</subfield><subfield code="d">AGLDB</subfield><subfield code="d">IGB</subfield><subfield code="d">QGK</subfield><subfield code="d">OCLCO</subfield><subfield code="d">OCLCQ</subfield><subfield code="d">OCL</subfield><subfield code="d">OCLCO</subfield><subfield code="d">OCLCL</subfield><subfield code="d">OCLCQ</subfield><subfield code="d">DXU</subfield><subfield code="d">OCLCQ</subfield></datafield><datafield tag="020" ind1=" " ind2=" "><subfield code="a">1786467771</subfield></datafield><datafield tag="020" ind1=" " ind2=" "><subfield code="a">1786466198</subfield></datafield><datafield tag="020" ind1=" " ind2=" "><subfield code="a">9781786466198</subfield></datafield><datafield tag="020" ind1=" " ind2=" "><subfield code="a">9781786467775</subfield><subfield code="q">(electronic bk.)</subfield></datafield><datafield tag="035" ind1=" " ind2=" "><subfield code="a">(OCoLC)962419845</subfield></datafield><datafield tag="037" ind1=" " ind2=" "><subfield code="a">CL0500000800</subfield><subfield code="b">Safari Books Online</subfield></datafield><datafield tag="050" ind1=" " ind2="4"><subfield code="a">QA76.73.C153</subfield></datafield><datafield tag="072" ind1=" " ind2="7"><subfield code="a">GAM</subfield><subfield code="x">001000</subfield><subfield code="2">bisacsh</subfield></datafield><datafield tag="082" ind1="7" ind2=" "><subfield code="a">794.81526</subfield><subfield code="2">23</subfield></datafield><datafield tag="049" ind1=" " ind2=" "><subfield code="a">MAIN</subfield></datafield><datafield tag="100" ind1="1" ind2=" "><subfield code="a">Horton, John,</subfield><subfield code="e">author.</subfield></datafield><datafield tag="245" ind1="1" ind2="0"><subfield code="a">Beginning C++ game programming :</subfield><subfield code="b">learn C++ from scratch and get started building your very own games /</subfield><subfield code="c">John Horton.</subfield></datafield><datafield tag="246" ind1="3" ind2=" "><subfield code="a">Beginning C plus plus game programming</subfield></datafield><datafield tag="264" ind1=" " ind2="1"><subfield code="a">Birmingham, UK :</subfield><subfield code="b">Packt Publishing,</subfield><subfield code="c">2016.</subfield></datafield><datafield tag="300" ind1=" " ind2=" "><subfield code="a">1 online resource (1 volume) :</subfield><subfield code="b">illustrations</subfield></datafield><datafield tag="336" ind1=" " ind2=" "><subfield code="a">text</subfield><subfield code="b">txt</subfield><subfield code="2">rdacontent</subfield></datafield><datafield tag="337" ind1=" " ind2=" "><subfield code="a">computer</subfield><subfield code="b">c</subfield><subfield code="2">rdamedia</subfield></datafield><datafield tag="338" ind1=" " ind2=" "><subfield code="a">online resource</subfield><subfield code="b">cr</subfield><subfield code="2">rdacarrier</subfield></datafield><datafield tag="490" ind1="1" ind2=" "><subfield code="a">Community Experience Distilled</subfield></datafield><datafield tag="588" ind1=" " ind2=" "><subfield code="a">Description based on online resource; title from cover (Safari, viewed November 11, 2016).</subfield></datafield><datafield tag="520" ind1=" " ind2=" "><subfield code="a">Learn C++ from scratch and get started building your very own games About This Book This book offers a fun way to learn modern C++ programming while building exciting 2D games This beginner-friendly guide offers a fast-paced but engaging approach to game development Dive headfirst into building a wide variety of desktop games that gradually increase in complexity It is packed with many suggestions to expand your finished games that will make you think critically, technically, and creatively Who This Book Is For This book is perfect for you if any of the following describes you: You have no C++ programming knowledge whatsoever or need a beginner level refresher course, if you want to learn to build games or just use games as an engaging way to learn C++, if you have aspirations to publish a game one day, perhaps on Steam, or if you just want to have loads of fun and impress friends with your creations. What You Will Learn Get to know C++ from scratch while simultaneously learning game building Learn the basics of C++, such as variables, loops, and functions to animate game objects, respond to collisions, keep score, play sound effects, and build your first playable game. Use more advanced C++ topics such as classes, inheritance, and references to spawn and control thousands of enemies, shoot with a rapid fire machine gun, and realize random scrolling game-worlds Stretch your C++ knowledge beyond the beginner level and use concepts such as pointers, references, and the Standard Template Library to add features like split-screen coop, immersive directional sound, and custom levels loaded from level-design files Get ready to go and build your own unique games! In Detail This book is all about offering you a fun introduction to the world of game programming, C++, and the OpenGL-powered SFML using three fun, fully-playable games. These games are an addictive frantic two-button tapper, a multi-level zombie survival shooter, and a split-screen multiplayer puzzle-platformer. We will start with the very basics of programming, such as variables, loops, and conditions and you will become more skillful with each game as you move through the key C++ topics, such as OOP (Object-Orientated Programming), C++ pointers, and an introduction to the Standard Template Library. While building these games, you will also learn exciting game programming concepts like particle effects, directional sound (spatialization), OpenGL programmable Shaders, spawning thousands of...</subfield></datafield><datafield tag="505" ind1="0" ind2=" "><subfield code="a">Cover -- Credits -- About the Author -- Copyright -- About the Reviewer -- www.PacktPub.com -- Table of Contents -- Preface -- Chapter 1: C++, SFML, Visual Studio, and Starting the First Game -- The games -- Timber!!! -- Zombie Arena -- Thomas was Late -- Meet C++ -- Microsoft Visual Studio -- SFML -- Setting up the development environment -- What about Mac and Linux? -- Installing Visual Studio Express 2015 on your desktop -- Setting up SFML -- Creating a reusable project template -- Planning Timber!!! -- Creating a project from the template -- Project assets -- Outsourcing assets -- Making your own sound FX -- Adding assets to the project -- Exploring assets -- Understanding screen and internal coordinates -- Starting to code the game -- Making code clearer with comments -- #including Windows essentials -- The main function -- Presentation and syntax -- Returning values from a function -- Running the game -- Opening a window using SFML -- #including SFML features -- OOP, classes, objects -- Using namespace sf -- SFML VideoMode and RenderWindow -- Running the game -- The main game loop -- While loops -- C-style code comments -- Input, update, draw, repeat -- Detecting a key press -- Clearing and drawing the scene -- Running the game -- Drawing the game background -- Preparing the sprite using a texture -- Double-buffering the background sprite -- Running the game -- Handling errors -- Configuration errors -- Compile errors -- Link errors -- Bugs -- FAQ -- Summary -- Chapter 2: Variables, Operators, and Decisions -- Animating Sprites -- C++ variables -- Types of variable -- Constants -- User-defined types -- Declaring and initializing variables -- Declaring variables -- Initializing variables -- Declaring and initializing in one step -- Declaring and initializing user-defined types -- Manipulating variables.</subfield></datafield><datafield tag="505" ind1="8" ind2=" "><subfield code="a">C++ arithmetic and assignment operators -- Getting things done with expressions -- Adding clouds, a tree, and a buzzing bee -- Preparing the tree -- Preparing the bee -- Preparing the clouds -- Drawing the tree, the bee, and the clouds -- Random numbers -- Generating random numbers in C++ -- Making decisions with if and else -- Logical operators -- C++ if and else -- If they come over the bridge, shoot them! -- Or do this instead -- Reader challenge -- Timing -- The frame-rate problem -- The SFML frame-rate solution -- Moving the clouds and the bee -- Giving life to the bee -- Blowing the clouds -- FAQ -- Summary -- Chapter 3: C++ Strings, SFML Time, Player Input, and HUD -- Pausing and restarting the game -- C++ strings -- Declaring strings -- Assigning a value to strings -- Manipulating strings -- SFML Text and Font -- Adding a score and a message -- Adding a time bar -- FAQ -- Summary -- Chapter 4: Loops, Arrays, Switch, Enumerations, and Functions -- Implementing Game Mechanics -- Loops -- while loops -- Breaking out of a while loop -- for loops -- Arrays -- Declaring an array -- Initializing the elements of an array -- Quickly initializing the elements of an array -- So what do these arrays really do for our games? -- Making decisions with switch -- Class enumerations -- Getting started with functions -- Function return types -- Function names -- Function parameters -- The function body -- Function prototypes -- Organizing functions -- Function gotcha! -- Final word on functions -- for now -- Absolute final word on functions -- for now -- Growing the branches -- Preparing the branches -- Updating the branch sprites each frame -- Drawing the branches -- Moving the branches -- FAQ -- Summary -- Chapter 5: Collisions, Sound, and End Conditions -- Making the Game Playable -- Preparing the player (and other sprites).</subfield></datafield><datafield tag="505" ind1="8" ind2=" "><subfield code="a">Drawing the player and other sprites -- Handling the player's input -- Handling setting up a new game -- Detecting the player chopping -- Detecting a key being released -- Animating the chopped logs and the ax -- Handling death -- Simple sound FX -- How SFML sound works? -- When to play the sounds -- Adding the sound code -- Improving the game and the code -- FAQ -- Summary -- Chapter 6: Object-Oriented Programming, Classes, and SFML Views -- Planning and starting the Zombie Arena game -- Creating a project from the template -- The project assets -- Exploring the assets -- Adding the assets to the project -- OOP -- What is OOP? -- Encapsulation -- Polymorphism -- Inheritance -- Why do it like this? -- What is a class? -- The class variable and function declarations -- The class function definitions -- Using an instance of a class -- Constructors and getter functions -- Jumping around in the code -- Building the Player-the first class -- Coding the Player class header file -- Coding the Player class function definitions -- Controlling the game camera with SFML View -- Starting the Zombie Arena game engine -- Managing the code files -- Starting coding the main game loop -- FAQ -- Summary -- Chapter 7: C++ References, Sprite Sheets, and Vertex Arrays -- C++ References -- References summary -- SFML vertex arrays and sprite sheets -- What is a sprite sheet? -- What is a vertex array? -- Building a background from tiles -- Building a vertex array -- Using the vertex array to draw -- Creating a randomly generated scrolling background -- Using the background -- FAQ -- Summary -- Chapter 8: Pointers, the Standard Template Library, and Texture Management -- Pointers -- Pointer syntax -- Declaring a pointer -- Initializing a pointer -- Reinitializing pointers -- Dereferencing a pointer -- Pointers are versatile and powerful -- Dynamically allocated memory.</subfield></datafield><datafield tag="505" ind1="8" ind2=" "><subfield code="a">Passing a pointer to a function -- Declaring and using a pointer to an object -- Pointers and arrays -- Summary of pointers -- The Standard Template Library -- What is a Map -- Declaring a Map -- Adding data to a Map -- Finding data in a Map -- Removing data from a Map -- Checking the size of a Map -- Checking for keys in a Map -- Looping/iterating through the key-value pairs of a Map -- The auto keyword -- STL summary -- The TextureHolder Class -- Coding the TextureHolder header file -- Coding the TextureHolder function definitions -- What exactly have we achieved with TextureHolder? -- Building a horde of zombies -- Coding the Zombie.h file -- Coding the Zombie.cpp file -- Using the Zombie class to create a horde -- Bringing the horde to life (back to life) -- Using the TextureHolder class for all textures -- Change the way the background gets its textures -- Change the way Player gets its texture -- FAQ -- Summary -- Chapter 9: Collision Detection, Pickups, and Bullets -- Coding the Bullet class -- Coding the Bullet header file -- Coding the Bullet source file -- Making the bullets fly -- Including the Bullet class -- Control variables and the bullet array -- Reloading the gun -- Shooting a bullet -- Updating the bullets each frame -- Drawing the bullets each frame -- Giving the player a crosshair -- Coding a class for pickups -- Coding the Pickup header file -- Coding the Pickup class function definitions -- Using the Pickup class -- Detecting collisions -- Has a zombie been shot? -- Has the player been touched by a zombie? -- Has the player touched a pickup? -- FAQ -- Summary -- Chapter 10: Layering Views and Implementing the HUD -- Adding all the Text and HUD objects -- Updating the HUD each frame -- Drawing the HUD, and the home and level up screens -- FAQ -- Summary -- Chapter 11: Sound Effects, File I/O, and Finishing the Game.</subfield></datafield><datafield tag="505" ind1="8" ind2=" "><subfield code="a">Saving and loading the high-score -- Preparing sound effects -- Leveling up -- Restarting the game -- Playing the rest of the sounds -- Adding sound effects while the player is reloading -- Make a shooting sound -- Play a sound when the player is hit -- Play a sound when getting a pickup -- Make a splat sound when a zombie is shot -- FAQ -- Summary -- Chapter 12: Abstraction and Code Management -- Making Better Use of OOP -- The Thomas Was Late game -- Features of Thomas Was Late -- Creating a project from the template -- The project assets -- Game level designs -- GLSL Shaders -- The graphical assets close-up -- The sound assets close-up -- Adding the assets to the project -- Structuring the Thomas Was Late code -- Building the game engine -- Reusing the TextureHolder class -- Coding Engine.h -- Coding Engine.cpp -- Coding the Engine class constructor definition -- Coding the run function definition -- Coding the input function definition -- Coding the update function definition -- Coding the draw function definition -- The Engine class so far -- Coding the main function -- FAQ -- Summary -- Chapter 13: Advanced OOP -- Inheritance and Polymorphism -- Inheritance -- Extending a class -- Polymorphism -- Abstract classes -- virtual and pure virtual functions -- Building the PlayableCharacter class -- Coding PlayableCharacter.h -- Coding PlayableCharacter.cpp -- Building the Thomas and Bob classes -- Coding Thomas.h -- Coding Thomas.cpp -- Coding Bob.h -- Coding Bob.cpp -- Updating the game engine to use Thomas and Bob -- Updating Engine.h to add an instance of Bob and Thomas -- Updating the input function to control Thomas and Bob -- Updating the update function to spawn and update the PlayableCharacter instances -- Spawning Thomas and Bob -- Updating Thomas and Bob each frame -- Drawing Bob and Thomas -- FAQ -- Summary.</subfield></datafield><datafield tag="650" ind1=" " ind2="0"><subfield code="a">C++ (Computer program language)</subfield><subfield code="0">http://id.loc.gov/authorities/subjects/sh87007505</subfield></datafield><datafield tag="650" ind1=" " ind2="0"><subfield code="a">Video games</subfield><subfield code="x">Programming.</subfield><subfield code="0">http://id.loc.gov/authorities/subjects/sh95003476</subfield></datafield><datafield tag="650" ind1=" " ind2="6"><subfield code="a">C++ (Langage de programmation)</subfield></datafield><datafield tag="650" ind1=" " ind2="6"><subfield code="a">Jeux vidéo</subfield><subfield code="x">Programmation.</subfield></datafield><datafield tag="650" ind1=" " ind2="7"><subfield code="a">GAMES / Board</subfield><subfield code="2">bisacsh</subfield></datafield><datafield tag="650" ind1=" " ind2="7"><subfield code="a">C++ (Computer program language)</subfield><subfield code="2">fast</subfield></datafield><datafield tag="650" ind1=" " ind2="7"><subfield code="a">Video games</subfield><subfield code="x">Programming</subfield><subfield code="2">fast</subfield></datafield><datafield tag="776" ind1="0" ind2="8"><subfield code="i">Print version:</subfield><subfield code="a">Horton, John.</subfield><subfield code="t">Beginning C++ game programming : learn C++ from scratch and get started building your very own games.</subfield><subfield code="d">Birmingham, England : Packt Publishing, c2016</subfield><subfield code="h">x, 492 pages</subfield><subfield code="k">Community experience distilled.</subfield><subfield code="z">9781786466198</subfield></datafield><datafield tag="830" ind1=" " ind2="0"><subfield code="a">Community experience distilled.</subfield><subfield code="0">http://id.loc.gov/authorities/names/no2011030603</subfield></datafield><datafield tag="856" ind1="4" ind2="0"><subfield code="l">FWS01</subfield><subfield code="p">ZDB-4-EBA</subfield><subfield code="q">FWS_PDA_EBA</subfield><subfield code="u">https://search.ebscohost.com/login.aspx?direct=true&scope=site&db=nlebk&AN=1399497</subfield><subfield code="3">Volltext</subfield></datafield><datafield tag="938" ind1=" " ind2=" "><subfield code="a">YBP Library Services</subfield><subfield code="b">YANK</subfield><subfield code="n">13231713</subfield></datafield><datafield tag="938" ind1=" " ind2=" "><subfield code="a">ProQuest MyiLibrary Digital eBook Collection</subfield><subfield code="b">IDEB</subfield><subfield code="n">cis34561625</subfield></datafield><datafield tag="938" ind1=" " ind2=" "><subfield code="a">EBSCOhost</subfield><subfield code="b">EBSC</subfield><subfield code="n">1399497</subfield></datafield><datafield tag="994" ind1=" " ind2=" "><subfield code="a">92</subfield><subfield code="b">GEBAY</subfield></datafield><datafield tag="912" ind1=" " ind2=" "><subfield code="a">ZDB-4-EBA</subfield></datafield><datafield tag="049" ind1=" " ind2=" "><subfield code="a">DE-863</subfield></datafield></record></collection> |
id | ZDB-4-EBA-ocn962419845 |
illustrated | Illustrated |
indexdate | 2024-11-27T13:27:31Z |
institution | BVB |
isbn | 1786467771 1786466198 9781786466198 9781786467775 |
language | English |
oclc_num | 962419845 |
open_access_boolean | |
owner | MAIN DE-863 DE-BY-FWS |
owner_facet | MAIN DE-863 DE-BY-FWS |
physical | 1 online resource (1 volume) : illustrations |
psigel | ZDB-4-EBA |
publishDate | 2016 |
publishDateSearch | 2016 |
publishDateSort | 2016 |
publisher | Packt Publishing, |
record_format | marc |
series | Community experience distilled. |
series2 | Community Experience Distilled |
spelling | Horton, John, author. Beginning C++ game programming : learn C++ from scratch and get started building your very own games / John Horton. Beginning C plus plus game programming Birmingham, UK : Packt Publishing, 2016. 1 online resource (1 volume) : illustrations text txt rdacontent computer c rdamedia online resource cr rdacarrier Community Experience Distilled Description based on online resource; title from cover (Safari, viewed November 11, 2016). Learn C++ from scratch and get started building your very own games About This Book This book offers a fun way to learn modern C++ programming while building exciting 2D games This beginner-friendly guide offers a fast-paced but engaging approach to game development Dive headfirst into building a wide variety of desktop games that gradually increase in complexity It is packed with many suggestions to expand your finished games that will make you think critically, technically, and creatively Who This Book Is For This book is perfect for you if any of the following describes you: You have no C++ programming knowledge whatsoever or need a beginner level refresher course, if you want to learn to build games or just use games as an engaging way to learn C++, if you have aspirations to publish a game one day, perhaps on Steam, or if you just want to have loads of fun and impress friends with your creations. What You Will Learn Get to know C++ from scratch while simultaneously learning game building Learn the basics of C++, such as variables, loops, and functions to animate game objects, respond to collisions, keep score, play sound effects, and build your first playable game. Use more advanced C++ topics such as classes, inheritance, and references to spawn and control thousands of enemies, shoot with a rapid fire machine gun, and realize random scrolling game-worlds Stretch your C++ knowledge beyond the beginner level and use concepts such as pointers, references, and the Standard Template Library to add features like split-screen coop, immersive directional sound, and custom levels loaded from level-design files Get ready to go and build your own unique games! In Detail This book is all about offering you a fun introduction to the world of game programming, C++, and the OpenGL-powered SFML using three fun, fully-playable games. These games are an addictive frantic two-button tapper, a multi-level zombie survival shooter, and a split-screen multiplayer puzzle-platformer. We will start with the very basics of programming, such as variables, loops, and conditions and you will become more skillful with each game as you move through the key C++ topics, such as OOP (Object-Orientated Programming), C++ pointers, and an introduction to the Standard Template Library. While building these games, you will also learn exciting game programming concepts like particle effects, directional sound (spatialization), OpenGL programmable Shaders, spawning thousands of... Cover -- Credits -- About the Author -- Copyright -- About the Reviewer -- www.PacktPub.com -- Table of Contents -- Preface -- Chapter 1: C++, SFML, Visual Studio, and Starting the First Game -- The games -- Timber!!! -- Zombie Arena -- Thomas was Late -- Meet C++ -- Microsoft Visual Studio -- SFML -- Setting up the development environment -- What about Mac and Linux? -- Installing Visual Studio Express 2015 on your desktop -- Setting up SFML -- Creating a reusable project template -- Planning Timber!!! -- Creating a project from the template -- Project assets -- Outsourcing assets -- Making your own sound FX -- Adding assets to the project -- Exploring assets -- Understanding screen and internal coordinates -- Starting to code the game -- Making code clearer with comments -- #including Windows essentials -- The main function -- Presentation and syntax -- Returning values from a function -- Running the game -- Opening a window using SFML -- #including SFML features -- OOP, classes, objects -- Using namespace sf -- SFML VideoMode and RenderWindow -- Running the game -- The main game loop -- While loops -- C-style code comments -- Input, update, draw, repeat -- Detecting a key press -- Clearing and drawing the scene -- Running the game -- Drawing the game background -- Preparing the sprite using a texture -- Double-buffering the background sprite -- Running the game -- Handling errors -- Configuration errors -- Compile errors -- Link errors -- Bugs -- FAQ -- Summary -- Chapter 2: Variables, Operators, and Decisions -- Animating Sprites -- C++ variables -- Types of variable -- Constants -- User-defined types -- Declaring and initializing variables -- Declaring variables -- Initializing variables -- Declaring and initializing in one step -- Declaring and initializing user-defined types -- Manipulating variables. C++ arithmetic and assignment operators -- Getting things done with expressions -- Adding clouds, a tree, and a buzzing bee -- Preparing the tree -- Preparing the bee -- Preparing the clouds -- Drawing the tree, the bee, and the clouds -- Random numbers -- Generating random numbers in C++ -- Making decisions with if and else -- Logical operators -- C++ if and else -- If they come over the bridge, shoot them! -- Or do this instead -- Reader challenge -- Timing -- The frame-rate problem -- The SFML frame-rate solution -- Moving the clouds and the bee -- Giving life to the bee -- Blowing the clouds -- FAQ -- Summary -- Chapter 3: C++ Strings, SFML Time, Player Input, and HUD -- Pausing and restarting the game -- C++ strings -- Declaring strings -- Assigning a value to strings -- Manipulating strings -- SFML Text and Font -- Adding a score and a message -- Adding a time bar -- FAQ -- Summary -- Chapter 4: Loops, Arrays, Switch, Enumerations, and Functions -- Implementing Game Mechanics -- Loops -- while loops -- Breaking out of a while loop -- for loops -- Arrays -- Declaring an array -- Initializing the elements of an array -- Quickly initializing the elements of an array -- So what do these arrays really do for our games? -- Making decisions with switch -- Class enumerations -- Getting started with functions -- Function return types -- Function names -- Function parameters -- The function body -- Function prototypes -- Organizing functions -- Function gotcha! -- Final word on functions -- for now -- Absolute final word on functions -- for now -- Growing the branches -- Preparing the branches -- Updating the branch sprites each frame -- Drawing the branches -- Moving the branches -- FAQ -- Summary -- Chapter 5: Collisions, Sound, and End Conditions -- Making the Game Playable -- Preparing the player (and other sprites). Drawing the player and other sprites -- Handling the player's input -- Handling setting up a new game -- Detecting the player chopping -- Detecting a key being released -- Animating the chopped logs and the ax -- Handling death -- Simple sound FX -- How SFML sound works? -- When to play the sounds -- Adding the sound code -- Improving the game and the code -- FAQ -- Summary -- Chapter 6: Object-Oriented Programming, Classes, and SFML Views -- Planning and starting the Zombie Arena game -- Creating a project from the template -- The project assets -- Exploring the assets -- Adding the assets to the project -- OOP -- What is OOP? -- Encapsulation -- Polymorphism -- Inheritance -- Why do it like this? -- What is a class? -- The class variable and function declarations -- The class function definitions -- Using an instance of a class -- Constructors and getter functions -- Jumping around in the code -- Building the Player-the first class -- Coding the Player class header file -- Coding the Player class function definitions -- Controlling the game camera with SFML View -- Starting the Zombie Arena game engine -- Managing the code files -- Starting coding the main game loop -- FAQ -- Summary -- Chapter 7: C++ References, Sprite Sheets, and Vertex Arrays -- C++ References -- References summary -- SFML vertex arrays and sprite sheets -- What is a sprite sheet? -- What is a vertex array? -- Building a background from tiles -- Building a vertex array -- Using the vertex array to draw -- Creating a randomly generated scrolling background -- Using the background -- FAQ -- Summary -- Chapter 8: Pointers, the Standard Template Library, and Texture Management -- Pointers -- Pointer syntax -- Declaring a pointer -- Initializing a pointer -- Reinitializing pointers -- Dereferencing a pointer -- Pointers are versatile and powerful -- Dynamically allocated memory. Passing a pointer to a function -- Declaring and using a pointer to an object -- Pointers and arrays -- Summary of pointers -- The Standard Template Library -- What is a Map -- Declaring a Map -- Adding data to a Map -- Finding data in a Map -- Removing data from a Map -- Checking the size of a Map -- Checking for keys in a Map -- Looping/iterating through the key-value pairs of a Map -- The auto keyword -- STL summary -- The TextureHolder Class -- Coding the TextureHolder header file -- Coding the TextureHolder function definitions -- What exactly have we achieved with TextureHolder? -- Building a horde of zombies -- Coding the Zombie.h file -- Coding the Zombie.cpp file -- Using the Zombie class to create a horde -- Bringing the horde to life (back to life) -- Using the TextureHolder class for all textures -- Change the way the background gets its textures -- Change the way Player gets its texture -- FAQ -- Summary -- Chapter 9: Collision Detection, Pickups, and Bullets -- Coding the Bullet class -- Coding the Bullet header file -- Coding the Bullet source file -- Making the bullets fly -- Including the Bullet class -- Control variables and the bullet array -- Reloading the gun -- Shooting a bullet -- Updating the bullets each frame -- Drawing the bullets each frame -- Giving the player a crosshair -- Coding a class for pickups -- Coding the Pickup header file -- Coding the Pickup class function definitions -- Using the Pickup class -- Detecting collisions -- Has a zombie been shot? -- Has the player been touched by a zombie? -- Has the player touched a pickup? -- FAQ -- Summary -- Chapter 10: Layering Views and Implementing the HUD -- Adding all the Text and HUD objects -- Updating the HUD each frame -- Drawing the HUD, and the home and level up screens -- FAQ -- Summary -- Chapter 11: Sound Effects, File I/O, and Finishing the Game. Saving and loading the high-score -- Preparing sound effects -- Leveling up -- Restarting the game -- Playing the rest of the sounds -- Adding sound effects while the player is reloading -- Make a shooting sound -- Play a sound when the player is hit -- Play a sound when getting a pickup -- Make a splat sound when a zombie is shot -- FAQ -- Summary -- Chapter 12: Abstraction and Code Management -- Making Better Use of OOP -- The Thomas Was Late game -- Features of Thomas Was Late -- Creating a project from the template -- The project assets -- Game level designs -- GLSL Shaders -- The graphical assets close-up -- The sound assets close-up -- Adding the assets to the project -- Structuring the Thomas Was Late code -- Building the game engine -- Reusing the TextureHolder class -- Coding Engine.h -- Coding Engine.cpp -- Coding the Engine class constructor definition -- Coding the run function definition -- Coding the input function definition -- Coding the update function definition -- Coding the draw function definition -- The Engine class so far -- Coding the main function -- FAQ -- Summary -- Chapter 13: Advanced OOP -- Inheritance and Polymorphism -- Inheritance -- Extending a class -- Polymorphism -- Abstract classes -- virtual and pure virtual functions -- Building the PlayableCharacter class -- Coding PlayableCharacter.h -- Coding PlayableCharacter.cpp -- Building the Thomas and Bob classes -- Coding Thomas.h -- Coding Thomas.cpp -- Coding Bob.h -- Coding Bob.cpp -- Updating the game engine to use Thomas and Bob -- Updating Engine.h to add an instance of Bob and Thomas -- Updating the input function to control Thomas and Bob -- Updating the update function to spawn and update the PlayableCharacter instances -- Spawning Thomas and Bob -- Updating Thomas and Bob each frame -- Drawing Bob and Thomas -- FAQ -- Summary. C++ (Computer program language) http://id.loc.gov/authorities/subjects/sh87007505 Video games Programming. http://id.loc.gov/authorities/subjects/sh95003476 C++ (Langage de programmation) Jeux vidéo Programmation. GAMES / Board bisacsh C++ (Computer program language) fast Video games Programming fast Print version: Horton, John. Beginning C++ game programming : learn C++ from scratch and get started building your very own games. Birmingham, England : Packt Publishing, c2016 x, 492 pages Community experience distilled. 9781786466198 Community experience distilled. http://id.loc.gov/authorities/names/no2011030603 FWS01 ZDB-4-EBA FWS_PDA_EBA https://search.ebscohost.com/login.aspx?direct=true&scope=site&db=nlebk&AN=1399497 Volltext |
spellingShingle | Horton, John Beginning C++ game programming : learn C++ from scratch and get started building your very own games / Community experience distilled. Cover -- Credits -- About the Author -- Copyright -- About the Reviewer -- www.PacktPub.com -- Table of Contents -- Preface -- Chapter 1: C++, SFML, Visual Studio, and Starting the First Game -- The games -- Timber!!! -- Zombie Arena -- Thomas was Late -- Meet C++ -- Microsoft Visual Studio -- SFML -- Setting up the development environment -- What about Mac and Linux? -- Installing Visual Studio Express 2015 on your desktop -- Setting up SFML -- Creating a reusable project template -- Planning Timber!!! -- Creating a project from the template -- Project assets -- Outsourcing assets -- Making your own sound FX -- Adding assets to the project -- Exploring assets -- Understanding screen and internal coordinates -- Starting to code the game -- Making code clearer with comments -- #including Windows essentials -- The main function -- Presentation and syntax -- Returning values from a function -- Running the game -- Opening a window using SFML -- #including SFML features -- OOP, classes, objects -- Using namespace sf -- SFML VideoMode and RenderWindow -- Running the game -- The main game loop -- While loops -- C-style code comments -- Input, update, draw, repeat -- Detecting a key press -- Clearing and drawing the scene -- Running the game -- Drawing the game background -- Preparing the sprite using a texture -- Double-buffering the background sprite -- Running the game -- Handling errors -- Configuration errors -- Compile errors -- Link errors -- Bugs -- FAQ -- Summary -- Chapter 2: Variables, Operators, and Decisions -- Animating Sprites -- C++ variables -- Types of variable -- Constants -- User-defined types -- Declaring and initializing variables -- Declaring variables -- Initializing variables -- Declaring and initializing in one step -- Declaring and initializing user-defined types -- Manipulating variables. C++ arithmetic and assignment operators -- Getting things done with expressions -- Adding clouds, a tree, and a buzzing bee -- Preparing the tree -- Preparing the bee -- Preparing the clouds -- Drawing the tree, the bee, and the clouds -- Random numbers -- Generating random numbers in C++ -- Making decisions with if and else -- Logical operators -- C++ if and else -- If they come over the bridge, shoot them! -- Or do this instead -- Reader challenge -- Timing -- The frame-rate problem -- The SFML frame-rate solution -- Moving the clouds and the bee -- Giving life to the bee -- Blowing the clouds -- FAQ -- Summary -- Chapter 3: C++ Strings, SFML Time, Player Input, and HUD -- Pausing and restarting the game -- C++ strings -- Declaring strings -- Assigning a value to strings -- Manipulating strings -- SFML Text and Font -- Adding a score and a message -- Adding a time bar -- FAQ -- Summary -- Chapter 4: Loops, Arrays, Switch, Enumerations, and Functions -- Implementing Game Mechanics -- Loops -- while loops -- Breaking out of a while loop -- for loops -- Arrays -- Declaring an array -- Initializing the elements of an array -- Quickly initializing the elements of an array -- So what do these arrays really do for our games? -- Making decisions with switch -- Class enumerations -- Getting started with functions -- Function return types -- Function names -- Function parameters -- The function body -- Function prototypes -- Organizing functions -- Function gotcha! -- Final word on functions -- for now -- Absolute final word on functions -- for now -- Growing the branches -- Preparing the branches -- Updating the branch sprites each frame -- Drawing the branches -- Moving the branches -- FAQ -- Summary -- Chapter 5: Collisions, Sound, and End Conditions -- Making the Game Playable -- Preparing the player (and other sprites). Drawing the player and other sprites -- Handling the player's input -- Handling setting up a new game -- Detecting the player chopping -- Detecting a key being released -- Animating the chopped logs and the ax -- Handling death -- Simple sound FX -- How SFML sound works? -- When to play the sounds -- Adding the sound code -- Improving the game and the code -- FAQ -- Summary -- Chapter 6: Object-Oriented Programming, Classes, and SFML Views -- Planning and starting the Zombie Arena game -- Creating a project from the template -- The project assets -- Exploring the assets -- Adding the assets to the project -- OOP -- What is OOP? -- Encapsulation -- Polymorphism -- Inheritance -- Why do it like this? -- What is a class? -- The class variable and function declarations -- The class function definitions -- Using an instance of a class -- Constructors and getter functions -- Jumping around in the code -- Building the Player-the first class -- Coding the Player class header file -- Coding the Player class function definitions -- Controlling the game camera with SFML View -- Starting the Zombie Arena game engine -- Managing the code files -- Starting coding the main game loop -- FAQ -- Summary -- Chapter 7: C++ References, Sprite Sheets, and Vertex Arrays -- C++ References -- References summary -- SFML vertex arrays and sprite sheets -- What is a sprite sheet? -- What is a vertex array? -- Building a background from tiles -- Building a vertex array -- Using the vertex array to draw -- Creating a randomly generated scrolling background -- Using the background -- FAQ -- Summary -- Chapter 8: Pointers, the Standard Template Library, and Texture Management -- Pointers -- Pointer syntax -- Declaring a pointer -- Initializing a pointer -- Reinitializing pointers -- Dereferencing a pointer -- Pointers are versatile and powerful -- Dynamically allocated memory. Passing a pointer to a function -- Declaring and using a pointer to an object -- Pointers and arrays -- Summary of pointers -- The Standard Template Library -- What is a Map -- Declaring a Map -- Adding data to a Map -- Finding data in a Map -- Removing data from a Map -- Checking the size of a Map -- Checking for keys in a Map -- Looping/iterating through the key-value pairs of a Map -- The auto keyword -- STL summary -- The TextureHolder Class -- Coding the TextureHolder header file -- Coding the TextureHolder function definitions -- What exactly have we achieved with TextureHolder? -- Building a horde of zombies -- Coding the Zombie.h file -- Coding the Zombie.cpp file -- Using the Zombie class to create a horde -- Bringing the horde to life (back to life) -- Using the TextureHolder class for all textures -- Change the way the background gets its textures -- Change the way Player gets its texture -- FAQ -- Summary -- Chapter 9: Collision Detection, Pickups, and Bullets -- Coding the Bullet class -- Coding the Bullet header file -- Coding the Bullet source file -- Making the bullets fly -- Including the Bullet class -- Control variables and the bullet array -- Reloading the gun -- Shooting a bullet -- Updating the bullets each frame -- Drawing the bullets each frame -- Giving the player a crosshair -- Coding a class for pickups -- Coding the Pickup header file -- Coding the Pickup class function definitions -- Using the Pickup class -- Detecting collisions -- Has a zombie been shot? -- Has the player been touched by a zombie? -- Has the player touched a pickup? -- FAQ -- Summary -- Chapter 10: Layering Views and Implementing the HUD -- Adding all the Text and HUD objects -- Updating the HUD each frame -- Drawing the HUD, and the home and level up screens -- FAQ -- Summary -- Chapter 11: Sound Effects, File I/O, and Finishing the Game. Saving and loading the high-score -- Preparing sound effects -- Leveling up -- Restarting the game -- Playing the rest of the sounds -- Adding sound effects while the player is reloading -- Make a shooting sound -- Play a sound when the player is hit -- Play a sound when getting a pickup -- Make a splat sound when a zombie is shot -- FAQ -- Summary -- Chapter 12: Abstraction and Code Management -- Making Better Use of OOP -- The Thomas Was Late game -- Features of Thomas Was Late -- Creating a project from the template -- The project assets -- Game level designs -- GLSL Shaders -- The graphical assets close-up -- The sound assets close-up -- Adding the assets to the project -- Structuring the Thomas Was Late code -- Building the game engine -- Reusing the TextureHolder class -- Coding Engine.h -- Coding Engine.cpp -- Coding the Engine class constructor definition -- Coding the run function definition -- Coding the input function definition -- Coding the update function definition -- Coding the draw function definition -- The Engine class so far -- Coding the main function -- FAQ -- Summary -- Chapter 13: Advanced OOP -- Inheritance and Polymorphism -- Inheritance -- Extending a class -- Polymorphism -- Abstract classes -- virtual and pure virtual functions -- Building the PlayableCharacter class -- Coding PlayableCharacter.h -- Coding PlayableCharacter.cpp -- Building the Thomas and Bob classes -- Coding Thomas.h -- Coding Thomas.cpp -- Coding Bob.h -- Coding Bob.cpp -- Updating the game engine to use Thomas and Bob -- Updating Engine.h to add an instance of Bob and Thomas -- Updating the input function to control Thomas and Bob -- Updating the update function to spawn and update the PlayableCharacter instances -- Spawning Thomas and Bob -- Updating Thomas and Bob each frame -- Drawing Bob and Thomas -- FAQ -- Summary. C++ (Computer program language) http://id.loc.gov/authorities/subjects/sh87007505 Video games Programming. http://id.loc.gov/authorities/subjects/sh95003476 C++ (Langage de programmation) Jeux vidéo Programmation. GAMES / Board bisacsh C++ (Computer program language) fast Video games Programming fast |
subject_GND | http://id.loc.gov/authorities/subjects/sh87007505 http://id.loc.gov/authorities/subjects/sh95003476 |
title | Beginning C++ game programming : learn C++ from scratch and get started building your very own games / |
title_alt | Beginning C plus plus game programming |
title_auth | Beginning C++ game programming : learn C++ from scratch and get started building your very own games / |
title_exact_search | Beginning C++ game programming : learn C++ from scratch and get started building your very own games / |
title_full | Beginning C++ game programming : learn C++ from scratch and get started building your very own games / John Horton. |
title_fullStr | Beginning C++ game programming : learn C++ from scratch and get started building your very own games / John Horton. |
title_full_unstemmed | Beginning C++ game programming : learn C++ from scratch and get started building your very own games / John Horton. |
title_short | Beginning C++ game programming : |
title_sort | beginning c game programming learn c from scratch and get started building your very own games |
title_sub | learn C++ from scratch and get started building your very own games / |
topic | C++ (Computer program language) http://id.loc.gov/authorities/subjects/sh87007505 Video games Programming. http://id.loc.gov/authorities/subjects/sh95003476 C++ (Langage de programmation) Jeux vidéo Programmation. GAMES / Board bisacsh C++ (Computer program language) fast Video games Programming fast |
topic_facet | C++ (Computer program language) Video games Programming. C++ (Langage de programmation) Jeux vidéo Programmation. GAMES / Board Video games Programming |
url | https://search.ebscohost.com/login.aspx?direct=true&scope=site&db=nlebk&AN=1399497 |
work_keys_str_mv | AT hortonjohn beginningcgameprogramminglearncfromscratchandgetstartedbuildingyourveryowngames AT hortonjohn beginningcplusplusgameprogramming |