An Amateur Look at Game Programming in C++_ Start to Finish


Hello everybody, I am Earth Otherwise and today, and for many days to come, I will be looking at the book "Game Programming in C++ Start to Finish" by Erik Yuzwa for the purpose of assisting both myself and others in the absorption of its ideas.

This exercise will act as a comment upon, criticism of, and supplement to the book itself as well as a kind of tutorial series using the book as a foundation. I will be reading out passages from the book but they will be quite abridged.

This first post will act as a kind of glossary for the series and the book.

Firstly, it should be noted that this book was published in 2006. Meaning that at the time it was using SDL 1.2 and OpenGL 2.0. At the writing of this post in 2017 we currently have SDL 2.0 and OpenGL 4.5 meaning that all of the specific code of the book is now depreciated. This is stacked on top of a review back in 2006 that says that the code was difficult to run even back then. I will be going into this assuming that all or almost all of the code in the book is completely useless.

However, other reviews and my own perusal find that the book has a fairly good grasp on the foundation and principals of making a game, and generally that knowledge is pretty timeless. So, my goal here is to look at the foundation, look at the original code and make sense of it so that I can help myself and hopefully help you to make video games.

The posts will be split into two types. Foundation posts which will be readings from the book and my thoughts. This will not be code specific, hopefully, so it should be useful for a long time to come. The second type will be code specific, using my own knowledge of OpenGL, SDL, and C++ to use the foundation knowledge to create a concrete program.

So, let's take a look at what we have in store for us. The book is split into twenty one chapters, each chapter having a number of sub-chapters.

The first chapter is on Game Technologies and includes some technologies that Yuzwa found useful including Concurrent Versioning Sstems, Doxygen, someting called InnoSetup, and the Standard Template Library for C++.

The second chapter is on Design Fundamentals like the Iterative Design that most games use and the classic waterfall design that most software used. It also gives an introduction of the Unified Modeling Language, which I'll have to look up, and some advice on notation. Then it goes onto the reusability of code and design, followed by the anatomy of a game and the design document for the game, an asteroids clone, that this game is using as the kind of end goal for itself. It then goes over a few other things that we'll get to when we get there.

The third chapter is looking at SDL and Windows. We'll look at this chapter, but since this is the old SDL that was talked about in this book, we'll either skip most of it or I'll look up the modern equivalents of what the books is talking about and I'll explain that. Or I might just point you to the makinggameswithben youtube series that I learned SDL from.

Chapter four is an introduction to the Peon Engine, the game engine that this game teaches us to make and use. Likely much of the specific code for this engine is useless, but we might be able to find some designs or code snippets that might be useful in the otherwise engine that I use, which I remind everyone is just a version of the Bengine from the selfsame youtube series.

Chapter five is on graphics Programming Mathamatics, and I've heard that this chapter is pretty good and goes in depth, talking about coordinate systems, fixed function geometry pipelines, bectory, and matrices. It also talks about opengl matrix stacks, something I'll have to look to to see if it's still relevant and usable or if there's a better option now. Following that there's Matrix multiplication, some text on transformations in 3D and 2D space, and some camera and view orientation.

Chapters six and seven are on OpenGL. Likely it will all either be out of date or useless. I'll read through it and also read through current OpenGL documentation in order to hopefully get the best understanding on OpenGL.

Chapter eight is about Scene Geometry Management. It talks about things like Depth Buffers, Frustrum Culling, rendering states, etc. Followed by the specific scene graph in the in book engine and Octrees.

Chapter nine is the graphics timebox, we'll get to that when we get there, but it's essentially about asking ourselves what we can do graphically and then measuring out what time we'll put into it.

Chapter ten is about input devices. We'll look at it, but I'll also be talking about how the current version of SDL handles getting inputs.

Chapter eleven and twelve are on sound. They introduce OpenAL. I'm not sure if I'll go to far into that, since I'm not familiar with OpenAL or if I'll even want to use it for sound.

Chapter thirteen is on Physics and collision. It talks about bounding boxes and spheres, plane and ray collisions, and implementing physics. The book uses something called the neSimulator but Ben used something with box physiscs. I will most likely look at other physiscs simulation tools for 2d and 3D games using C++.

Chapters fourteen and fifteen are on networking, something that I have zero experience in. This is require a lot of research, since I'm sure much of the code and perhaps even the ideas are not longer used. The chapter talks about peer to peer and client-server networks, directPlay and Winsock, the networking that SDL can do, serves, IPs, and server side prediction.

Chapter sixteen is about models including generating them, meshes, and something called collada. I get the feeling that much of this chapter is going to be useless.

Chapter seventeen is about animation and special effects. It covers bilboarding, skyboxes, object picking, particle systems, shockwaves and screenshots.

Chapter eighteen is on the OpenGL Shading Language. I will skim through this chapter but mostly do independent research on the topic.

Chapter nineteen is on Scripting, another thing that I have little experience with, though I have heard that scripting languages are incredibly important, unless of course you want to hard code every tiny detail into your game. I personally like to believe that versatility is something that should be looked for in video games, particularly pc indie titles.

The final two chapters are on polishing your game and tips for finishing your game. We'll read these pretty much in full, since they probably won't be very code heavy.

Twenty one chapters, three hundred and fifty pages, and no doubt dozens of videos. Well, let's get started. I will have released the first foundations video along with this introductory glossary and I will be putting all the videos on this subject in a playlist on youtube and they will be tagged the same way on my blog. Links to that playlist, the next post, and the amazon page for this book if you'd like to follow along more closely will be in the doobly doo if you're on youtube and at the bottom of the page if you're reading this on the blog.

Book: https://www.amazon.ca/Game-Programming-C-Start-Finish/dp/1584504323


▶️ DTube
▶️ IPFS

Coin Marketplace

STEEM 0.20
TRX 0.13
JST 0.030
BTC 65858.36
ETH 3493.88
USDT 1.00
SBD 2.53