Structured Game Programming. Self-reliance over abstraction.

Learn Game Programming, Free →
Joined November 2022
Ban DLSS
6
492
Dylan Falconer retweeted
Systems don't go just anywhere--they go in order. For example: Layer 0: Utils, Memory, OS Layer 1: Entities, Physics, Renderer Layer 2: Player, AI, Scenes Layer 3: Stats, Combat, Inventory Layer 4: Dialogue, Quests Systems below don't know about systems above them (usually--some are hard coupled, that's okay. This is a roadmap, not a blueprint) Unidirectional dependency preferred. Like an assembly line.
2
1
14
847
Systems don't go just anywhere--they go in order. For example: Layer 0: Utils, Memory, OS Layer 1: Entities, Physics, Renderer Layer 2: Player, AI, Scenes Layer 3: Stats, Combat, Inventory Layer 4: Dialogue, Quests Systems below don't know about systems above them (usually--some are hard coupled, that's okay. This is a roadmap, not a blueprint) Unidirectional dependency preferred. Like an assembly line.
2
1
14
847
If you are trying to scope your game, try this: Take one of the verbs, like "Explore" Ask, what do I need to build for this to make sense? Explore what? With what? -> Character controller, movement system, collision system 2D world? 3D world? What style? -> Scene system, asset pipeline, shaders One verb, 6 systems. Pull every thread until you can't ask any more questions. Then organise based on dependency.
2
6
734
Verb extraction: Figure out what the player can do in your game before writing a piece of code. Describe what the player does: "Explore a vast fantasy world. Battle monsters. Help people with their problems." Explore, Battle, Help What do you need to build for these? Now you have a starting point.
1
6
664
You followed all the clean code rules, but your game just dropped to 54 FPS. You just hit the 2-Week Wall. You followed all the rules are were penalised: - Dependencies: injected - Inheritance: predictable - Encapsulation: strict You profile it and realise every part of the game is slow. 1.5ms here, 2ms there. It all adds up to 17ms and your frame budget is blown. To fix this, you have to refactor your entire "clean" architecture. Not knowing where to start, you shelve the project. Again. It wasn't your fault. You were taught a paradigm that doesn't map to reality. Here is the first step you can take so you never abandon a game project for this reason again: bytesbeneath.com/p/725-faste…
1
7
811
There are no objects inside your computer. Just deterministic circuits executing instructions sequentially. Data stored in blocks of memory. That's the reality. If computers execute sequentially, your game shouldn't be a web of objects. It should be an assembly line. input → update → render This is the standard order across games for a reason. You've been fighting it.
3
3
38
2,985
How to speed up your game loop by 725% without writing a single micro-optimisation The Old Way (Object-Oriented): - Virtual methods - Single object instance mindset - Data and code live together--objects call into each other unpredictably The New Way (Structured): - Unidirectional data pipelines - Grouped lifetimes mindset - Data pushed through an assembly line--code operates on data in-order Structured Game Programming > Object-Oriented spaghetti Here is the C++ benchmark proving why the new way wins, and how it's not about micro-optimisations: bytesbeneath.com/p/725-faste…
1
5
39
3,178
You've hit the Week 2 Wall again. You want to add a dash ability. Should it be an object? Code in the PlayerController? What about enemies that can dash? Every new feature breaks two old ones. You hack something together. It works. Two weeks in. The logic is a web you can't follow. You burn out. You restart. It's not your fault. You were taught a paradigm that doesn't map to reality.
3
12
883
You're not a bad programmer.. you were sold a paradigm that doesn't map to reality
8
1
30
2,164
Games are not a web of objects talking to each other In reality they are a pipeline of data going in, processing, and an image+sounds coming out the other end (obviously this is simplified) The point is that what is happening in reality is the real problem
4
1
22
1,592
If you're programming a game, remember: 99% of players don't care how hard you worked. 99% of engine developers don't care about your game. 100% of players do care about their experience with your game. You can't fix frame hitches if you don't understand the underlying architecture. "No Lumen. No Nanite." is a new selling point for a reason. Own your engine: bytesbeneath.com/p/how-to-ar…
4
6
108
7,797
If you've only ever used Unity, you've only ever had Unity-shaped ideas.
8
2
1
70
5,143
Dylan Falconer retweeted
"Why would you want to read and write code?" because I like programming the computer, that's why I do it
22
71
5
906
29,002
If you're debating whether a Car should inherit from Vehicle, you've been trained to solve problems that don't exist. Start with what the data looks like.
13
6
5
200
13,976