Live data from Hacker News

Game Loop

gameprogrammingpatterns.com

1–10 of 58 posts

Re: Game Loop

#2
The book is overall excellent. I learned way more from it (and had way more fun) than I did ever reading something like the Gang of four or its various explanations.

Best book to learn programming patterns in general if you ask me

Re: Game Loop

#3

The book is overall excellent. I learned way more from it (and had way more fun) than I did ever reading something like the Gang of four or its various explanations. Best book to learn programming patterns in general if you ask me

I love this book as well. I think part of what makes it so good is that the patterns are discussed in a very domain-specific context and their usage is not overly abstracted. I often find it hard to see why a particular "widget" or "foo/bar" pattern or structure is used/useful, but when you put the examples in a very specific context like this, it's much easier to understand their value and remember why/when/how to use them.

I wish there were other Pattern and Software-Engineering books that discussed things in more domain-specific contexts, but I suspect game development is one of the few domains large enough, and with enough people looking for domain specific literature, to really warrant such a book.

Re: Game Loop

#4
Just a friendly reminder to aspiring gamedevs. Global Game Jam 2019 is happening this very weekend. Theme is: What Home Means To You. And there are plenty of teams currently streaming on Twitch. As well as a Discord chat ;)

https://globalgamejam.org/

Re: Game Loop

#5
Extrapolating up to one physics frame is still not a good solution, it will be noticeable.

For example a falling object will clip in the ground for tens of ms of displacement which is definitely visually significant.

A better solution is to either only interpolate and live with the additional frames of input latency (fine for a lot of games) or resimulate the next physics frame with the new player input, and live with the additional CPU overhead.

Re: Game Loop

#7
post #3

The book is overall excellent. I learned way more from it (and had way more fun) than I did ever reading something like the Gang of four or its various explanations. Best book to learn programming patterns in general if you ask me

I love this book as well. I think part of what makes it so good is that the patterns are discussed in a very domain-specific context and their usage is not overly abstracted. I often find it hard to see why a particular "widget" or "foo/bar" pattern or structure is used/useful, but when you put the examples in a very specific context like this, it's much easier to understand their value and remember why/when/how to u…

I couldn't agree more, although I'd take a step further and extend it to way more stuff: options, features, libraries, and even applications. Building up an index of knowledge generally help in deciding what tool or technique to reach for.

I'll often look at stuff and wonder: what is your purpose? In my experience, explanations without context aren't generally very useful. It's much easier to incorporate knowledge when you're first presented with a concrete example of a problem along with its solution, and then you're presented with the abstraction.

One of the most notorious examples I can think of is when someone tries to explain monads. For some reason people often start by providing a long mathematical definition, which is completely useless if you don't even understand the weird words being used. It's worth learning Haskell just for all the new concepts and ideas it'll expose you to, even though the syntax looks very unfamiliar at first.

Re: Game Loop

#8
Awesome comment from the FAQ:

Which version pays you the most?

First of all, thank you for caring about this! Since I self-published, I set the prices so that the royalties are about the same for each format. (I also get the lion’s share of the money since there’s no publisher taking a cut.)

Buy the format you want and I’ll get paid pretty much the same either way. If you want to give me money, but don’t actually want a physical book, consider giving it to a friend or your local library. I get money, you feel good, and someone gets a free book!

Re: Game Loop

#9
post #3

The book is overall excellent. I learned way more from it (and had way more fun) than I did ever reading something like the Gang of four or its various explanations. Best book to learn programming patterns in general if you ask me

I love this book as well. I think part of what makes it so good is that the patterns are discussed in a very domain-specific context and their usage is not overly abstracted. I often find it hard to see why a particular "widget" or "foo/bar" pattern or structure is used/useful, but when you put the examples in a very specific context like this, it's much easier to understand their value and remember why/when/how to u…

I similarly have difficulty learning a concept when it's presented using real-world metaphors that aren't often actually expressed via code. This is how object oriented programming was taught to me: imagine a door object, which contains methods open and close, and it contains a knob property, which is its own object with functions to turn left and right, and so forth. Once you're familiar with OOP this might seem like a good way to explain the concept, but without a specific application to apply it to, it's difficult to see the purpose.
Post reply on HN