3 ms·
Crazy thing is to use alertable state, iocp doesn't work with it as you expect. I expected frameworks like unity engine to use completion ports.
by xfer 5y ago
Crazy thing is to use alertable state, iocp doesn't work with it as you expect. I expected frameworks like unity engine to use completion ports.
- Matthias247 5y agoCompletion ports are a solution to maximize efficiency if you are dealing with thousands of connections. I don't really think unity or any other game has that requirement. It's a client, not a webserver. They probably picked the select based solution since its decently portable between windows and unix, and good enough for their requirements.
- aetherspawn 5y agoI think he is saying because Unity is expensive, he expected them at minimum to use the best technology available in the stack (IOCP), since the implementation time is fairly minimal (i.e. a developer and a few weeks) compared to the performance gained for all the games using the engine. In the same way you don't buy Unreal Engine and then expect to see GLFW being used underneath instead of the native platform APIs or something like that. You expect any big game engine to be thoroughly natively integrated, and so-be-it if they need to maintain multiple native backends. That's their value sell for an engine. And I think there would be plenty of 32-odd player games using P2P sockets.
- Matthias247 5y agoI understand that. But what performance gained? Unless your application spends 20% of CPU or more on networking or you run 1000 connections there won't be any measurable difference. Realistic numbers for games are likely < 1% of CPU, there's simply not too much data to exchange. Optimizing graphic API for games is something different, since this is really where CPU and GPU time is being spent.