OpenGL game development by example : design and code your own 2D and 3D games efficiently using OpenGL and C++ /
Design and code your own 2D and 3D games efficiently using OpenGL and C++About This Book Create 2D and 3D games completely, through a series of end-to-end game projects Learn to render high performance 2D and 3D graphics using OpenGL Implement a rudimentary game engine using step-by-step codeWho Thi...
Clasificación: | Libro Electrónico |
---|---|
Autores principales: | , |
Formato: | Electrónico eBook |
Idioma: | Inglés |
Publicado: |
Birmingham :
Packt Publishing,
2016.
|
Colección: | Community experience distilled.
|
Temas: | |
Acceso en línea: | Texto completo (Requiere registro previo con correo institucional) |
Tabla de Contenidos:
- Cover; Copyright; Credits; About the Authors; About the Reviewers; www.PacktPub.com; Table of Contents; Preface; Chapter 1: Building the Foundation; Introducing the development environment; A quick look at Visual Studio; Start screen; The Solution Explorer panel; The Standard Toolbar panel; The code window; The output window; Starting your project; The game loop; The game structure; Initialization; The game loop; Shutdown; Creating the game structure; Port of access; The Windows message loop; Introducing OpenGL; What is OpenGL?; The other GL; Downloading OpenGL; Adding OpenGL to the project
- Linking to the OpenGL librarySummary; Chapter 2: Your Point of View; Plotting your revenge; The OpenGL coordinate system; Making your point; Understanding the code; Running the program; Stretching your point; Getting primitive; A triangle by any other name; A primitive example; From triangles to models; Introducing textures; Using textures to fill the triangles; A matter of reference; Hanging out in the quad; Coding the quad; Rendering a texture; Loading the texture; Texture wrapping; Creating a textured quad; Putting the pieces together; Summary; Chapter 3: A Matter of Character
- Spritely speakingSprites versus non-sprites; Flipbook animation; Framed animation; Creating sprites; Working with PNGs; Linking to the SOIL library; Including the SOIL header file; Opening an image file; Coding a sprite class; Creating sprite frames; Saving each frame; Loading a sprite from individual textures; Creating a sprite sheet; Loading a sprite sheet; Loading our sprites; Rendering; Adding a render to the game loop; Implementing the main Render function; Implementing Render in the Sprite class; UV mapping; One more detail; A moving example; Adding update to the game loop
- Implementing the main Update callImplementing Update in the Sprite class; Character movement; Using delta time; Calculating delta time; Flipping; Scrolling the background; Using an atlas; Summary; Chapter 4: Control Freak; A penny for your input; The keyboard input; Using the mouse; Touch; Other inputs; Someone is listening; The WndProc event listener; Handling the message queue; Handling mouse and keyboard inputs; Creating the Input class; Virtual key codes; Querying for input; Implementing the Input class; Adding input to the game loop; Processing our input; Changes to the Sprite class
- Graphical User InterfaceCreating a button; Enhancing the Input class; Adding UI elements to the list; Checking each UI element; Pushing your buttons; Adding our pauseButton; State management; Creating a state manager; Pausing the game; Summary; Chapter 5: Hit and Run; Out of bounds!; Getting anchored; Collision rectangles; Embedding; Fixing the background; Collideables; Ready to score; A friend indeed; Time to spawn; Circular collision detection; The Pythagorean Theorem; Adding the circular collision code; Why use circular collision detection?; Wiring in the collision detection