Status Update: Native C++ FTW

Yes. As the AI runs on the servers and we want to full the worlds with players + entities (creatures) there is a significant win in implementing the logic in C++. Say 100 players are online per world, and we simulate 100 entities in a 100m radius around the player, then the server needs to simulate 100 x 100 = 10000 entities. This scale makes it a win. If the game was only simulating 100 entities in the client it wouldn’t be so important.

3 Likes

I added “fairly” to “modern” because I didn’t want some smart-alec telling me that C++11 wasn’t modern! But it’s good to see that we have so many tech savvy community members.

– tl;dr –

Whilst we have flexibility with compilers on Linux and Mac OS X, we’re much more restricted with the PS4 toolchain. Thankfully it’s still fairly modern.

  • On PS4 the compiler is based on clang 3.6.
  • On Linux we use both GCC 4.8 (part of Ubuntu 14.04) and clang 3.6 to align with the PS4.
  • On Mac OS X the toolchain is Xcode 7.2 - based on LLVM 3.7(?).
  • On Windows the toolchain is Visual C++ 14.1.
  • We plan to switch to clang 3.7 on PS4 and Linux once it’s made available by Sony.

But as you point out, expecting a fully C++14 or C++17 compliant compiler across all the toolchains would be a pointless risk - given the features we’d take advantage of.

2 Likes

How do you script the AI ? Years ago i made great expirences with LUA (used it for the simulations of a swarm intelligence) which is a native C/C++ scripting language with good performence and easy use :slight_smile:

1 Like

They use LUA for creating mods for WoW as well.

yeah … the performance is really good and it’s easy to handle and lightweight. if @devs (would) use it this for scripting parts it would accelerate development for sure.

That’s all super exciting, but I’m most excited about a native C++ application. It’s pretty amazing what Minecraft can do with Java, but it won’t hold a candle to native C++ for speed.

So, will the native beta be Microsoft-Windows-only still, or are you willing to get cross-platform feedback early this time so it’s not an afterthought or an Arkham Knight redux?

The Steam version currently supports Windows and OS X; I think it’s safe to assume that the native C++ build will also target both of those. Also, it sounds like we’re unlikely to get a PS4 beta purely because Sony doesn’t have a great channel for doing that.

(Also, the devs do much of their actual work on Linux, which I suspect helps them build the game in a pretty platform-agnostic way)

2 Likes

Ambition is to deliver C++ beta and release in parallel on Windows and OSX. (It’s my personal ambition to get the Linux version out as well.)

As @nevir says, there isn’t the infrastructure for EA on PS4 at the moment. But we talk with Sony regularly about opportunities in this direction.

8 Likes