News for hackers. Stuff that matters.
Re:Peredvizhnikov Engine is a fully lock-free game engine wr... by pshirshov on Sunday September 10, 2023 @05:17PM (#37460162)
Actors is one of the worst programming models possible. It's hard to observe actor-based systems and debug them. The protocol complexity (and complete protocol informality) usually brings much more trouble than any kind of locking/synchronization.
Re:Peredvizhnikov Engine is a fully lock-free game engine wr... by lll-o-lll on Sunday September 10, 2023 @05:27PM (#37460246)
I’ve had good success with actor based models. When you say “protocol complexity”, I don’t understand what you mean.

Observation requires good logging, but this isn’t out of line for any complex system. Debugging (as in actual breakpoints in an IDE or post-mortem analysis) can be facilitated with stack tracking (this same problem occurs with async await patterns and is solved in a similar way).

The advantages and disadvantages exist, but I think it’s an extremely effective programming model for many use cases. Formal state-machine programming, that’s the worst model, unless you need it.

Re:Peredvizhnikov Engine is a fully lock-free game engine wr... by hot_gril on Sunday September 10, 2023 @06:09PM (#37460607)
For game dev or in general? I hate using actors for general backend stuff, but for game dev maybe it makes more sense.
Re:Peredvizhnikov Engine is a fully lock-free game engine wr... by legosexmagic on Sunday September 10, 2023 @09:00PM (#37461644)
Actors tend to lead to bloated incomprehensible code. Even when you do want game objects to look like independent message passing actors. Faking it is always easier.

Actors are self defeating because they turn everything into a distributed system.

Re:Peredvizhnikov Engine is a fully lock-free game engine wr... by hot_gril on Monday September 11, 2023 @01:05AM (#37463100)
That's what I was thinking. I'm trying not to write Actors off because I'm not an expert on game dev and can imagine the possibility of an unusually large-scaled game. But yeah, if you're writing a typical game, I imagine you're best off doing it the typical way that's been optimized for.