3 ms·
"There's an architecture used in video games for a long time now where rendering and other engine-level functions are decoupled from the game logic, and the two
by Mithaldu 12y ago
"There's an architecture used in video games for a long time now where rendering and other engine-level functions are decoupled from the game logic, and the two communicate via a local socket."
Is he talking about multiplayer or has anyone ever actually seen this?
- catmanjan 12y agoSome games (even in singleplayer) host a "local server" and environment information is passed to that. If you're making a networked game it makes sense as you'd be creating the server anyway, decoupling is nice and less codebase to manage. Steam's Source games, UT do this, if you open up the console and scroll up you can see the local server initializing.
- TheLoneWolfling 12y agoDitto, Minecraft. Not sure about Supreme Commander but it wouldn't surprise me if it did.
- douche 12y agoFor Source, that's probably the GoldSrc/Quake legacy. You can see this somewhat in the source on GitHub - WinQuake has both client and server mashed into one process, but there are clear divisions, with the cl_.c/h and sv_.c/h files.
- makmanalp 12y agoI met a longtime game dev at a reasonably well-reputed game company talk about how they did something similar where they did a message passing architecture between threads in a single process, and how this also helped contain old code that people were afraid to touch while allowing newer practices and refactoring to happen in other regions.
- TheLoneWolfling 12y agoMost games that do non-authoritative peer-to-peer multiplayer ultimately do something similar for singleplayer. Although it may not be as far down the layers as a local socket. Also, Minecraft uses something vaguely similar, with a separate client and server, with the client and server communicating locally via shared memory (effectively a local socket, but not bothering to bounce through the OS). Though Minecraft's an odd case - they used to not do it this way, and switched to it, and in the process broke a lot of things.
- vog 12y agoYou can go even further, and this architecture is becoming more and more popular in business applications. James Lewis and Martin Fowler coined the per "Microservices" for this emerging pattern: http://martinfowler.com/articles/microservices.html http://martinfowler.com/articles/microservices.html