Live data from Hacker News

How do I design a game from scratch? A primer on core loops

teamavocado.co

31–40 of 45 posts

Re: How do I design a game from scratch? A primer on core loops

#32
The article simplifies too much to be insightful. Looks like clickbait for hacker news ;-)

The core loop already being discussed in other comments.

The vertical slice is when you implement _a part_ of the game to be completely finished (like a demo). It's not a step that is always done after the horizontal slice, but might be done before, simultaneously or after.

In smaller projects neither of those two prototypes is fully implemented, rather it's the challenge of the developers to agree on a equal idea / concept of the project you are working on. The game design document is the documentation of these prototypes. Most often all these aspects are worked on in parallel. A change in mechanics influencing the visuals, a story element influencing the mechanics, etc. and vice versa.

Re: How do I design a game from scratch? A primer on core loops

#33
post #15

I've never designed games beyond tetris, could someone explain in a few words, what the architecture of a RPG looks like? Some assumptions that may be terribly wrong: - The user input loop (keyboard, mouse) is still the main loop somewhere at the very bottom. Or is it different in RPGs? - Spawn threads each with their own inner loop, for each complex agent. Not necessarily an OS thread, but something that has its mai…

I'm curious why you presume thread spawning is needed.

Re: How do I design a game from scratch? A primer on core loops

#34
post #14

I recommend handmade hero project to learn how to create a game from scratch

I would recommend a more flexible definition of "from scratch" that doesn't require reimplementing everything including the stdlib and which allows using libraries like SDL or GLFW or OpenGL so maybe you'll actually finish something.

I mean... Handmade Hero started in 2014. It's 2020. He still doesn't even have the basis for a game yet. It's a great source to learn theory and low level implementation details, but no one would actually approach making a game that way.

Re: How do I design a game from scratch? A primer on core loops

#35
post #19

Earlier quoted context omitted.

Also you can check games like quake, doom etc which have opened their source, they are all done like that.

Doom and Quake were created in the single-core era. I was just wondering if modern game design is different.

Here's an interesting presentation on Overwatch's ECS system, though he doesn't go into great detail in terms of multithreading, he points out how the design makes it easy to identify what parts of the system can be safely run in parallel.

https://www.youtube.com/watch?v=W3aieHjyNvw

Re: How do I design a game from scratch? A primer on core loops

#36
post #34
post #14

I recommend handmade hero project to learn how to create a game from scratch

I would recommend a more flexible definition of "from scratch" that doesn't require reimplementing everything including the stdlib and which allows using libraries like SDL or GLFW or OpenGL so maybe you'll actually finish something. I mean... Handmade Hero started in 2014. It's 2020. He still doesn't even have the basis for a game yet. It's a great source to learn theory and low level implementation details, but no…

The purpose of the project is to show how a high quality game can be created. It is educational project, finishing the game is not the main goal. The series are on ~600 episode. Which is around 800 hours. I don't think that is much considering that - until episode ~200 soft renderer was used to show how exactly rendering works, then he switched to openGL. - he is diving into complicated topics, like right now advanced light system. - ~50% or more of time is spent on detailed explanations.

Re: How do I design a game from scratch? A primer on core loops

#37
post #3

I really love this talk by Mary Rose Cook — she illustrates step-by-step how to code a game loop from scratch in 30 minutes. https://youtu.be/hbKN-9o5_Z0

This was awesome! I'm going to code this with my son this weekend! It's simple enough to comprehend and should allow us to code this in a few hours with his basic programming knowledge.

Re: How do I design a game from scratch? A primer on core loops

#38
post #36
post #34

Earlier quoted context omitted.

I would recommend a more flexible definition of "from scratch" that doesn't require reimplementing everything including the stdlib and which allows using libraries like SDL or GLFW or OpenGL so maybe you'll actually finish something. I mean... Handmade Hero started in 2014. It's 2020. He still doesn't even have the basis for a game yet. It's a great source to learn theory and low level implementation details, but no…

The purpose of the project is to show how a high quality game can be created. It is educational project, finishing the game is not the main goal. The series are on ~600 episode. Which is around 800 hours. I don't think that is much considering that - until episode ~200 soft renderer was used to show how exactly rendering works, then he switched to openGL. - he is diving into complicated topics, like right now advance…

A high quality game can be created in Unity, Unreal or Godot. No one needs to know how to implement a renderer from scratch to do that.

I'm not disputing that Handmade Hero is valuable - there is a lot of good theory and insight into process there, but what it does not teach is how to make a game.

Re: How do I design a game from scratch? A primer on core loops

#39
post #38
post #36

Earlier quoted context omitted.

The purpose of the project is to show how a high quality game can be created. It is educational project, finishing the game is not the main goal. The series are on ~600 episode. Which is around 800 hours. I don't think that is much considering that - until episode ~200 soft renderer was used to show how exactly rendering works, then he switched to openGL. - he is diving into complicated topics, like right now advance…

A high quality game can be created in Unity, Unreal or Godot. No one needs to know how to implement a renderer from scratch to do that. I'm not disputing that Handmade Hero is valuable - there is a lot of good theory and insight into process there, but what it does not teach is how to make a game.

I see, yes, agreed.

Re: How do I design a game from scratch? A primer on core loops

#40
post #33
post #15

I've never designed games beyond tetris, could someone explain in a few words, what the architecture of a RPG looks like? Some assumptions that may be terribly wrong: - The user input loop (keyboard, mouse) is still the main loop somewhere at the very bottom. Or is it different in RPGs? - Spawn threads each with their own inner loop, for each complex agent. Not necessarily an OS thread, but something that has its mai…

I'm curious why you presume thread spawning is needed.

Two reasons like I said elsewhere: (1) using multi-core architecture more efficiently and (2) eliminate state machines and use functional style instead, which is possible when you have threads (green, pseudo, OS threads, whatever) each with an execution stack. Functional code is more robust and is easier to write and maintain too.
Post reply on HN