64 bit runtime - why it is a serious issue

clarification: 64bit OS’s (and 64bit Linux with multilib support) can run 32bit processes. Don’t worry that you won’t be able to play the game. That is not what this discussion is about.

During the twitch live stream today, Tony suggested that 64 bit runtime was not an important issue to them. This surprised and concerned me. let’s discuss in here why it is crucial for them to deploy a 64 bit build of the game. Also, those of us that are developers ourselves, let’s discuss with the radiant dev team costs/risks/challenges they might encounter deploying a 64 bit build.

As a discussion starter:

Non issue:

  • This isn’t about total world size, or pointer address space for number of entities, but more RAM and how much we can use.
  • Performance difference is likely negligible until the RAM usage becomes a problem. Without knowing more about their code, this is speculation.

Benefits:

Cons:

  • Two deployments, increases installer file size.
  • More testing required (though, the vast majority of bugs would be unrelated to arch)
  • unsigned/signed type changes in std library between 32 bit and 64 bit compile could introduce some regression.
2 Likes

Just wanted to point out, a 32-bit Windows environment can address 4GB of RAM, not 2GB of RAM. As well, on Linux at least, there’s Kernel patches that allow a 32-bit OS access more than 4GB of RAM. Also, Notation as Gb means Gigabit, which is effectively 1/8th the size of a Gigabyte. >.>

If I remember right, a HUGE benefit of a 64-bit client is this: VRAM is included in the 4GB address limit caused by a 32-bit application. This can be a big issue if the game ends up being a RAM hog (I honestly couldn’t think of a better term).

Thanks for seeing the b vs B typo. I’m very much aware of the difference.
Also, the 2GB cap is more complex than just arguing the limit is 4GB. Technically, we are both wrong in certain contexts. I’ve linked a stackoverflow discussion that sums it up nicely. Also, the linux support for up to 64GB of RAM (iirc) on 32 bit is not per process, but for the kernel. Besides, I’m more concerned for the more common case we will face, 64 bit OS’s with far more than 4GB of ram, running a 32 bit process.
Also, I’ve added your reference about VRAM taking the addressable RAM space in 32 bit applications. Very good point. I wanted to label this as a “discussion starter” specifically because I knew there would be more details both for and against that would be time consuming for me to remember/investigate on my own.

Thanks again for your help.

1 Like

This surprises me. Maybe I’m missing something but given what a huge resource hog Dwarf Fortress is, I’d assumed that late-game Stonehearth play would be similarly CPU and memory intensive.

For the record, dependant on the OS memory mapped devices such as the GPU may be mapped within the 32 bit address range or may be above the standard memory range. Modern 32 bit linux kernels are capable of mapping devices above the normal 4GB in a 32 bit range but this results in slow down accessing them as the addresses are no longer a single word. Therefore unless needed due to the use of a full 4GB of ram this technique is not used. Windows (as far as I know) does not do this at all, thus the cap of less than 4GB ram.

However the important part that confuses me is why one would not release a 64 bit binary. There are very few circumstances under which games (and any other relatively high level code) will not port nicely and these are almost always fixed by changing a few data types trivially and almost never require additional logic.

Also I shall note there can be a significant performance difference if the program frequently makes use of 64 bit integers or 128 bit floats. The 64 bit arch is able to handle these as a single word, thus most operations on them use but a single instruction. While a 32 bit arch will have to use two operations to operate on each half and then likely 1 or 2 more to take into account carrying and such.

So in summary, I shall not question what the devs wish to do, given I have not seen any of the code, but I cant see there being much of an issue building a 64 bit binary with more than small tweaks, given these days the number of computers with pure X86 cores is very small and there could be significant performance gains accessing more memory, handling larger words and on linux not needing to map hardware to out of range addresses.

The only point I might add as to the advantage of not making a 64 bit build is that having multiple builds does add a new range of bugs, and the devs may not want to intruduce such a complication when testing during beta, unsure if a bug is due to game logic or the build the user is running.

Ps, please correct me if I am wrong on any of this. I know a fair ammount on computer architectures but a few details, particularly VRAM are still confusing to me.

I’d say that releasing extra builds during beta would be the best time, it’s expected to be a bit buggy anyway and something like 64bit builds will be very useful and best be tackled along with the Mac/Linux builds as major but vitally important.

I’d read those stats as about 40-50% of players benefit, I’d say that’s enough to warrant doing it but there is another reason. That number is just going to rise as time progresses and they’re release isn’t planned for at least 12 months so it’s completely possible, likely even that the majority of the players would benefit by that point which would definitely make it worth it.

64-bit uptake has actually been really slow; the stats haven’t changed much over the course of the past year. That might change in 2013-2014 but it’s certainly not a given.

I would put it another way: if the game doesn’t run acceptably in 32 bits, then that’s really bad. A whole bunch of people will be screwed. Offering a 64-bit build for the people who are lucky enough to benefit from it is just papering over the problem.

I know very well that it’s common for indie games to have performance troubles, but I think the lesson is “focus on performance from early on” not “assume performance will suck and look for ways to mitigate it.”

1 Like

i agree would like too hear their opinion. i assume, since they been slowly working on the game for year an their trying reach lot goals in short amount time. that the extra coding will add to much time an money required.

it could also be something they put on back burner in till after game did well an it became a popular request

One final point. Some linux users do not have a multilib setup, meaning they could not play an x86 only build at all. So do not take it completely for granted that people who could use AMD64 can use x86.

I’d suspect that people interested in this kind of game would be a little more likely than average to be using a 64-bit OS. Gamers tend to be more sensitive to that kind of upgrade than the average computer user, and this genre of game tends to appeal to very detail-oriented people.

Yes, you’re right; that’s exactly what the data shows - but it’s still a long way from universal.

But I really don’t want to get into arguing the details! The thing is, this whole discussion is resting on a basic assumption that “Stonehearth will be a giant CPU/RAM hog, what should be done about it?” (And the further assumption that a 64-bit build would help in any case.)

I think that’s premature, and I certainly don’t see any evidence that the Cannons aren’t paying attention to performance. Rather, they’ve made a number of comments that suggest exactly the opposite - that they’re keeping a close eye on possible hot spots like pathfinding, Lua memory consumption, and so on.

It’s certainly not impossible to simulate a few hundred agents at a decent framerate, and I’m inclined to give the guys the benefit of the doubt until, you know, we’ve actually seen some code running.

So. . . in layman’s terms what does this all mean? From what I’ve read it seems that they won’t be making a 64-bit version; does this translate to that the game will be unplayable on my 64-bit version of Windows?

Don’t worry! Your 64-bit Windows can run 32-bit apps. You’ll absolutely be able to run the Windows version of the game, whichever kinds of builds end up getting made. Don’t let us scare you!

Good, I already backed the project and just wanted to make sure that it was actually going to run. Thanks for clearing that up, ginsweater!

NebulaNIne: thank you very much for the concern you pointed out of the possible misinterpretation of my post. I do NOT want to scare anyone away by accidentally giving the false impression that a 64bit OS cannot run the game. IT CAN. I’ll update(edit) my top post right away.

This topic actually gives me a lot of hope for this game as it shows to me the dedication of the developers to ensure that the game runs well on older hardware. I don’t understand all the nuances of the 64- vs. 32-bit debate, but as I get to update my gaming computer maybe once every 5 years I really appreciate games that run decently on older hardware. I realize that I may have to play with the settings turned all the way down and I’m ok with that.

I read some posters in this thread who seemed to imply that the majority of gamers have newer systems with higher end hardware. As one of those minority gamers running on an older “non-gaming” system, I am hoping and pushing for playability on older architectures. Requiring dedicated video cards or depending on the users to have huge amounts of RAM and the newest hardware removes a lot of potential players and the feel of this game resonates with exactly those types of gamers. In fact it is only the danger of system incompatibility that prevents me from dropping $30 into the Kickstarter campaign this very second.

xophnog: you are misunderstanding the details of this discussion.

Choosing the release a 64 bit build (which is the point of this thread) has nothing to do with “ensuring that the game runs well on older hardware”. On the contrary, this is a discussion about allowing the game to take advantage of better hardware. That’s it. The game runs the same on older hardward with or without these action. The game would merely run BETTER for the rest of us. Releasing a 64 bit build in addition to a 32 bit build DOES NOT show that the developers are losing dedication to making the game run well on older machines.

My apologies. I sit ignorant as charged, and I can appreciate wanting the game to work as best it can on the system of your choice. It is my desire, too, after all.

An additional 64-bit client might be a burden for a small team and 32-bit is still a must to have maximum reach.

Despite having said above, i would also prefer a 64bit client, especially when considering that it still will take quite some time till release.

Check out the hw/sw survey from steam:
http://store.steampowered.com/hwsurvey/

Most popular OS is Win 7 64-bit! If you add Win7 64 + Win 8 64 + Vista 64 you got 70% of users!
If you throw in Mac and Linux 64-bit you are at 72%.

So really by the time your finished this is probably 85%.

…and if we are at it, 90% have 2 to 4 cores - multi threading optimization please!