Hacker News new | ask | show | jobs
by photon137 5121 days ago
NeHe's OpenGL tutorials used to be a good (although now kind of outdated) starting point. Shaders didn't use to exist back then. But still a good start:

http://nehe.gamedev.net/

A game engine is much more complex than a graphics engine. Maybe somebody can point to guides for creating physics/sound engines and AI/gameplay stuff as well?

3 comments

When I started learning I spent a lot of time reading NeHe tutorials. But modern OpenGL feels so far removed from those tutorials that it feels like learning a completely different API.

The best tutorials I've found for modern OpenGL is "Learning Modern 3D Graphics Programming" by Jason McKesson. The only problem I have with these tutorials is that there aren't enough! http://www.arcsynthesis.org/gltut/

I really appreciate all of the responses and have already put many of the recommended texts on my wishlist. (And I just bought Game Engine Architecture as well, too bad you didn't post an Amazon affiliate link for yourself!) But I just wanted to point out that since this tutorial is free, I immediately checked it out, and I am absolutely blown away. This will certainly keep me busy until GEA arrives! Thanks so much, it looks to be a great starting point for learning more.

Edit: I also wanted to point out that in the author's preface, he discusses what he considers the downside to most introductory texts and tutorials in 3D graphics programming - presenting "fixed functionality" that allows newcomers to more quickly use the tools at hand by abstracting much of the foundational information away.

While this is certainly useful for experienced developers learning a new derivative technology on top of what they already know, I have always found this approach for introductory stuff frustrating. At the end of the day I may come away pseudo-understanding a "higher level" concept, but ultimately much has been abstracted away and I am left ignorant and, as the author says, "Programming thus becomes akin to magical rituals: you put certain bits of code before other bits, and everything seems to work."

I wish I knew of more texts like this for other fields where over or premature abstraction could endanger comprehension. (For example, I know I would like to see a similar approach taken to other complex topics, like networking.)

Hey, glad I was able to give you some useful information! If you ever find yourself in Toronto, say, for an indie game jam (http://www.tojam.ca/home/default.asp hint hint), you can buy me a beer ;)

If you're looking for something lower level, the book you probably want is the white book - Computer Graphics: Principles and Practice. I have the 2nd edition from 1992, which is the still the standard intro graphics textbook for many CS departments. Though Amazon says there will be a 3rd edition coming out at the end of this year!

http://www.amazon.com/Computer-Graphics-Principles-Practice-...

Another highly recommended book (also recommended in another comment here) is Real-Time Rendering, but I've only used bits and pieces from this one, so I don't know how good it is for folks just starting out. Still probably one you'll want to add to your shelf if you continue on in the field.

http://www.amazon.com/Real-Time-Rendering-Tomas-MOller/dp/15...

Oh, and also also, head over to YouTube with some snacks and a drink, sit down, and watch the weekly Overgrowth game developer videos from Wolfire Games. It's both inspirational to see what other people are doing, and a great demo of concepts that you'll read about in GEA, such as animation blending: http://www.youtube.com/playlist?list=PLA17B3FAA1DA374F3&...

Although, when I go through the code, it feels more like a copy of the (legendary) Red Book. Missing vector/pixel (or fragment in GL-speak) shaders as well.
lovely, thanks!
If you want to know all of the math and functions involved in pushing individual pixels to the screen and building something along the lines of a Quake 2-level engine in software, this book is a pretty good introduction to it all:

http://www.amazon.com/Tricks-Programming-Gurus-Advanced-Grap...

Note that this is the type of programming now implemented in hardware GPUs, and in libraries such as DirectX and OpenGL. If you were to write a modern game, you would do it on top of one of these hardware-accelerated libraries, and you wouldn't be writing this type of code in software anymore. But if you really want to learn how to do these things from the "ground up", this book can help you build that foundation

It might be worthwhile to take a look at certain types of game engine architectures.

Since modularity is one of the keypoints of how this editor/game engine work so well together, it's probably a good idea to have some idea of how to structure game components to lessen the 'ball of mud' feeling.

I've been pretty fascinated with data-oriented "entity/component" systems for a while, as opposed to heavily inheritance based models. There's a decent introduction here: http://cowboyprogramming.com/2007/01/05/evolve-your-heirachy...

It seems like a lot of modern game engines (one example would be Unity) utilize this approach to varying degree.