[Twitch] Fortnite Developers Discussion - Apr. 17, 2014

Hey everyone, glad you enjoyed the stream. I’m Ben, and I’m one of the tech leads on Fortnite. I thought I’d chime in with a bit of extra detail on a few of the questions answered, I think he did he a pretty good job eh? :slight_smile:

Fortnite scenes have a LOT of actors, but we don’t really use Physics in the sense of doing proper Physics simulation. In this random scene I just opened up we have around 7000 building piece actors. As mentioned most of our physical effects are done in shaders for optimization, and we use things like Projectiles (Shootergame has some good examples) for other things. We need to keep the state on the client and server tightly in sync, so we avoided using proper physics simulation.

Each of the building pieces (a wall, a floor, etc) is one actor, with one static mesh component so they stay really cheap. We use network dormancy to keep them cheap for replication, if you run the command SetNetDormancy you can put an actor to sleep for the networking system, and if you use SetActorTickEnabled you can put it to sleep for the tick system. Then, whenever the player interacts with a building piece we “wake them up” and spawn various additional components on demand. This keeps things cheap in the default case, but lets us make the entire game world interactive.