Openrct2: Feature: Limit number of guests in park

Created on 8 Feb 2018  路  11Comments  路  Source: OpenRCT2/OpenRCT2


Some people who play on my server notice lots of lag when the number of guests go above ~4000. I think it would be really helpful to have a cheat that limits the number of guests in the park to a certain number.
I know the number of guests can be juggled using Trams and exploding guests, but i am usually not around the entire day to babysit the number of guests, and i would rather not have the players mess with these cheats as they managed to crash my server once by doing this excessively.

This is also helpful for people who want to create an aesthetically pleasing park without overcrowding issues.

I think the easiest way to implement this would be by dropping the guest generation probability to 0 when the cheat is enabled and the set target number of guests has been reached.

feature

Most helpful comment

If 4k guests proves to be a strain for some clients, maybe it'll be worth investigating where the slowdown is.

All 11 comments

Doesn't really sound like a cheat. Sounds like a config option / scenario option. Would be best to make it into a feature of new save format.

@duncanspumpkin Maybe it would be nice idea to implement it as a cheat first, and then switch it into a setting when the new file format is there. I guess it could be handled in a sort of similar way to the forced park rating. Servers could already greatly benefit from having this.

If 4k guests proves to be a strain for some clients, maybe it'll be worth investigating where the slowdown is.

I'd say it should be a plugin instead of an option (assuming used plugins are saved with the savegame).

@janisozaur This would also help for people who play OpenRCT2 without powerful computers. To have my servers accessible to as many players as possible, I now remove all the guests from time to time. I also do not want to force the park rating to 0 as that is usually an indication that there is something wrong with the park, like trapped guests.

@deurklink do you run a headless server?

I do not run it headless, as i like to check in from time to time. I typically keep them running in a small window, with the camera focused on a corner of the map (mostly black screen). Also, usually i keep them minimized. The laptop i am running it on does not seem to have any performance issues, even when running 2 servers at the same time(note that this lag issue also exists when i run only 1 server). Normally I can clearly hear the fan of the laptop if it has to do any demanding tasks.
I do not notice lag issues when i log in on the server from my other laptop (but very low ping, obviously).

By the way, please note that this feature would not just be useful for servers. Some time ago I was making a small park but it just kept overcrowding while i was building it. I am sure I am not the only one who would like to have a feature like this implemented at some time in the future.

I looked at the code for guest generation and I do not think it would be very difficult to implement (Don't get me wrong, I understand the need for questioning the need for any new features though! :) ).

Two servers doesn't prove much as the game is mostly single threaded. I was just making sure it wasn't slow due to drawing the game, but if you move it to the corner of the map then I assume that isn't the issue.

I do think we should check out what the bottleneck is first as that would be a much better fix. We plan to allow for over 10K of guests soon so we need to be prepared.

Preliminary test shows peep_pathfind_heuristic_search is likely the biggest time consumer: https://github.com/OpenRCT2/OpenRCT2/blob/92c4c39b96b3fe6b2d0bdd307d6ac51da8c888ee/src/openrct2/peep/Peep.cpp#L9966

I totally agree, i had 1.000 guest in a park with only 3 rollercoaster, it was so crowded

There are at least two ways to implement this as a custom plugin within the plugin system:

  1. If the number of guests in the park exceeds a limit, then randomly remove guests until the guest count falls below that limit. This would be run every X ticks.
  2. Whenever a new guest spawns (this would require a new hook, see #11773), check to see if that would take the number of guests over the limit. If so, remove the guest / deny the attempt.
Was this page helpful?
0 / 5 - 0 ratings