make handles bold.
This commit is contained in:
1 parent
f577242432
commit
69b87777e5
728 files changed
+3291
-3087
No files matched your search
+2
-2
@@ -26,9 +26,9 @@ parent_post_id: "2036653149948424230"
|
||||
|
||||
## Branch
|
||||
|
||||
**1/** @HQuarterma43504
|
||||
**1/** **@HQuarterma43504** ^2036819288124985764
|
||||
|
||||
@BOENSAW
|
||||
**@BOENSAW**
|
||||
|
||||
GameMaker introduced me to the Entity paradigm. Each entity has "events" like On Create, On Destroy, Every Step, On Draw, On Collision, Timer, and so on. And you write code for these events.
|
||||
|
||||
|
||||
+16
-16
@@ -26,15 +26,15 @@ parent_post_id: "2036653149948424230"
|
||||
|
||||
## Branch
|
||||
|
||||
**1/** @Jonathan_Blow
|
||||
**1/** **@Jonathan_Blow** ^2036815488173703237
|
||||
|
||||
@BOENSAW
|
||||
**@BOENSAW**
|
||||
|
||||
Entities don’t have to go but having a mental framework where entities run functions is probably not helpful.
|
||||
|
||||
**2/** @anicic_filip
|
||||
**2/** **@anicic_filip** ^2037079338512769397
|
||||
|
||||
@Jonathan_Blow @BOENSAW
|
||||
**@Jonathan_Blow** **@BOENSAW**
|
||||
|
||||
Could you expand on that?
|
||||
I've seen:
|
||||
@@ -44,31 +44,31 @@ I've seen:
|
||||
|
||||
Is this what you are describing as a mental framework?
|
||||
|
||||
**3/** @Jonathan_Blow
|
||||
**3/** **@Jonathan_Blow** ^2037294870939972085
|
||||
|
||||
@anicic_filip @BOENSAW
|
||||
**@anicic_filip** **@BOENSAW**
|
||||
|
||||
My game code has evolved toward "iterate over all entities of type X, do Y on them, at the place in the code where this needs to happen". The entity does not own the function, the game engine owns the function.
|
||||
|
||||
**4/** @Jonathan_Blow
|
||||
**4/** **@Jonathan_Blow** ^2037295493085319580
|
||||
|
||||
(So instead of having a generic tick function where you switch on entity type, and then a generic pre-tick because of course you need that, and pre-pre-tick, and post-tick, etc, you just have small bits of code where you iterate over things by type and do what that type needs. If you store the entities by type in the first place (which is a very efficient way to do it due to uniform size), then these iterations are much faster than iterating over randomly-typed entities in random order.
|
||||
|
||||
**5/** @Jonathan_Blow
|
||||
**5/** **@Jonathan_Blow** ^2037295938583314583
|
||||
|
||||
@anicic_filip @BOENSAW
|
||||
**@anicic_filip** **@BOENSAW**
|
||||
|
||||
A real-world example (but most loops have more in the body; this one is chosen for readability):
|
||||
|
||||

|
||||
|
||||
**6/** @Jonathan_Blow
|
||||
**6/** **@Jonathan_Blow** ^2037296285506822315
|
||||
|
||||
@anicic_filip @BOENSAW
|
||||
**@anicic_filip** **@BOENSAW**
|
||||
|
||||
The idea of a generic tick function for entities is really not great to begin with, because in a complex game you end up caring a great deal about what order things happen in, then you need to go to great pain to impose this order. Instead, you can just say "do A, then B, ..."
|
||||
|
||||
**7/** @iquilezles
|
||||
**7/** **@iquilezles** ^2037321785008668834
|
||||
|
||||
Once I saw a project where everything was entities with a .tick(), plus a gigantic priority table intended to orchestrate the mess. Because reasoning the flow was still too hard, developers had added yield() for_rand_number_of_frames everywhere, "to give other entities some time to run their tick()s". Naturally all actions took multiple frames to execute, and they still had flow/synch bugs everywhere anyways.
|
||||
|
||||
@@ -76,15 +76,15 @@ I advised them to burn thing down and move on to just an app loop with { do_thin
|
||||
|
||||
You could say the problem was that particular team of coders, not the design per-se. But, I mean, I've seen this story repeat with different teams repeat 3 or 4 times by now...
|
||||
|
||||
**8/** @Jonathan_Blow
|
||||
**8/** **@Jonathan_Blow** ^2037322309502185845
|
||||
|
||||
@iquilezles @anicic_filip @BOENSAW
|
||||
**@iquilezles** **@anicic_filip** **@BOENSAW**
|
||||
|
||||
Everyone wants to think they are in the Matrix and doing some super cool entity simulation reality engine. In reality it is just clumsy code failing to do something simple, at great cost in complexity, speed and reliability.
|
||||
|
||||
**9/** @BOENSAW
|
||||
**9/** **@BOENSAW** ^2037340571690471473
|
||||
|
||||
@Jonathan_Blow @iquilezles @anicic_filip
|
||||
**@Jonathan_Blow** **@iquilezles** **@anicic_filip**
|
||||
|
||||
I think part of the appeal is also hiding code so that it appears simpler because you can't see all of it at once. not that that's good, lol
|
||||
|
||||
|
||||
+10
-10
@@ -26,33 +26,33 @@ parent_post_id: "2036653149948424230"
|
||||
|
||||
## Branch
|
||||
|
||||
**1/** @KnightOfTh3Wind
|
||||
**1/** **@KnightOfTh3Wind** ^2036777757875581351
|
||||
|
||||
@BOENSAW
|
||||
**@BOENSAW**
|
||||
|
||||
How do you even have a functioning game without entities
|
||||
|
||||
**2/** @BOENSAW
|
||||
**2/** **@BOENSAW** ^2036779389757894720
|
||||
|
||||
@KnightOfTh3Wind
|
||||
**@KnightOfTh3Wind**
|
||||
|
||||
I'm just guessing, but over time I've realized less and less things actually need to be compartmentalized into boxes and can just be managed as a part of global state
|
||||
|
||||
**3/** @SagelessRanger
|
||||
**3/** **@SagelessRanger** ^2036781762752205009
|
||||
|
||||
@BOENSAW @KnightOfTh3Wind
|
||||
**@BOENSAW** **@KnightOfTh3Wind**
|
||||
|
||||
Can you make this expand on this idea this sounds very interesting and potentially more clear to manage
|
||||
|
||||
**4/** @BOENSAW
|
||||
**4/** **@BOENSAW** ^2036786837029863443
|
||||
|
||||
@SagelessRanger @KnightOfTh3Wind
|
||||
**@SagelessRanger** **@KnightOfTh3Wind**
|
||||
|
||||
Take a cutscene for a simple example. A naive approach might be something like "npc object spawns a textbox object and sends text from its text variable". Doesn't sound so bad but what if two NPCs activate at once, what if the textbox or npc gets destroyed somehow... error prone
|
||||
|
||||
**5/** @BOENSAW
|
||||
**5/** **@BOENSAW** ^2036787552238342282
|
||||
|
||||
@SagelessRanger @KnightOfTh3Wind
|
||||
**@SagelessRanger** **@KnightOfTh3Wind**
|
||||
|
||||
Something more along this line of thinking would be like "interaction system detects conditions to begin the cutscene state which reads from a script and draws textboxes automatically". less interdependence, no reliance on external objects, no way to muddy the state
|
||||
|
||||
|
||||
+2
-2
@@ -26,9 +26,9 @@ parent_post_id: "2036653149948424230"
|
||||
|
||||
## Branch
|
||||
|
||||
**1/** @MelinShioto
|
||||
**1/** **@MelinShioto** ^2036791325593379203
|
||||
|
||||
@BOENSAW
|
||||
**@BOENSAW**
|
||||
|
||||
Object { data stuff; function stuff }
|
||||
|
||||
|
||||
+2
-2
@@ -26,9 +26,9 @@ parent_post_id: "2036653149948424230"
|
||||
|
||||
## Branch
|
||||
|
||||
**1/** @MildlyNuclear
|
||||
**1/** **@MildlyNuclear** ^2036815667723166017
|
||||
|
||||
@BOENSAW
|
||||
**@BOENSAW**
|
||||
|
||||
everything is just functions and variables, it's functions all the way down
|
||||
|
||||
|
||||
+2
-2
@@ -26,9 +26,9 @@ parent_post_id: "2036653149948424230"
|
||||
|
||||
## Branch
|
||||
|
||||
**1/** @NotHenryFonda
|
||||
**1/** **@NotHenryFonda** ^2036657302204260461
|
||||
|
||||
@BOENSAW
|
||||
**@BOENSAW**
|
||||
|
||||
there's a whole book about this https://www.dataorienteddesign.com/dodbook/
|
||||
|
||||
|
||||
+2
-2
@@ -26,9 +26,9 @@ parent_post_id: "2036653149948424230"
|
||||
|
||||
## Branch
|
||||
|
||||
**1/** @RaykiruS
|
||||
**1/** **@RaykiruS** ^2036787677765288054
|
||||
|
||||
@BOENSAW
|
||||
**@BOENSAW**
|
||||
|
||||
So, not an ecs but only a es
|
||||
|
||||
|
||||
+2
-2
@@ -26,9 +26,9 @@ parent_post_id: "2036653149948424230"
|
||||
|
||||
## Branch
|
||||
|
||||
**1/** @Ryunocore
|
||||
**1/** **@Ryunocore** ^2036858460520755594
|
||||
|
||||
@BOENSAW
|
||||
**@BOENSAW**
|
||||
|
||||
Patterns are guidelines, but coding is a holistic and spiritual activity. Unironically follow your heart.
|
||||
|
||||
|
||||
+2
-2
@@ -26,9 +26,9 @@ parent_post_id: "2036653149948424230"
|
||||
|
||||
## Branch
|
||||
|
||||
**1/** @TheWireWhiz
|
||||
**1/** **@TheWireWhiz** ^2036795872302739892
|
||||
|
||||
@BOENSAW
|
||||
**@BOENSAW**
|
||||
|
||||
The only thing you ever need to think about is how the data flows, and sometimes when it flows if the paths leak. Everything else is an abstraction over that.
|
||||
|
||||
|
||||
+2
-2
@@ -26,9 +26,9 @@ parent_post_id: "2036653149948424230"
|
||||
|
||||
## Branch
|
||||
|
||||
**1/** @_Detrend_
|
||||
**1/** **@_Detrend_** ^2036773206984470619
|
||||
|
||||
@BOENSAW
|
||||
**@BOENSAW**
|
||||
|
||||
Thats because entities and ECS are the new shiny thing and everyone loves to jump on the cool train.
|
||||
|
||||
|
||||
+2
-2
@@ -26,9 +26,9 @@ parent_post_id: "2036653149948424230"
|
||||
|
||||
## Branch
|
||||
|
||||
**1/** @_flashman_harry
|
||||
**1/** **@_flashman_harry** ^2036755293187592636
|
||||
|
||||
@BOENSAW
|
||||
**@BOENSAW**
|
||||
|
||||
Finding out being Turing complete just requires less and not more?
|
||||
|
||||
|
||||
+2
-2
@@ -26,9 +26,9 @@ parent_post_id: "2036653149948424230"
|
||||
|
||||
## Branch
|
||||
|
||||
**1/** @ccallac7
|
||||
**1/** **@ccallac7** ^2036802494194729189
|
||||
|
||||
@BOENSAW
|
||||
**@BOENSAW**
|
||||
|
||||
All that matters is memory and logic, everything else is a made up abstraction
|
||||
|
||||
|
||||
+2
-2
@@ -26,9 +26,9 @@ parent_post_id: "2036653149948424230"
|
||||
|
||||
## Branch
|
||||
|
||||
**1/** @galactix____
|
||||
**1/** **@galactix____** ^2036789325338194102
|
||||
|
||||
@BOENSAW
|
||||
**@BOENSAW**
|
||||
|
||||
There are no universal pattern common to every game, especially if you are searching for efficiency. Each game have its own optimization specifics
|
||||
|
||||
|
||||
+2
-2
@@ -26,9 +26,9 @@ parent_post_id: "2036653149948424230"
|
||||
|
||||
## Branch
|
||||
|
||||
**1/** @mcnabbd
|
||||
**1/** **@mcnabbd** ^2036803466698674505
|
||||
|
||||
@BOENSAW
|
||||
**@BOENSAW**
|
||||
|
||||
<video controls src="https://video.twimg.com/tweet_video/HEQt9MWb0AEyGm2.mp4"></video>
|
||||
|
||||
|
||||
+2
-2
@@ -26,9 +26,9 @@ parent_post_id: "2036653149948424230"
|
||||
|
||||
## Branch
|
||||
|
||||
**1/** @neverworksgames
|
||||
**1/** **@neverworksgames** ^2036777865643991443
|
||||
|
||||
@BOENSAW
|
||||
**@BOENSAW**
|
||||
|
||||
Objects, arrays, singletons. That's it.
|
||||
|
||||
|
||||
+4
-4
@@ -26,15 +26,15 @@ parent_post_id: "2036653149948424230"
|
||||
|
||||
## Branch
|
||||
|
||||
**1/** @nouriosplpolska
|
||||
**1/** **@nouriosplpolska** ^2036762408027316597
|
||||
|
||||
@BOENSAW
|
||||
**@BOENSAW**
|
||||
|
||||
I feel like the actually useful patterns just emerge by themselves if you try doing something that needs them.
|
||||
|
||||
**2/** @BOENSAW
|
||||
**2/** **@BOENSAW** ^2036778414791909453
|
||||
|
||||
@nouriosplpolska
|
||||
**@nouriosplpolska**
|
||||
|
||||
That's very much been my experience. it's not that they aren't useful under certain scenarios, but they're just as often not and rather than following a rigid structure it's better just to use the right tool for the situation
|
||||
|
||||
|
||||
+2
-2
@@ -26,9 +26,9 @@ parent_post_id: "2036653149948424230"
|
||||
|
||||
## Branch
|
||||
|
||||
**1/** @samloeschen
|
||||
**1/** **@samloeschen** ^2036835437797396644
|
||||
|
||||
@BOENSAW
|
||||
**@BOENSAW**
|
||||
|
||||
team fat struct!
|
||||
|
||||
|
||||
+2
-2
@@ -26,9 +26,9 @@ parent_post_id: "2036653149948424230"
|
||||
|
||||
## Branch
|
||||
|
||||
**1/** @struc_ture
|
||||
**1/** **@struc_ture** ^2036758034144510171
|
||||
|
||||
@BOENSAW
|
||||
**@BOENSAW**
|
||||
|
||||
Eventually you realize literally nothing matters except for love and friendship!!!!
|
||||
|
||||
|
||||
+2
-2
@@ -26,9 +26,9 @@ parent_post_id: "2036653149948424230"
|
||||
|
||||
## Branch
|
||||
|
||||
**1/** @HaskellEnjoyer
|
||||
**1/** **@HaskellEnjoyer** ^2036997821379822035
|
||||
|
||||
@BOENSAW
|
||||
**@BOENSAW**
|
||||
|
||||
Just go full haskell and realize that everything is a function
|
||||
|
||||
|
||||
+2
-2
@@ -26,9 +26,9 @@ parent_post_id: "2036653149948424230"
|
||||
|
||||
## Branch
|
||||
|
||||
**1/** @RafaAsor
|
||||
**1/** **@RafaAsor** ^2037115807667232798
|
||||
|
||||
@BOENSAW
|
||||
**@BOENSAW**
|
||||
|
||||
This is a take for the whole software industry
|
||||
|
||||
|
||||
+2
-2
@@ -26,9 +26,9 @@ parent_post_id: "2036653149948424230"
|
||||
|
||||
## Branch
|
||||
|
||||
**1/** @angus_mang
|
||||
**1/** **@angus_mang** ^2037008038134006163
|
||||
|
||||
@BOENSAW
|
||||
**@BOENSAW**
|
||||
|
||||
Functions that Operate on Structs/Classes/Entities/Objects makes things simple. C++ or heavy, container-ized / encapsulated Class/Structs muddies. Serves for poor organization and juggling abstract ideas instead of.
|
||||
Big ass block thing
|
||||
|
||||
+2
-2
@@ -26,9 +26,9 @@ parent_post_id: "2036653149948424230"
|
||||
|
||||
## Branch
|
||||
|
||||
**1/** @eta9499
|
||||
**1/** **@eta9499** ^2037038809129394422
|
||||
|
||||
@BOENSAW
|
||||
**@BOENSAW**
|
||||
|
||||
you are almost there unc
|
||||
|
||||
|
||||
+3
-3
@@ -25,14 +25,14 @@ in_reply_to: ""
|
||||
|
||||
## Thread
|
||||
|
||||
**1/** @BOENSAW
|
||||
**1/** **@BOENSAW** ^2036653149948424230
|
||||
|
||||
the more experienced I get programming games the more that I realize patterns like inheritance and components don't matter, the only thing that matters is functions and entities which run functions... entities might be the next thing to go
|
||||
|
||||
Branches: [[archive/threads/BOENSAW/2026-03-25-the-more-experienced-i-get-programming-games-the/2026-03-25-NotHenryFonda-theres-a-whole-book-about-this-https-www]], [[archive/threads/BOENSAW/2026-03-25-the-more-experienced-i-get-programming-games-the/2026-03-25-_flashman_harry-finding-out-being-turing-complete-just-requires]], [[archive/threads/BOENSAW/2026-03-25-the-more-experienced-i-get-programming-games-the/2026-03-25-struc_ture-eventually-you-realize-literally-nothing-matters]], [[archive/threads/BOENSAW/2026-03-25-the-more-experienced-i-get-programming-games-the/2026-03-25-nouriosplpolska-i-feel-like-the-actually-useful-patterns-just]], [[archive/threads/BOENSAW/2026-03-25-the-more-experienced-i-get-programming-games-the/2026-03-25-_Detrend_-thats-because-entities-and-ecs-are-the-new-shiny]], [[archive/threads/BOENSAW/2026-03-25-the-more-experienced-i-get-programming-games-the/2026-03-25-KnightOfTh3Wind-how-do-you-even-have-a-functioning-game-without]], [[archive/threads/BOENSAW/2026-03-25-the-more-experienced-i-get-programming-games-the/2026-03-25-neverworksgames-objects-arrays-singletons-thats-it]], [[archive/threads/BOENSAW/2026-03-25-the-more-experienced-i-get-programming-games-the/2026-03-25-RaykiruS-so-not-an-ecs-but-only-a-es]], [[archive/threads/BOENSAW/2026-03-25-the-more-experienced-i-get-programming-games-the/2026-03-25-galactix____-there-are-no-universal-pattern-common-to-every]], [[archive/threads/BOENSAW/2026-03-25-the-more-experienced-i-get-programming-games-the/2026-03-25-MelinShioto-object-data-stuff-function-stuff]], [[archive/threads/BOENSAW/2026-03-25-the-more-experienced-i-get-programming-games-the/2026-03-25-TheWireWhiz-the-only-thing-you-ever-need-to-think-about-is]], [[archive/threads/BOENSAW/2026-03-25-the-more-experienced-i-get-programming-games-the/2026-03-25-ccallac7-all-that-matters-is-memory-and-logic-everything]], [[archive/threads/BOENSAW/2026-03-25-the-more-experienced-i-get-programming-games-the/2026-03-25-mcnabbd-thread]], [[archive/threads/BOENSAW/2026-03-25-the-more-experienced-i-get-programming-games-the/2026-03-25-Jonathan_Blow-entities-dont-have-to-go-but-having-a-mental]], [[archive/threads/BOENSAW/2026-03-25-the-more-experienced-i-get-programming-games-the/2026-03-25-MildlyNuclear-everything-is-just-functions-and-variables-its]], [[archive/threads/BOENSAW/2026-03-25-the-more-experienced-i-get-programming-games-the/2026-03-25-HQuarterma43504-gamemaker-introduced-me-to-the-entity-paradigm]], [[archive/threads/BOENSAW/2026-03-25-the-more-experienced-i-get-programming-games-the/2026-03-25-samloeschen-team-fat-struct]], [[archive/threads/BOENSAW/2026-03-25-the-more-experienced-i-get-programming-games-the/2026-03-25-Ryunocore-patterns-are-guidelines-but-coding-is-a-holistic]], [[archive/threads/BOENSAW/2026-03-25-the-more-experienced-i-get-programming-games-the/2026-03-26-HaskellEnjoyer-just-go-full-haskell-and-realize-that-everything]], [[archive/threads/BOENSAW/2026-03-25-the-more-experienced-i-get-programming-games-the/2026-03-26-angus_mang-functions-that-operate-on-structs-classes]], [[archive/threads/BOENSAW/2026-03-25-the-more-experienced-i-get-programming-games-the/2026-03-26-eta9499-you-are-almost-there-unc]], [[archive/threads/BOENSAW/2026-03-25-the-more-experienced-i-get-programming-games-the/2026-03-26-RafaAsor-this-is-a-take-for-the-whole-software-industry]]
|
||||
|
||||
**2/** @BenboQuest
|
||||
**2/** **@BenboQuest** ^2036656311367266745
|
||||
|
||||
@BOENSAW
|
||||
**@BOENSAW**
|
||||
|
||||
i only been saying this
|
||||
Reference in new issue
Block a user