• Welcome to SC4 Devotion Forum Archives.

PC Limitations and the Pathfinding engine...

Started by b22rian, August 21, 2008, 05:39:57 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

b22rian

Hi,

Ive been wondering about something for awhile now and I finally decided to post concerning it..after I had
been reading some of Mott's older posts today which were related to it..Basically this concerns playing large
cities on larger sized city maps.. Something we all know now as your city gets quite large, begins to place a lot
strain on your Pc processors  and also the game engines.. Although my question is more specific i think to the
traffic path finding engine .By the way I use Mott's sim B on hard difficulty.. My city is now getting quite large
about  ( 860 K population )..  My game play is starting to show some lag, but it is certainly still quite playable..
And i.m not complaining .. i know to expect this playing such a large city on a large map.. However, i am beginning
to notice some strange things on occasion.. actually some of the same things I recall noticing when I used to have
an older pc which didn't have nearly the specs of my newer pc.. and I again tried to play larger population cities
on large maps.. and I wondered the same thing back than but could never find a satisfactory response in the sc 4
boards about it.. I will first explain on the older pc what I noticed in general and than ill follow that with a sorta
strange example i noticed recently from my newer city on the new pc...

    1) ok first my general observations I had playing the old city .. about 2 year ago on the older pc, i had back
       than ,with the inferior pc specs and of course the original maxis pathfinding engine we used back in those
      days..  I had a city on  large map with a population around 600 K when i finally stopped playing.
      Anyways the game lag was even higher than it is now with my current city i play on my new pc . In
      the end I started to see more and more suit cases popping up, and more and more abandonment due to
      commute times that went with it.. Now obviously some of this could have been my own fault.. " IE.., I
     didn't do a very good job placing my routes and designing my transportation system in general ect.. ect.."
     And I'm sure that was part of it.. But i feared and suspected also ,that some of the commute problems were
     beyond my control.. because the path finding engine at hit some sort of "wall " more related to the size of my
    city with playing on a large map.. and with my pc limitations. Mott in one of his older posts makes reference to
    this wall.. So now i think is a good time to quote Mott , whom we all owe so much to his diligent research and
     time hes put into this game..

  " Mott  Says " ...

  " Remember, this game has its own process scheduler.  (That's why it appears to the system as one process that uses 100% CPU, and it can't spread across cores.)  The UI is always getting a certain (generous) amount of CPU time no matter what.  The UI won't lag even if the rest of the game has overloaded and ground to a halt.

The game engine "freezes" at some point, and Sims "go crazy," no matter what - it's just a matter of how many Sims can move in before the amount of data to be calculated exceeds the CPU time available, and "Simulator Lag" kicks in.  Then you start seeing no-car zots on new zones that clearly have road access, and new Sims abandon because they can't find their jobs.  Once it takes more than six game-months before the pathfinder gets enough CPU time to calculate all the new trips, you've hit the wall.  The inevitability of this should be obvious enough.

Computers are faster now, but they're not THAT much faster.  You can keep cities small and have neat pathfinding mods and lots of complex custom BATs, and burn your extra clock time on that.  Or you can go CAM-style and try to pack them in like Sardines, buring your CPU time that way, and let everything else rot.    Can't do both.  I don't care how fast your computer is.  Not even NASA has the kind of power needed to fully simulate a city of 1.25 million people in real-time, with graphics... "

   The more recent example I had with my newer city and the better and newer PC..  on the edge of the map I have a good sized residence .. at first it had a "medium length" commute that persisted . I noticed the next "path
finding cycle " it had a suit case on it.. the next pathfinding cycle right after its back to a medium commute .. I had
taken the time to check the route and job.. it was the same route and job all along.. So I feared i am getting
close to this "wall" Mott alludes to in his posting..

But all along Ive had 2 theories of how the pathfinding engine works with the game especially where it concerns
large cities, game lag , and pc specs limitations.. (processor speed, graphics card  ect..) and I'm hoping a few
people will correct me or add to this , whom know a lot more about this than I do ! Ill state  theory 1
first.. and this is the one I fear to be true and more related i think to Mott's posting above about the "wall"
we can call it..

    Theory 1...

Large populated cities on large maps.. At first of course  the city starts out small running smoothly..
Later as the city grows to be huge and the game starts to lag  the pathfinding engine still must run its cycle.
.. in a city of a million residents its straining some with the complexities of finding the best path for all those people
and all the possible routes and transportation options it has to evaluate.. as your pc processor strains to preform these complex functions, eventually you hit the "wall"  mott refers to in his post. Sothe pathfinding engine is unable
to complete its job for all those people and their routes. This shows  the end of the cycle by way of suit cases and
people unable to find their jobs simply because you had so many people now in your city.  The pathfinding engine
didn't have a chance to get to those people and routes before its "cycle time": ran out.. Thus you begin to suffer
more and more "commute abandonment" based on this idea as your city grows larger..and larger.
Sorta the "bleak picture" theory I know..

ok, Now my theory 2 and this is the theory I hope is closer to being correct..  ;D

  Theory 2..

Most of the things I mentioned in theory 1 hold true but here is the key difference i hope  &Thk/(...
The game simply lags more and more and slows down to allow the pathfinding engine to do its job for all those
people no matter how long it takes..So in other words I'm hopeful rather than Mott's theory ( if I'm interpreting
what he is saying correctly).. that you have say a 6 month period of time for the pathfinding engine to do
its job and if it dose'nt finish,, sorry pal, those people its unable to get to, simply cant find their jobs and
eventually abandon  :'(..
I hope, Its more the game simply lags and you see the days pass by more slowly but...(and this is the key i think)..
the pathfinding engine is allowed to complete its job before time runs out so to speak ??

Another way of asking the question I think,. is Mott was making it sound like the "path finding engine " sorta
runs independently of the other game functions.. (the ones that control  abandonment ,how fast the game time passes  ect ect).. and if the path finding engine dose,nt finish its job than too bad for you !

I'm hopeful that the game runs more slowly to allow the pathfinding
engine is still allowed to complete its job .. ?  and thus there is no 6 month game time deadline ,
( or whatever time period it is).. before you start seeing crazy things happening and suit cases start popping up
all over the place..

So I realize the eventually your game will lag , (especially on  large map with huge city).. and there is nothing
much we can do about it except the usual things suggested, limit your plug ins and get a better pc !..
But I'm Hopeful the Path finding engine  works in concert with the rest of the game functions be it slower as
everything else slows down ??
Also Im sure I have formed my own erroneous conclusions about how the traffic pathfinding engine works, so I
would appreciate some correction there as well from someone more knowledgeable than myself  on these issues..

sorry for the length of this posts and I'm hopeful "others" can add their insights to this...

Thanks , Brian

z

My new traffic simulator was specifically built for situations like this.  Perhaps you'd like to try it out and take it for a spin?  It's quite stable.  If you're interested, please PM me and I'll send you a copy.  If you make a copy of your city before trying it, you can always ditch it and go back to where you were if you don't like it.

b22rian

OK, thanks Z...

I'm still holding my own, with the nam traffic sim.. I just think the eventuality of what i was discussing in this post
will  happen at some point..if it doesn't occur as I'm describing before I reach a million residents in my
largest city, I will be quite satisfied with that i think.. However once I'm ready to start a new city/ region i would
like to give your traffic sim a spin as I've mentioned in other posts.. and i will drop you a PM at that time.. meanwhile,
I hope you will keep us all up to date with how your doing with your Chicago city.. ?

However one other idea sounds interesting to try also, and i know you would like some input on this too..
But if we assume some of the more catastrophic things happen to the traffic sim eventually in my largest city
which I was describing above.. lets say maybe it happens finally at 1.5 mil for instance..than at that point it
may be fruitless to try and continue the city with the current traffic sim B.. We may be able to gain a lot of
insights than if we were to switch to yours .. by way of a direct comparison of how the 2 traffic sims respond
to those high demands.. sounds like a good test and experiment to run of your new traffic sim .. what do you
think ?.. I have no plans to stop in this city until I'm forced to stop because of the conditions which may occur
as Ive described in this posting.. so i will be glad to keep you posted (and others interested) on what will happen
in the future with this large city of mine.. as we reach some (theoretical limits)...

but thanks for replying to my post..I'm asking some very hard questions in it.. and I didn't think i would get a lot of replies to it.. very few people I think are capable of responding to what I'm asking (maybe Mott) a couple others
perhaps..who know the programming well enough to explain what happens as you reach some of these limitations..
although I'm still curious to hear from others in the upper abilities of their knowledge of this game.. who can describe
better than I can , what goes on with the traffic sim .

As I mentioned in my first long posting above, I'm hopeful that it will be game lag and patience which makes my
decision (an easy one)  to stop playing my cities and region and not what is possible to happen in the above posting.. But as you
know we don't always get what we want in life either .. ;)
I admit it does drive me a little mad, because as you know in a city this large you are going to see at least a few suit cases popping up from time to time .. but now I'm starting to ask myself, our those suit cases popping up for
all the (normal reasons).. or is this nearing the end of my city because of (mott's wall)  ??

Thanks , Brian

z

There's a lot in your posts, and right now I'm able to respond only to some of it.  Most importantly, I think there is ample evidence that there is no "wall" of the type you're talking about.  Right now, I'm running multiple large tiles with about two million population each, and performance is quite reasonable.  There's no question that performance deteriorates with population growth, but I'm running my simulator with a highly aggressive Pathfinding Heuristic of .003.  And my computer is far from new.

Even more impressive is xxdita's experience of running multiple large tiles with populations of more than eight million each.  Of course, xxdita is quite an expert in this game, and really knows how to squeeze growth out of cities.  Nevertheless, the fact that he has never run up against a processing wall should reassure you.

As far as comparing my simulator against the NAM ones for large cities, I think that's a great idea.  In fact, I think it's important to do that before I would consider any general release.  It's important to me to establish that my simulator runs at least as well as the NAM ones in any given situation before releasing it.

b22rian

Yup, I agree with you Z...

Since the original posting my city has gotten quite a bit larger , getting close to a million now..
And I think I made it sound like these effects were going to happen quite dramatically..like this wall
crashing down on my game and ruining everything ! But i think whatever effects as i were describing in my posts
may occur later as the city grows even larger, would happen much more gradually than what i was describing
as you suggested.. if later on, i noticed some major problems which occur similar to what I was describing in
the post, of course I will share it with everyone else at that point..

and really there is no need for you to invest any more time into these concepts..id rather have you put time
into some of the great things you have been working on lately and that i sense you are getting a lot of
enjoyment from.. thanks again for all you are contributing to this community  &apls

I also need to shorten some of my postings i feel.. they are too "wordy" and i repeat things too much me thinks  &Thk/(

But thanks for spending more time on this than i feel it deserved..

Brian