
I Created an Improbable SpatialOS Prototype in 5 Weeks - paddygord
I wasn’t impressed with SpatialOS after all the hype, their demo is dull [4], and it doesn’t show off anything that couldn’t be done on a single machine.<p>So, I decided to give it a go on our platform - Hadean (full disclosure, I’ve only been an employee here for 5 weeks). In 5 weeks, I built this demo [1, 2] which I think is already shaping up to be more impressive. I have my own ideas [2], but I want to know what suggestions you have&#x2F;improvements you’d like to see. If you have any questions about the demo or the platform I’ll be around for a while, comment or message me.<p>I decided to take a different approach to their grid, while the 2D hexagons they use may be better in a few cases, their approach seems overly generic for many use cases [3].<p>My approach uses an octree with cells stored by Morton (Z-Order) index. A leaf cell in the tree corresponds to a single worker&#x2F;core. New cells will be dynamically spawned when the entitIes move out of the live area, and despawned when they’re empty. Cells will also be subdivided when the load in a single cell increases beyond a threshold, this will maintain an almost constant amount of computation per worker. All of this is made fairly trivial on Hadean, which handles spawning and communication between workers across machines and clouds.<p>[1] Youtube video https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=w2fKRy5zC54<p>[2] github repo https:&#x2F;&#x2F;github.com&#x2F;hadeaninc&#x2F;spatial-tree-simulation-public<p>[3] SpatialOS load balancing https:&#x2F;&#x2F;docs.improbable.io&#x2F;reference&#x2F;12.0&#x2F;workers&#x2F;configuration&#x2F;loadbalancer-config<p>[4] SpatialOS video demo https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=k7RCFoY2d-k&amp;t=3m43s
======
alexvm
I find this technology very interesting. I have seen some multiplayer games
make use of it but am really excited to see what rich single player games can
do with this. For example the depth of a GOAP simulation could be greatly
increased by allowing for much more complex action graphs.

