[suggestion] Could you let CPU work more efficiently ?

(previously 'DEVELOPER') Private forum for registered community members. To register, please visit www.prison-architect.com/register.

Moderator: NBJeff

lilboa
level0
Posts: 5
Joined: Sun Jun 21, 2015 9:37 am

[suggestion] Could you let CPU work more efficiently ?

Postby lilboa » Mon Jul 06, 2015 2:51 am

it is almost impossible to play this game with a long time.
The game will become slower and slower, more and more lagged.
I always build a large prison. But this issue seems more serious on a large prison.
So i have to built a medium prison now.

Could you please reduce CPU usage? Could you please let CPU work more efficiently?
perryliu97
level2
level2
Posts: 183
Joined: Wed Nov 21, 2012 11:40 pm

Re: [suggestion] Could you let CPU work more efficiently ?

Postby perryliu97 » Mon Jul 06, 2015 11:47 am

There will most likely be optimisations before launch, as optimisation is normally done in the beta.
However, it should also be noted that the game does already run surprisingly well, on both my newly bought gaming laptop and my five year old Mac, so there's a chance that they are some system specific problems on your end.
lilboa
level0
Posts: 5
Joined: Sun Jun 21, 2015 9:37 am

Re: [suggestion] Could you let CPU work more efficiently ?

Postby lilboa » Mon Jul 06, 2015 1:25 pm

perryliu97 wrote:There will most likely be optimisations before launch, as optimisation is normally done in the beta.
However, it should also be noted that the game does already run surprisingly well, on both my newly bought gaming laptop and my five year old Mac, so there's a chance that they are some system specific problems on your end.


I have a monthly maintenance on my PC. I can play many aaa games without any frames drop.
This game runs well at the beginning. With more and more objects/staffs/prisoners, this game will become slower and slower. After many hours, the 3* game speed will be as fast as 1* game speed in a new prison.
User avatar
xander
level5
level5
Posts: 16869
Joined: Thu Oct 21, 2004 11:41 pm
Location: Highland, CA, USA
Contact:

Re: [suggestion] Could you let CPU work more efficiently ?

Postby xander » Mon Jul 06, 2015 4:35 pm

And?

We all know that the game has to do a lot more computations as the maps get bigger and the number of entities on the map increases. Are you trying to report a memory leak, or are you just grousing about poor performance? If the former, please give some more details (what kind of hardware are you running? what OS? what video card? can you show us the memory leak, perhaps by using some kind of system monitor? can you give more details about your prison(s)?). If the latter, please note perryliu97's response. The game is in alpha. Optimization is generally not done until later in the development cycle.

As an aside, the comparison to AAA games is spurious. AAA games have large budgets, much of which gets spent on their art departments. High resolution textures, high polygon count entities, and all kinds of fun stuff that is designed to bring the *video card* to its knees. Most AAA games don't actually stress the CPU all that much---most of the work is done on the GPU. Prison Architect is exactly the opposite---most of the work is done by the CPU (and there is a lot of work to be done). A direct comparison is difficult, and, as I said, likely spurious.

xander
lilboa
level0
Posts: 5
Joined: Sun Jun 21, 2015 9:37 am

Re: [suggestion] Could you let CPU work more efficiently ?

Postby lilboa » Tue Jul 07, 2015 8:53 am

xander wrote:And?

We all know that the game has to do a lot more computations as the maps get bigger and the number of entities on the map increases. Are you trying to report a memory leak, or are you just grousing about poor performance? If the former, please give some more details (what kind of hardware are you running? what OS? what video card? can you show us the memory leak, perhaps by using some kind of system monitor? can you give more details about your prison(s)?). If the latter, please note perryliu97's response. The game is in alpha. Optimization is generally not done until later in the development cycle.

As an aside, the comparison to AAA games is spurious. AAA games have large budgets, much of which gets spent on their art departments. High resolution textures, high polygon count entities, and all kinds of fun stuff that is designed to bring the *video card* to its knees. Most AAA games don't actually stress the CPU all that much---most of the work is done on the GPU. Prison Architect is exactly the opposite---most of the work is done by the CPU (and there is a lot of work to be done). A direct comparison is difficult, and, as I said, likely spurious.

xander


Yes, what you said is right.
But currently, optimization has already been a limit. Dev team should pay some attention on optimization now.
Do not only start optimization work since beta stage. Who can know when this game can enter beta stage?

You think AAA games do not stress CPU that much? Those shooting games,science fiction games which have huge number of particle SFXs also have very high CPU requirement. But these game will not be slower and slower on my PC.

Optimization work is endless. Better optimization means lower hardware requirement and more players.
Dev team should pay some attention on optimization all the time.

This is a suggestion.
RedTear
level2
level2
Posts: 80
Joined: Mon May 25, 2015 3:04 pm

Re: [suggestion] Could you let CPU work more efficiently ?

Postby RedTear » Tue Jul 07, 2015 9:27 am

lilboa wrote:Optimization work is endless. Better optimization means lower hardware requirement and more players.

The hardware doesnt seem to make a difference in PA quite frankly. Im running on a PC which i last upgraded for Alan Wake, bought a new Graphics Card - which at that time cost me 30€, still better then on board...
AMD X3 3,1GHz
4GB DDR3 RAM

It still runs rather smoothly, but if i get up to like 1000-2000 people it lags as hell. From what i read, people with high-end PCs arent in a better situation there.
But, yes, that IS a problem.
User avatar
xander
level5
level5
Posts: 16869
Joined: Thu Oct 21, 2004 11:41 pm
Location: Highland, CA, USA
Contact:

Re: [suggestion] Could you let CPU work more efficiently ?

Postby xander » Tue Jul 07, 2015 3:01 pm

lilboa wrote:But currently, optimization has already been a limit. Dev team should pay some attention on optimization now.
Do not only start optimization work since beta stage. Who can know when this game can enter beta stage?

Premature optimization is generally a bad idea. It is easy to take a piece of code, optimize, then want that piece of code to interact with something that you add later. Adding something new could (1) break the previously optimized code or (2) add another execution path that is so slow that the previous optimization is rendered useless. The general rule of thumb is "don't optimize until all of your features have been completed." Chris appears to be aiming to release in ≈6 months, and it sounds like the next update will complete implementation of features, so it sounds like the "beta" phase is scheduled to start in a month or two. At that point, I imagine that we will see further optimization.

lilboa wrote:You think AAA games do not stress CPU that much? Those shooting games,science fiction games which have huge number of particle SFXs also have very high CPU requirement. But these game will not be slower and slower on my PC.

I didn't say that AAA did not use the CPU, only that the major bottleneck is the GPU, not the CPU (contrast this with Prison Architect, where the CPU really is the bottleneck). The example you give, by the way (particle effects), is generally done on the GPU anymore, and is GPU-bound, not CPU-bound.

RedTear wrote:It still runs rather smoothly, but if i get up to like 1000-2000 people it lags as hell. From what i read, people with high-end PCs arent in a better situation there.
But, yes, that IS a problem.

The biggest bottleneck in the game seems to be pathfinding. Pathfinding is a problem that is going to grow linearly with the number of entities that need paths (that is, O(n)), and exponentially with the size of the map (that is, something like O(n^c), where n is the number of nodes (map cells) that have to be searched for a path). The more entities you have on the map, the bigger you are going to need that map to be. The bigger the map, the longer it takes to find paths. One to two thousand entities is really starting to push the boundaries of what can be done right now.

It is possible that some optimization might occur (better AI task selection would likely help *a lot*, certain precomputed paths could help, etc)---indeed, optimization really ought to start being the focus of development in the near future---but, again, pathfinding really is a relatively difficult (computationally speaking) problem. There is going to be a limit to what can be done.

xander
RedTear
level2
level2
Posts: 80
Joined: Mon May 25, 2015 3:04 pm

Re: [suggestion] Could you let CPU work more efficiently ?

Postby RedTear » Tue Jul 07, 2015 3:34 pm

xander wrote:The biggest bottleneck in the game seems to be pathfinding. Pathfinding is a problem that is going to grow linearly with the number of entities that need paths (that is, O(n)), and exponentially with the size of the map (that is, something like O(n^c), where n is the number of nodes (map cells) that have to be searched for a path). The more entities you have on the map, the bigger you are going to need that map to be. The bigger the map, the longer it takes to find paths. One to two thousand entities is really starting to push the boundaries of what can be done right now.

It is possible that some optimization might occur (better AI task selection would likely help *a lot*, certain precomputed paths could help, etc)---indeed, optimization really ought to start being the focus of development in the near future---but, again, pathfinding really is a relatively difficult (computationally speaking) problem. There is going to be a limit to what can be done.

xander


If this wasnt planned to be part of the game, we wouldnt have land expansions as a simple large map could potentialy suffice to get pretty close to, if not exceed that.

Also, yes, precomputed paths can help a lot. Sure, we dont know from where exactly people want to go to where but we could keep the quickest routes across rooms saved, they dont have to consider every tile in it every time they walk across it. They allready save their planned route once they start walking and if a new wall is errected while they are on their way they bump into it instead of constantly calculating their next step.

Also, pathfinding is something that should easily be distributed across multiple cores.

Return to “Community Members”

Who is online

Users browsing this forum: No registered users and 10 guests