News for hackers. Stuff that matters.
Re:SimCity’s Sims Don’t Seem That Smart After All by gizmo on Wednesday March 13, 2013 @12:10PM (#5369321)
With games you always have to create illusions of complexity in order to get acceptable performance. Smoke isn't real smoke (no real time smoothed particle hydrodynamics) but instead you billboard couple of semi-translucant textures. Bullets don't use real physics, but act as a point mass with specialized collision detection mechanics. Enemy AI is often just a simple state machine and hacked together heuristics. Everything is fake.

With SimCity 5 you can easily have over 100.000 Sims in one city region. SimCity has to model the economy, happiness, education, water, waste, power, pollution, traffic, industry, and much more. So if you want to do this for 100.000 Sims in real-time you've got to cut many corners. There's just no other way. And the illusion in SimCity 5 is pretty damn good, from what I've seen. Cars drive with purpose from one place to another. Traffic congestion seems to make sense. Air flow affects pollution in a sensible way. Sure, there are a bunch of bugs but in general the illusion holds up. It's really quite impressive.

Re:SimCity’s Sims Don’t Seem That Smart After All by potatolicious on Wednesday March 13, 2013 @12:21PM (#5369392)
That's just it though, SimCity 5's problem is that it insisted on agent-based micro-simulation even though technical limitations would require these agents to be lobotomized.

In previous SimCity games simulation was performed on the macro scale - not on each citizen. Any micro-scale view was just a visualization of the macro simulation. This meant you couldn't follow a sim's car from home to work and back, but it also meant scalability and the freedom to have a proper simulation model rather than a grossly dumbed-down one.

Agent-based simulation is the correct implementation (i.e., closest to reality) technically, but only in a world where we have infinite CPU power. A macro-simulation like previous SimCity games would have meant far fewer corners cut and a much less buggy behavior that are the result of emergent negative agent-agent interactions.

To take your analogy - SimCity 3000 and SimCity 4 use billboards and textures for fake smoke. SimCity 5 tries to go all-in and simulate the hydrodynamics of each particle - but has to cut so many corners to run that it doesn't even look like smoke anymore.

Re:SimCity’s Sims Don’t Seem That Smart After All by bentcorner on Wednesday March 13, 2013 @01:39PM (#5369865)
> This meant you couldn't follow a sim's car from home to work and back

Note that in SimCity 2013 you still can't really do this. A sim finds a new job every day and finds a new home at the end of the day. Really.

Re:SimCity’s Sims Don’t Seem That Smart After All by notahacker on Wednesday March 13, 2013 @03:18PM (#5370499)
IIRC SC4 with expansion packs actually allowed you to run a much better microsimulation of a small handful of individual Sims whose movements and "thoughts" could be tracked in parallel to a macrosimulation that produced a more realistic simulation of commute patterns between buildings.
Re:SimCity’s Sims Don’t Seem That Smart After All by estel on Wednesday March 13, 2013 @06:15PM (#5371487)
I believe I read that the sims find the nearest place that has a job available and the nearest house at the end of the day.
Re:SimCity’s Sims Don’t Seem That Smart After All by nwh on Wednesday March 13, 2013 @07:49PM (#5371985)
That's correct, but it's not carried over from day to day. Every morning a new job, every evening a new house.
Re:SimCity’s Sims Don’t Seem That Smart After All by gizmo on Wednesday March 13, 2013 @12:44PM (#5369524)
I don't judge a game by its pre-launch PR. I think it's better to judge a game for what it is, not for what it claims to be. If there is a mismatch between the PR representation of a game and the game itself then you have a problem with the PR, not with the game.

You may be right there's just no way to salvage the current SimCity 5 problems (if that's what you're implying), but I don't think the current issues ruin the game at all. For me the illusion mostly holds up and the pathfinding issues are mostly corner cases. So I don't think it's a fundamental problem with the game design and I think a few AI patches can make a world of difference.

(although, arguably, a macro-level simulation could have resulted in a much better SimCity because that would allow for more depth and larger city areas. And arguably a sim-level simulation is a bit of a gimmick that doesn't add enough to the game to justify the complexity and PR buzz, but that's a different issue)

Re:SimCity’s Sims Don’t Seem That Smart After All by potatolicious on Wednesday March 13, 2013 @01:22PM (#5369753)
I disagree heavily that the pathfinding issues are corner cases. You are guaranteed to run into them once your city reaches a large enough size. Looking at /r/simcity it seems like once you reach a level 3 city hall or so (I forget the population required for this) the bottlenecks start getting really bad and the bad agent AI makes them difficult to diagnose and repair.

If the only way you play is to build large, spread out suburbs full of low-density buildings then yeah, you can conceivably play the game without seeing the ill effects of the bad pathfinding.

But as soon as you even see your first high-density high-rise the whole thing starts to fall apart.

I don't think this is necessarily unfixable - but it does require a level of reimplementation that I don't think EA would be willing to make.

Re:SimCity’s Sims Don’t Seem That Smart After All by WhaleBiologist on Thursday March 14, 2013 @05:57AM (#5374018)
Once you hit a population of 50,000, you start to get bad traffic. Density then ramps up pretty quickly from there. Quite soon you'll have a population of 200,000, and the traffic is quite a lot worse, but not terribly bad.

The real horror comes when you start a region's great work. A significant number of people will leave the city in the mornings to work at the great work. If you are making a great work you are probably sending dozens of trucks with resources to it as well. The end result is you get easily 10x more vehicles leaving/entering the city. The queue to get in through the single lane off-ramp from the highway then ends up stretching all the way to the next city, and it takes a good 24 hours for the cars at the end to get in. It then ends up stabilizing, taking maybe 4-6 hours for someone to get into the city.

Also, a large number of cars 'just passing through' will use your city entrance as a 'quick' way to do a U-turn on the highway, blocking traffic even more.

Re:SimCity’s Sims Don’t Seem That Smart After All by XaspR8d on Wednesday March 13, 2013 @04:32PM (#5370952)
> In previous SimCity games simulation was performed on the macro scale - not on each citizen.

Though even SimCity 4 actually assigned each sim a specific home and workplace. Their travels/resources were calculated on the macro scale though.

Re:SimCity’s Sims Don’t Seem That Smart After All by etcet on Wednesday March 13, 2013 @01:04PM (#5369634)
> With SimCity 5 you can easily have over 100.000 Sims in one city region.

Actually this does not seem to be the case at all [0]. Some people have figured out that the total population numbers are are either bugged or faked. For a supposed 100,000 pop town, the actual population is around 15,000.

[0] http://forum.ea.com/eaforum/posts/list/9359265.page

Re:SimCity’s Sims Don’t Seem That Smart After All by 3JPLW on Wednesday March 13, 2013 @04:56PM (#5371061)
Yup. And this is supported by the supposedly leaked piece of GUI code that appeared on Gist 2 days ago. If that code leak is authentic and reasonably up to date (there are references to an alpha version), then it means that this is happening at the GUI layer.

    simcity.GetFudgedPopulation = function (a) {
      a = "undefined" !== typeof a ? a : simcity.gGlobalUIHandler.mLastPopulation;
      if (500 >= a)
        return a;
      if (40845 < a)
        return Math.floor(8.25 * a);
      a = Math.pow(a - 500, 1.2) + 500;
      return Math.floor(a)
    };
https://gist.github.com/anonymous/5133829#file-simcityui-js-...
Re:SimCity’s Sims Don’t Seem That Smart After All by skeoh on Wednesday March 13, 2013 @07:19PM (#5371759)
Is it just me or are these 'yoda conditions' (http://www.codinghorror.com/blog/2012/07/new-programming-jar...) confusing and difficult to read? They make sense but it's so jarring to see that I have to read the condition twice to be sure I understand it.
Re:SimCity’s Sims Don’t Seem That Smart After All by skore on Wednesday March 13, 2013 @08:09PM (#5372105)
Major code smell for me as well, but I've seen some rather big projects do them, so I always file it under "tabs vs. spaces".
Re:SimCity’s Sims Don’t Seem That Smart After All by skore on Thursday March 14, 2013 @07:16AM (#5374232)
To stop people from upvoting me: I'm in the tabs camp. There, I've said it.
Re:SimCity’s Sims Don’t Seem That Smart After All by lmm on Wednesday March 13, 2013 @08:43PM (#5372323)
It's just you. Once you're used to them they're just as easy to read as "normal" conditionals, if not easier.
Re:SimCity’s Sims Don’t Seem That Smart After All by rorrr on Wednesday March 13, 2013 @11:50PM (#5372972)
No, it's not just him. Yoda conditions are hard to read, because they don't follow the natural language. You don't say "If 5 dollars is more than what I have...", instead you say "If I have less than 5 dollars ...".
Re:SimCity’s Sims Don’t Seem That Smart After All by loopdoend on Thursday March 14, 2013 @01:02AM (#5373188)
This is a result of the code being transpiled from their scripting language and run through Google's Closure Compiler. You'll get the same behavior on conditions if you try it out (http://closure-compiler.appspot.com/home).
Re:SimCity’s Sims Don’t Seem That Smart After All by caipre on Wednesday March 13, 2013 @11:14PM (#5372870)
Javascript? I haven't been tracking the details of this game at all, but is the GUI really done in Javascript? Are they using a custom engine of some sort? How can that possibly be performant?
Re:SimCity’s Sims Don’t Seem That Smart After All by UberMouse on Wednesday March 13, 2013 @05:39PM (#5371297)
That looks correct, the population starts fudging as soon as you pass 500 pop

http://np.reddit.com/r/SimCity/comments/1a6oeo/proof_that_th...

Re:SimCity’s Sims Don’t Seem That Smart After All by revscat on Wednesday March 13, 2013 @12:19PM (#5369371)
> Traffic congestion seems to make sense.

Did you read the article? The congestion makes no sense.

And to the best of my recollection previous versions of SimCity were able to handle traffic just fine. I certainly do not remember them suffering from the congestion problems this version seems to be afflicted by.

Re:SimCity’s Sims Don’t Seem That Smart After All by gizmo on Wednesday March 13, 2013 @12:25PM (#5369409)
That's rude. I read the article and already acknowledged there are bugs. In previous versions of SimCity traffic was completely unrealistic. Cars would just fade in and fade out a few seconds later. There were no congestion problems like in SimCity 5 in older versions because individual cars didn't try to get from point A to point B.

edit: clarity

Re:SimCity’s Sims Don’t Seem That Smart After All by ripter on Wednesday March 13, 2013 @02:19PM (#5370114)
It's not rude, you said: "Cars drive with purpose from one place to another. Traffic congestion seems to make sense."

But the videos clearly showing that cars take nothing other than shortest path into consideration. They don't even check if their destination is still valid. This does not make sense.

So asking if you read the article is not rude because your quote seems to be in direct conflict with the article.

Re:SimCity’s Sims Don’t Seem That Smart After All by ghshephard on Wednesday March 13, 2013 @03:12PM (#5370458)
The entire purpose of the article was to demonstrate that Traffic Congestion doesn't make sense. Your initial response made it appear that you were referring to a different article - I was wondering which one you had read as well.
Re:SimCity’s Sims Don’t Seem That Smart After All by kevinnk on Wednesday March 13, 2013 @12:59PM (#5369603)
"There were no congestion problems like in SimCity 5 in older versions because cars didn't try to get from point A to point B."

That's not really true. Sim City 4 did have congestion problems and it did simulate Sims going from point A to B. It wasn't as granular as SC5 simulating individual cars, but it did simulate groups of Sims traveling to and from work. It was also infamously buggy (something the modding community spent a lot of effort fixing) but it still was better than what we have now.

Re:SimCity’s Sims Don’t Seem That Smart After All by chao- on Wednesday March 13, 2013 @01:31PM (#5369819)
>It was also infamously buggy (something the modding community spent a lot of effort fixing) but it still was better than what we have now.

Indeed. For the amount of time I spent playing Sim City 4 with the Network Addon Mod (the one that changes the pathfinding and tweaks transportation usage to be more sane), I was taking for granted that Maxis would learn from those mistakes, and even take a nod from the community in terms of what is believable transit behavior.

Re:SimCity’s Sims Don’t Seem That Smart After All by Fargren on Wednesday March 13, 2013 @12:23PM (#5369400)
Sim City 4, which I think was the only previous one that actually modeled traffic, had some congestion issues. I don't remember them being as bad as this, however.
Re:SimCity’s Sims Don’t Seem That Smart After All by potatolicious on Wednesday March 13, 2013 @12:30PM (#5369449)
Traffic has been "modeled" since SimCity 2000 way back in the 90s. Back then it was a simple capacity measurement depending on nearby buildings, though. There was definitely no concept of a road network and flow.

SC4 was the one that actually tried to model traffic flow throughout your city to locate bottlenecks. The pathfinding algorithm used looks like a variant of A, with the caveat that it would never explore nodes that weren't between you and your destination. This resulted in a lot of finicky behavior - things like your sim not taking the subway to work because he had to walk back a single block to catch it, and insisting on joining the gridlock instead.

This is largely fixed with the NAM mod though, which restored proper pathfinding.

The nice part about SC4 was that you could actually zoom in and see the gridlock. Sure, these weren't actual citizens in their cars, but it is a correct visualization of the simulation's traffic analysis. I for one will gladly give up the ability to follow a sim home for a faster, more scalable, more accurate simulation.

Re:SimCity’s Sims Don’t Seem That Smart After All by encoderer on Wednesday March 13, 2013 @01:58PM (#5369977)
> This resulted in a lot of finicky behavior - things like your sim not taking the subway to work because he had to walk back a single block to catch it, and insisting on joining the gridlock instead.

Reminds me a lot of most consumer GPS today that avoids backtracking whenever possible, even if that means a more congested or convoluted route.

I've seen this behavior too many times, from systems ranging from Google Nav to TomTom to the OEM Nav in my Mercedes.

Re:SimCity’s Sims Don’t Seem That Smart After All by ars on Wednesday March 13, 2013 @03:53PM (#5370725)
I think they do that not because they don't want to go backward, but because it's too computationally expensive to calculate on a small GPS.
Re:SimCity’s Sims Don’t Seem That Smart After All by 46Bit on Wednesday March 13, 2013 @12:31PM (#5369455)
SimCity 4 has it's share of bugs, even with mods like NAM/CAM/etc installed, but not normally to this extent.
Re:SimCity’s Sims Don’t Seem That Smart After All by stcredzero on Wednesday March 13, 2013 @05:31PM (#5371248)
> With games you always have to create illusions of complexity in order to get acceptable performance.

Or you can just suck it up and create real complexity, which can be awesome!

http://en.wikipedia.org/wiki/Dwarf_Fortress

Re:SimCity’s Sims Don’t Seem That Smart After All by darkarmani on Wednesday March 13, 2013 @01:42PM (#5369890)
> Cars drive with purpose from one place to another.

Like down a dead end street to one house? Did you read the article?

Re:SimCity’s Sims Don’t Seem That Smart After All by mikeash on Wednesday March 13, 2013 @12:19PM (#5369368)
There's nothing wrong with creating illusions of complexity, but if you hype up your game for months by saying that the smoke really is real-time smoothed particle hydrodynamics, it had better not turn out to just be a couple of sprites.