Originally Posted by biltong
Originally Posted by Raven.7
Have you ACTUALLY played CitiesXL? If so, you'd know the game chokes and memory starts leaking heavily at 50K population.CitiesXL is the epitome of a game that needed to be compiled to take advantage of multi-core CPUs, yet wasn't and therefore the experience is completely ruined.
This is why Maxis' decision to use single-threading bothers me, and they chose to limit city sizes as the easy way out.
Because you just need a compiler switch to enable multi threading.
While I agree that it's not acceptable that technology advances on and software does not utilize it to its potential, multithreading IS NOT easy, especially when it comes to games. What exactly would you have them split over threads?
Look at what a game is: a loop with different inputs and outputs. In this case, the inputs are the keyboard and mouse, and the outputs are what you see on the screen and hear. Each of those will have their own thread, the game WOULD NOT work if they didn't. The entire game would grind to a halt waiting for you to click a mouse button or press a key. That's why it's on it's own thread. The game would also stop completely while a sound plays, and then carry on when the sound stops playing. So it also gets its own thread. If the video output were also on the same thread, the game would grind to a halt every time the GPU has some big operation to do, instead of just dropping frames and keeping the game in sync. So it gets its own thread. Now what do you have left? The main loop. That loop is what kicks off all the other threads and keeps them coordinated whenever something in the game needs to happen. You click a button, and that input gets sent from the input thread to the main loop. The loop looks at what you clicked, and tells the other threads what to do, such as play a sound or show an animation. That's all SimCity is made up of, really. It just needs to play a sound or animation when you click on the right thing. That's suited just fine for a single loop, how else would you do it?
When you get into other genres where there's a hell of a lot more happening at the same time, that's where more threads come into play, but that is difficult, time consuming and with today's technology being so fast, not really worth it if it is certain it doesn't need it. Running the main loop in a single thread means the developers can get it done faster and patch it easier if something goes wrong. It also means they save cash and can push the game out faster. Remember that, too.
Now of course it's all a LOT more complicated than what I've explained, but they would not have decided on this if they had a good reason not to. It makes business sense to get something done faster and easier and cheaper if the technology can handle it. Then you get companies that are geeks and nerds (please don't take that the wrong way)
and like pushing hardware to its limits. Clearly EA is not one of them.
Oh and just FYI, multithreading does not cause memory leaks. Single threaded applications can leak memory just as much as multithreaded ones can. When you use some memory in an application and never release it, the memory manager has to assign more elsewhere and if this is in a loop (think about what I said about the main loop above), you end up with a big
Also if you think about this, it means low power laptops should be able to play the game well. Remember high end PCs are likely not all of their target market. It could also allow them to make a mobile version with a very similar if not the same code base as the full PC version.
Originally Posted by Cheezman
There is no reason why SimCity shouldn't
utilize multiple cores. The fact is, it's a simulation game, which means it is mostly made up of processing mathematics; that's what processors are designed for!
I'd like you to show me how you split a single, structured mathematical operation over multiple threads in code please.
The game is not exactly a "simulation". Yes there's a bunch of maths going on deciding who is happy, a bunch of scores and who gets hit by crime, but the game is mostly just playing sounds and displaying animations when you click a button.