About the pathfinding, and collision detecting: I don't really know much about this thing, it wasn't me who wrote it, nor did I work with it. The only thing I know, when 100+ entities moving, colliding with each other, the FPS drops.
Well, if you want to meet your hardware requirements, either you need to cripple your design (i.e. have less entities), or learn the code and fix the problem. Lucky for you, in this case, it's actually likely an easy fix: Just don't call the pathfinding for every entity every frame.
32 bit executables can only handle 2GB ram, and we are using like 1.7 or more for the graphical content and others.
1.7GB all loaded at once, or unloaded sitting on the harddrive? You only need to load the resources you are currently using, and then unload them when they are no longer needed.
And besides, I'd rather have a better game with slightly poorer graphics, then a beautiful game with slightly lower gameplay. If the graphics are standing in the way of you implementing this important feature, then you need to make a decision concerning the graphics. Either keep less in memory at one time, or reduce the cost of them when they are in memory. Don't forget that some or all of the textures are likely stored in the videocard's RAM, not the CPU's RAM.
You also still haven't mentioned what size your maps actually are when loaded in memory (without loading all the sounds, textures, and so on). They could be as little as 10MB, for all we know.
32 bit executables can only handle 2GB ram, and we are using like 1.7 or more for the graphical content and others. If we only supported 64 bit executables, it would be fine, but that's not the case.
As hplus0603 mentioned, it's 3GB, not 2GB. I don't know the details you need to do on the programming side to be able to access ~3GB, but I do know that until a few months ago, I was stuck on 32bit machine, and I definitely had 3GB RAM that functioned properly.
A 32 bit pointer can actually address up to 4GB (2^32 = 4 * 1024 * 1024 * 1024), but, due to the videocard RAM, CD drives, and other pieces of hardware that take some of the addressable space, it actually becomes about ~3.5GB or less. (see wikipedia for more details)
Ofcourse, this doesn't help you if your target devices don't have a third stick of RAM installed, and you have to take into account that the OS itself uses some RAM.
However, if >65% of your potential players have 3GB or more of RAM (Jan 2015 Steam hardware measurements of PC and Mac gamers), maybe you ought to limit your host players to those 65%, so everyone, including the not-65%, can have a better experience. Besides, how much longer is your development going to go on for? 1 year? 2 years? That '65%' number is going to continue to increase in your favor, by the time you are ready to release your game.
By the way, 80% of your target audience today uses a 64bit OS (same Jan 2015 survey). Two years later, it'll be higher.
Sorry, maybe I was not clear, but the players host servers. There aren't dedicated servers, you can only join to another player. And the game is already using 3 cores.
Three threads or three cores? Because 50% of your target audience still only has two cores... But each core can run more than one thread.
It sounds like you have two issues:
Issue A: Pathfinding is too slow for all the entities you are wanting to deal with at once.
Recommended fix:
- Learn how your pathfinding code works, at least at a high level.
- Don't call pathfinding so frequently. Cache the results. Spread the calls out over a larger area of time (i.e. many frames).
Alternative fix 1: Learn how your pathfinding works at a low level, optimize your pathfinding, and optimize the data it is operating on.
Alternative fix 2: Require your users to have better CPUS. (Bad idea, because CPU speed increases have been very slow).
The reason why I suggest spreading the work out instead of immediately jumping in and trying to optimize the algorithms, is because you can get much larger results, faster, and easier. The joking truth among programmers is, "doing nothing is always faster than doing something".
If you're calling your pathfinding every frame, for every entity, then by simply doing half the entities on one frame, and half on the next frame, you instantly save 50% of the work - by not doing the work you don't need to be doing. And even updating the pathfinding every other frame is still a huge waste of work doing things you don't actually need to do. Update it once a second, or once every two or three seconds (but spread the entities out over those two or three seconds). That'll instantly save you 98% (!!!) of your pathfinding workload, very easily, without having to understand the algorithms at a low level (you will need to understand how to use them at a high level though). That 98% is a real number, not an exaggeration.
Issue B: Not enough RAM for all the maps you want to load at once.
Recommended fix:
- Know your actual numbers. Find out how much it actually takes to keep one map, without graphics, loaded.
- Figure out how many maps you want loaded, without graphics, at one time (the same as your player-count).
- Knowing you need (PlayerCount * MinimumCostOfMapInRAM), make sure you reserve that amount of memory for your maps.
- If you need to, optimize the amount of space each map requires.
- Only load the graphics the player actually needs.
- If you need to, optimize the size of the graphics.
- If you absolutely positively need to, reduce the quality of the graphics.
Alternative fix: Require your users to have 64 bit machines and 3GB or more of RAM. (Not a bad idea, because RAM has been increasingly fairly rapidly)
Programming often requires making choices and tradeoffs. To make informed choices, you need hard data.
You say your pathfinding is slow. How much time does one pathfinding call actually take (best time, worst time, average time)? How frequently is it called? Does it need to be called that frequently?
After being loaded in RAM, without assets, what size are your maps actually? This is information you need to measure to make your decisions.
(Note: I keep on saying "after being loaded", because the size of your files in your computer folders is definitely not the same as the size of your files in your RAM. The same thing with your textures. The files merely describe what data to create. You need to measure how much the created (i.e. in RAM) structures actually cost)