City growth more challenging

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

User avatar
prissi
Chief Executive
Chief Executive
Posts: 648
Joined: 15 Nov 2004 19:46
Location: Berlin, Germany
Contact:

City growth more challenging

Post by prissi »

One of the most funkilling factors of OTTD is the missing challenge. E.g. growing cities is way to easy: Just set up five stops and it will growth forever like crazy.

Therefore I decided to try to like the city growth with the actual number of mail and passenger transported.

The only change needed is in twon_cmd.c, line 1774:

Replace the else branch with something like the following:

Code: Select all

if(t->act_pass+t->act_mail>0) {
	// new growthrate as funtion of the passenger and mail transported
	const uint16 m_mail = (50*t->max_mail)/(t->act_mail+1);
	const uint16 m_pass = (50*t->max_pass)/(t->act_pass+1);
	const uint16 m_min = (m_pass>m_mail) ? m_mail : m_pass;
	m = m_min;
	if(m_min>250) {
		m = 250;
	}
}
else {
	static const byte _grow_count_values[5] = {
	210, 150, 110, 80, 50
	};
	m = _grow_count_values[min(n, 5) - 1];
}
This will work similar for small towns but will finally saturate for town sizes, which outgrew the stop coverage areas.

This is far from perfect. I would rather like to count the number of transported number of passengers differently than now. Because, even when you sent your last bus home, you will still transport about 1/9 of all passenger ... I see this more like a push for people deeper involved in the OTTD source than me.
Horse
Transport Coordinator
Transport Coordinator
Posts: 325
Joined: 10 Sep 2004 20:25

Post by Horse »

You are right the city grow system at this moment is crazy.

each small village grows to a metropolian city when it is connected by a bus.
That's very unrealistic.
There is no difference between a vilage town city or metropolian.
each village becomes a mega city.

To get a village grow in real life you need more than only 5 busstops.
User avatar
JimboTG
Engineer
Engineer
Posts: 80
Joined: 08 Sep 2005 10:45
Location: Portsmouth, England

Post by JimboTG »

Ive said it before and I will say it again... The whole town growth needs to be chucked in the bin and rewritten from scratch. Not only the reason but the method in which it expands needs serious reworking in order to create a more balanced and varied game IMO
I cant put a signature here, I dropped my pen
User avatar
bobingabout
Tycoon
Tycoon
Posts: 1850
Joined: 21 May 2005 15:10
Location: Hull, England

Post by bobingabout »

try playing spinoff challenge 2 beta.
JPG SUX!!! USE PNG!!!
There are times when JPG is useful, TTD screenshots is not one of them. Please use PNG instead.

[/url]
User avatar
prissi
Chief Executive
Chief Executive
Posts: 648
Joined: 15 Nov 2004 19:46
Location: Berlin, Germany
Contact:

Post by prissi »

Ok, here is a diff file. Using the usual five bus stop method, a town now cannot grow bigger than ~12000. Growing beyond is now really a challenge.

(Note: growth rate using mail only is for some reasons still too low, it seems.)
Attachments
growth.diff
(1.58 KiB) Downloaded 409 times
User avatar
JimboTG
Engineer
Engineer
Posts: 80
Joined: 08 Sep 2005 10:45
Location: Portsmouth, England

Post by JimboTG »

Oops, "Index Not Found", I cant use this patch.
I cant put a signature here, I dropped my pen
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Post by DaleStan »

Get Cygwin and use patch to apply the diff.

svn patch (which is used by TortiseMerge) requires data that svn diff produces but diff does not.
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
User avatar
prissi
Chief Executive
Chief Executive
Posts: 648
Joined: 15 Nov 2004 19:46
Location: Berlin, Germany
Contact:

Post by prissi »

After some more testing:
With some efforts, the maximum size was about 25000 in 2030. Then I ran out of stations to cover the town better. (I did not even know that there was such limit though.)
The towns with AI connections grow slower, and my bus-only towns stops growing at about 9000-12000.
User avatar
bobingabout
Tycoon
Tycoon
Posts: 1850
Joined: 21 May 2005 15:10
Location: Hull, England

Post by bobingabout »

did you try spinoff challange 2 beta? making towns grow in there is pretty hard.
JPG SUX!!! USE PNG!!!
There are times when JPG is useful, TTD screenshots is not one of them. Please use PNG instead.

[/url]
User avatar
prissi
Chief Executive
Chief Executive
Posts: 648
Joined: 15 Nov 2004 19:46
Location: Berlin, Germany
Contact:

Post by prissi »

I looked at the source code. In the old code, a town also growth, if you transported only freight and served your stations well. This is gone from the challenge.

Second is, that I do not like absolute numbers. Also I do want to make it possible to play only with passengers, only with mail or only with industries without forcing me to choose one path.

To me the basic OTTD is too simple. If the challenge settings goes into OTTD, this would be even better than my humble work on symptoms. But, if it does not, I propose this change to make it a little hard than just "built five stops and serve them".
Gunvald
Engineer
Engineer
Posts: 21
Joined: 25 Apr 2004 12:31

Post by Gunvald »

What is the status on town growth? This patch looks like the anwser to the crazy way i works now, yet it isn't even in the MiniIN.
User avatar
prissi
Chief Executive
Chief Executive
Posts: 648
Joined: 15 Nov 2004 19:46
Location: Berlin, Germany
Contact:

Post by prissi »

Well, this patch is much to simple to finally answer it. Normal town growth will be stalled when too many passengers are waiting and the station rating drops. With the five busstop/five busses method this is around 30000-40000 in less than thrity year. It will then getting slower because your station ratings will get bad.

Using this patch the initial growth will be much slower and will stall earlier since with increasing town size the coverage area will get larger and the number of passenger/mail transported versus the total number will drop earlier than the station rating.

As a result the early growth rates will match for the first five years (so the effect on the initial gameplay is similar). Later on the growth will depend much more on your coverage of the town. Even without passenger/mail destinations this gives more reward for coverign the complete town area.

The lines to change in town_cmd.c are the same, only the numbers have changed. By hand, this patch is easily applied to almost any version, so far.

The result below was five busses on five stops and just fast forward the game. Iterestingly, the gowth rates were the same for the first 5 years, then gradually drop to 35% of the "normal" growth rate after 30 years. Finally, when the ratings of the stations got low, the other method catches a little up, so the rate is then 40-45% for 50 years and beyond.

Of course with proper expansion I am sure you could get near the original growth rate, just giving more effort (i.e. building stations and the such).
Attachments
Comparison of both growth methods
Comparison of both growth methods
ottd-growth.png (2.42 KiB) Viewed 9468 times
User avatar
charlieg
Transport Coordinator
Transport Coordinator
Posts: 323
Joined: 08 Oct 2003 14:07
Contact:

Post by charlieg »

The town growth really needs to be more specific.

The first thing to note is that industry really fuels town growth. Productive industry means hiring workers and they need somewhere to live. Towns often grow around industry. Currently passenger transport to industries in OTTD is a waste of time.

The other driving force behind growth is trade. High trade cities grow very quickly.

Commerce oriented city growth is really a late 20th century phenomenon, and has only come about because of the wealth generated by industry and trade.

Growing towns should be about combining transport services effectively. In reality, transport services are reactive, they follow demand. In OTTD transport services define demand. Really the whole thing needs designing from the ground up to counter the current sandbox gameplay and replace it with something where you have to compete for services rather than just go where you please.
Open source tycoon games
--
Free Gamer - open source and Free Software games
FreeGameDev forums - open source game development community
User avatar
prissi
Chief Executive
Chief Executive
Posts: 648
Joined: 15 Nov 2004 19:46
Location: Berlin, Germany
Contact:

Post by prissi »

I think the most important thing on town growth is, that is must appeal to all players in a game. Those who only do passengers/mail, those who do only freight and those who do everything, with keeping this in mind basing the town growth on the sation rations like in the original game was not the worse idea.

The best way for town growth might be a mixed contribution: 50% from intercity travelers (when there are destinations) 50% from industry, thus it would appeal to all playing styles.

How this works out in detail remains open. Does one use the station ratings for certain goods? The satisfaction of the town authority? The mean waiting time of goods/people/mail at a station? Or just make it a patch setting which to choose.
Gunvald
Engineer
Engineer
Posts: 21
Joined: 25 Apr 2004 12:31

Post by Gunvald »

Will this patch become a part og MiniIN anytime soon? Some of us is not big on codeing/patching ect...
User avatar
prissi
Chief Executive
Chief Executive
Posts: 648
Joined: 15 Nov 2004 19:46
Location: Berlin, Germany
Contact:

Post by prissi »

Ok, here is the diff to r5993. Should be really work with any OTTD version, the only change to the above diff is a change of lines.

Advocating is up to you ...
Attachments
diff_to_5993.diff
Diff to 5993
(1.61 KiB) Downloaded 398 times
User avatar
charlieg
Transport Coordinator
Transport Coordinator
Posts: 323
Joined: 08 Oct 2003 14:07
Contact:

Post by charlieg »

prissi wrote:I think the most important thing on town growth is, that is must appeal to all players in a game. Those who only do passengers/mail, those who do only freight and those who do everything, with keeping this in mind basing the town growth on the sation rations like in the original game was not the worse idea.

The best way for town growth might be a mixed contribution: 50% from intercity travelers (when there are destinations) 50% from industry, thus it would appeal to all playing styles.
Right. I mean, the reality is that if a company provides only passenger transport then nearby industry will find a way to cope by moving it's own stock, and likewise if only there is only commercial transport provision for local industry then the people will find a way to get from place to place. And the optimum is to provide a spectrum of services.
Open source tycoon games
--
Free Gamer - open source and Free Software games
FreeGameDev forums - open source game development community
Gunvald
Engineer
Engineer
Posts: 21
Joined: 25 Apr 2004 12:31

Post by Gunvald »

Hey, can anyone make a diff for this pathc for the newest MiniIN?
Gunvald
Engineer
Engineer
Posts: 21
Joined: 25 Apr 2004 12:31

Post by Gunvald »

Anyone?... plz?
MeusH
Tycoon
Tycoon
Posts: 4349
Joined: 25 Oct 2004 15:39
Location: Mississauga

Post by MeusH »

Try asking in MiniIN thread.
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: Ahrefs [Bot] and 14 guests