Live data from Hacker News

Peredvizhnikov Engine: Lock-free game engine written in C++20

github.com

11–20 of 183 posts

Re: Peredvizhnikov Engine: Lock-free game engine written in C++20

#11
post #4

All those people who complain about project names squatting on existing words have finally been heard :-D

Peredvizhniki [0] were a group of Russian realist painters from the 19th century. Among other things, they organized "traveling" art exhibitions to promote Russian art in the provinces. The name roughly translates as "The travelers".

- [0] https://en.wikipedia.org/wiki/Peredvizhniki

Re: Peredvizhnikov Engine: Lock-free game engine written in C++20

#13

It’s quite the stretch to call this a game engine, rather than a tech demo for clever locking strategies.

This. There’s no demonstration of any game made with this “game engine”. The benchmarks are some matrix multiplication and unimpressive message passing. There might be some cool data container ideas or primitives. Those could have useful applications. But it isn’t really a “game engine”. Nor does it seem like an interesting way to build one.

Indeed. The project has no renderer or game physics code it seems? If so, it is too premature to be a game engine.

Re: Peredvizhnikov Engine: Lock-free game engine written in C++20

#14
post #2

The painting used is Barge Haulers on the Volga - https://en.m.wikipedia.org/wiki/Barge_Haulers_on_the_Volga Can someone please expand on the significance of this achievement to someone used to shooting their foot off in C++ in a predominantly single threaded manner?

Never mind that a lot of Volga boats were very single-threaded.

https://www.amusingplanet.com/2021/12/belyana-russias-giant-...

Re: Peredvizhnikov Engine: Lock-free game engine written in C++20

#15
post #14
post #2

The painting used is Barge Haulers on the Volga - https://en.m.wikipedia.org/wiki/Barge_Haulers_on_the_Volga Can someone please expand on the significance of this achievement to someone used to shooting their foot off in C++ in a predominantly single threaded manner?

Never mind that a lot of Volga boats were very single-threaded. https://www.amusingplanet.com/2021/12/belyana-russias-giant-...

You can even see the steam ships that replaced the slave in the background.

Re: Peredvizhnikov Engine: Lock-free game engine written in C++20

#16
post #4

All those people who complain about project names squatting on existing words have finally been heard :-D

[flagged]

> Unless the name is explained somewhere, I'm convinced it's complicated on purpose.

Tell me you only speak English without telling me you only speak English.

Re: Peredvizhnikov Engine: Lock-free game engine written in C++20

#17
I have an Actor framework which uses a vanilla std::deque for method pointers, and to add messages to the queue, the locking technique is a Benaphore (the original Futex, which uses an atomic and a locking primitive, with the twist that my locking primitive is a combo of spinlock/mutex based on retry count). Nothing special. Benchmarks show that very rarely does the message push function block, and the chance of an OS context switch is also very low, so even though occasionally we get a locked thread swapping out, it is so infrequent that it doesn't justify the lock-free algorithm cost.

In a nutshell, non lock free queues are much faster than lock free queues, however you must be prepared to accept the very infrequent longer delay due to a context switch (where the lock is not available to anyone). My benchmarks show that the price is acceptable since so much more performance is available with non lock free queues. 10 million messages per second per work thread can be queued on modern hardware.

Re: Peredvizhnikov Engine: Lock-free game engine written in C++20

#20

Earlier quoted context omitted.

[flagged]

> Unless the name is explained somewhere, I'm convinced it's complicated on purpose. Tell me you only speak English without telling me you only speak English.

From the grammar, I would not assume GP is a native english speaker, much less monolingual.
Post reply on HN