Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Beginning C++ Game Programming

You're reading from   Beginning C++ Game Programming Learn C++ from scratch and get started building your very own games

Arrow left icon
Product type Paperback
Published in Oct 2016
Publisher Packt
ISBN-13 9781786466198
Length 520 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
John Horton John Horton
Author Profile Icon John Horton
John Horton
Arrow right icon
View More author details
Toc

Table of Contents (18) Chapters Close

Preface 1. C++, SFML, Visual Studio, and Starting the First Game FREE CHAPTER 2. Variables, Operators, and Decisions – Animating Sprites 3. C++ Strings, SFML Time, Player Input, and HUD 4. Loops, Arrays, Switch, Enumerations, and Functions – Implementing Game Mechanics 5. Collisions, Sound, and End Conditions – Making the Game Playable 6. Object-Oriented Programming, Classes, and SFML Views 7. C++ References, Sprite Sheets, and Vertex Arrays 8. Pointers, the Standard Template Library, and Texture Management 9. Collision Detection, Pickups, and Bullets 10. Layering Views and Implementing the HUD 11. Sound Effects, File I/O, and Finishing the Game 12. Abstraction and Code Management – Making Better Use of OOP 13. Advanced OOP – Inheritance and Polymorphism 14. Building Playable Levels and Collision Detection 15. Sound Spatialization and HUD 16. Extending SFML Classes, Particle Systems, and Shaders 17. Before you go...

The games

We will learn the fundamentals of the super-fast C++ language, a step at a time, and then put the new knowledge to use, so it should be fairly easy to add cool features to the three games we are building.

Tip

If you get stuck with any of the content in this chapter, take a look at the sections near the end Handling errors and FAQs.

These are our three projects for the book:

Timber!!!

The first game is an addictive, fast-paced clone of the hugely successful Timberman, which can be found at http://store.steampowered.com/app/398710/. Our game, Timber!!!, will introduce us to all the C++ basics at the same time as building a genuinely playable game. Here is what our version of the game will look like when we are done and we have added a few last-minute enhancements.

Timber!!!

Zombie Arena

Next, we will build a frantic, zombie survival shooter, not unlike the Steam hit, Over 9000 Zombies, which can be found at http://store.steampowered.com/app/273500/. The player will have a machine gun, and must fight off ever-growing waves of zombies. All this will take place in a randomly generated, scrolling world. To achieve this we will learn about object-oriented programming and how it enables us to have a large code base (lots of code) that is easy to write and maintain. Expect exciting features such as hundreds of enemies, rapid-fire weaponry, pick-ups, and a character that can be "leveled-up" after each wave.

Zombie Arena

Thomas was Late

The third game will be a stylish and challenging puzzle platformer, which can be played as a single player and coop. It is based on the very popular game, Thomas was Alone, which can be found at http://store.steampowered.com/app/220780/. Expect to learn about cool topics such as particle effects, OpenGL Shaders, and split-screen cooperative multiplayer features.

Thomas was Late

Tip

If you want to play any of the games now, you can do so from the download bundle in the Runnable Games folder. Just double-click on the appropriate .exe file. Notice that in this folder you can either run the completed games or any game in its partially completed state from any chapter.

Let's get started by introducing C++, Visual Studio, and SFML!

You have been reading a chapter from
Beginning C++ Game Programming
Published in: Oct 2016
Publisher: Packt
ISBN-13: 9781786466198
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime