[OTTD] Generic Cars [v0.4] 22/02/2010
Moderator: Graphics Moderators
- cmoiromain
- Chief Executive
- Posts: 655
- Joined: 15 Jan 2007 21:45
- Location: FRANCE
- Contact:
Re: Generic Cars [v0.1]
Those cars are great!
Could it be possible to make them have random speeds when building (so we can see them overtaking each other), e.g. when building the same car twice, n°1 will have a maximum speed of 50kmph and n°2 will have 85kmph. I don't know nfo well enough to be able to tell if this is actually doable, but if it is it would really be great. Or else, some feature similar to the different liveries for locomotives: have categories of cars instead of actual cars, and when building you get a random model (well, partly random, but also partly dependant on the time and maybe the language of the towns (French names will give you more Renaults, Peugeot and Citroen, Quite a few BMWs, Audis, and only very rarely Dodge...)
These are just ideas thrown in, I don't know how serious this set intends to be, but I love building dozens of those cars to let them drive randomly on the map! And this increases the challenge when using RVs in the game.
Could it be possible to make them have random speeds when building (so we can see them overtaking each other), e.g. when building the same car twice, n°1 will have a maximum speed of 50kmph and n°2 will have 85kmph. I don't know nfo well enough to be able to tell if this is actually doable, but if it is it would really be great. Or else, some feature similar to the different liveries for locomotives: have categories of cars instead of actual cars, and when building you get a random model (well, partly random, but also partly dependant on the time and maybe the language of the towns (French names will give you more Renaults, Peugeot and Citroen, Quite a few BMWs, Audis, and only very rarely Dodge...)
These are just ideas thrown in, I don't know how serious this set intends to be, but I love building dozens of those cars to let them drive randomly on the map! And this increases the challenge when using RVs in the game.
I am little, ugly, and nasty. How do you do?
Re: Generic Cars [v0.1]
Leave that to me for the moment. I'm working on trying to get that working without you needing to worry about them, except for traffic purposes.cmoiromain wrote:...let them drive randomly on the map...
At least until I run into a roadblock on it - no pun intended.
- cmoiromain
- Chief Executive
- Posts: 655
- Joined: 15 Jan 2007 21:45
- Location: FRANCE
- Contact:
Re: Generic Cars [v0.1]
atm, try building some cars in a town, letting them all out with no orders, and deleting the depot. They actually drive randomly. I then tried doing the same on a large road network: wait some time, they all and up driving all over the place! simply fantastic!
So what your patch should do is: create a company that automatically builds cars in each town; the larger the town is the more cars it builds. Also, make this company invisible (as in, not really a company, you can't see it in the company list, maybe it could be part of the towns) and impossible to go bankrupt. OR make the grf have running costs set to 0 if possible, so cars can be built just for eye candy, for free, and do not lose any money.
So what your patch should do is: create a company that automatically builds cars in each town; the larger the town is the more cars it builds. Also, make this company invisible (as in, not really a company, you can't see it in the company list, maybe it could be part of the towns) and impossible to go bankrupt. OR make the grf have running costs set to 0 if possible, so cars can be built just for eye candy, for free, and do not lose any money.
I am little, ugly, and nasty. How do you do?
- CommanderZ
- Tycoon
- Posts: 1872
- Joined: 07 Apr 2008 18:29
- Location: Czech Republic
- Contact:
Re: Generic Cars [v0.1]
This would kill performance on larger maps. Anyways...god luck. I would love to have this feature.cmoiromain wrote:atm, try building some cars in a town, letting them all out with no orders, and deleting the depot. They actually drive randomly. I then tried doing the same on a large road network: wait some time, they all and up driving all over the place! simply fantastic!
So what your patch should do is: create a company that automatically builds cars in each town; the larger the town is the more cars it builds. Also, make this company invisible (as in, not really a company, you can't see it in the company list, maybe it could be part of the towns) and impossible to go bankrupt. OR make the grf have running costs set to 0 if possible, so cars can be built just for eye candy, for free, and do not lose any money.
Re: Generic Cars [v0.1]
It might be a good idea to move the discussion of a potential OpenTTD patch to the OpenTTD suggestions/development forum...
But anyway; which components of vehicle movement actually use the processing power? There must be various processes which are recalculated regularly which would be irrelevant for car traffic:
running cost
cargo payment
breakdowns
servicing
orders
pathfinder
basically all you would need is the movement code...
And for the managing company have you considered the noAI branch? There is already a full API for AI behaviour with roads... You may have to put in a feature request for an "invisible" company property.
But anyway; which components of vehicle movement actually use the processing power? There must be various processes which are recalculated regularly which would be irrelevant for car traffic:
running cost
cargo payment
breakdowns
servicing
orders
pathfinder
basically all you would need is the movement code...
And for the managing company have you considered the noAI branch? There is already a full API for AI behaviour with roads... You may have to put in a feature request for an "invisible" company property.
- CommanderZ
- Tycoon
- Posts: 1872
- Joined: 07 Apr 2008 18:29
- Location: Czech Republic
- Contact:
Re: Generic Cars [v0.1]
I gess most CPU-heavy is the pathinder (which is imo relevant).
Ayways, you would need a few thausand cars for a 512*512 map to make it look good.
Don't treat this as reasons why NOT to do it, of course someone should tr it, maybe it will be feasible. It is one thing I really hate about (O)TTD - everything is so dead. This could break it.
Phase II: Pedestrians
Ayways, you would need a few thausand cars for a 512*512 map to make it look good.
Don't treat this as reasons why NOT to do it, of course someone should tr it, maybe it will be feasible. It is one thing I really hate about (O)TTD - everything is so dead. This could break it.
Phase II: Pedestrians

Re: Generic Cars [v0.1]
I think Zephyris is right, this shouldn't be discussed here, especially since it's on OTTD in the TTDP area.
I'll work on it for a bit and see what I can come up with first.
NoAI I've not tried yet, I'll experiment a little with it as well. But pedestrians...
I'll leave that to someone else, and I don't think it would get done. It doesn't really have much bearing on anything; traffic in it's way does.
I'll work on it for a bit and see what I can come up with first.
NoAI I've not tried yet, I'll experiment a little with it as well. But pedestrians...
I'll leave that to someone else, and I don't think it would get done. It doesn't really have much bearing on anything; traffic in it's way does.
- pseudoprometheus
- Engineer
- Posts: 13
- Joined: 03 May 2007 19:42
- Location: Omaha, NE, US
Re: Generic Cars [v0.1]
I do think designing a patch to create automobile traffic in cities (and perhaps on the roads between them) is a worthwhile effort, and I've been wanting that feature for a while. Unlike pedestrian traffic (which I would like to see as well :;): ), automobile traffic really does matter for transport companies and really would add depth to the game, particularly for micromanagers and those who like to build inner-city passenger transit.
It's rather absurd to expect that a lorry could drive into the heart of a city and not be delayed by anything but other lorries and its own engine breaking down. Traffic should be something that the player has to take into account when building feeder systems and/or passenger transit.
Also, it could be [if coded accordingly] that automobile traffic would drop when a company's mass transit system is better and more efficient, creating (a) an incentive for players to build passenger transit so as to make feeder systems run more smoothly, and (b) visual feedback as to how well the player's passenger transit is doing. (An addition to this idea: the more traffic reductions a company produces, the more favor it earns with the local authority. If traffic reductions are dependent upon the location of stops and not just how many passengers are moved around per stop, it would realistically increase the importance of the 'reach' of one's passenger transit system.)
I think road vehicles are undervalued in OTTD/TTDP, and implementing these things could change that. Of course, it's a lot of work and I wouldn't know where to start, but the end result would be a richer game, not just "more eye candy."
It's rather absurd to expect that a lorry could drive into the heart of a city and not be delayed by anything but other lorries and its own engine breaking down. Traffic should be something that the player has to take into account when building feeder systems and/or passenger transit.
Also, it could be [if coded accordingly] that automobile traffic would drop when a company's mass transit system is better and more efficient, creating (a) an incentive for players to build passenger transit so as to make feeder systems run more smoothly, and (b) visual feedback as to how well the player's passenger transit is doing. (An addition to this idea: the more traffic reductions a company produces, the more favor it earns with the local authority. If traffic reductions are dependent upon the location of stops and not just how many passengers are moved around per stop, it would realistically increase the importance of the 'reach' of one's passenger transit system.)
I think road vehicles are undervalued in OTTD/TTDP, and implementing these things could change that. Of course, it's a lot of work and I wouldn't know where to start, but the end result would be a richer game, not just "more eye candy."
Hm?
- CommanderZ
- Tycoon
- Posts: 1872
- Joined: 07 Apr 2008 18:29
- Location: Czech Republic
- Contact:
Re: Generic Cars [v0.1]
You are mistaken, this will further weaken RVs, as traffic jams will significantly decrease their efficiency.I think road vehicles are undervalued in OTTD/TTDP, and implementing these things could change that.
- pseudoprometheus
- Engineer
- Posts: 13
- Joined: 03 May 2007 19:42
- Location: Omaha, NE, US
Re: Generic Cars [v0.1]
Good point. Perhaps something else could be changed to accommodate the higher frequency of traffic jams. The patch itself couldn't do this, but lowering RV running costs might help.CommanderZ wrote:You are mistaken, this will further weaken RVs, as traffic jams will significantly decrease their efficiency.
A "highway" class of roads (as opposed to just using two one-ways) could also help if the city cars and company lorries could be made to give it a higher priority, though I imagine that would significantly complicate the pathfinder. (e.g. "how much traffic is usually on the highway?", "will going out of my way to go to the nearby highway save me time compared to going straight to my destination through traffic?", etc.)
Sounds a little excessive, but something as significant as adding traffic means significant changes and workarounds I guess.
Hm?
Re: Generic Cars [v0.1]
Sigh....
For goodness sake, lay off it for the moment, I'm trying to work on it. Let me at least see what I can get it to do without breaking something else first, then you can use the thread for the patch I might make instead of here.
For goodness sake, lay off it for the moment, I'm trying to work on it. Let me at least see what I can get it to do without breaking something else first, then you can use the thread for the patch I might make instead of here.
- pseudoprometheus
- Engineer
- Posts: 13
- Joined: 03 May 2007 19:42
- Location: Omaha, NE, US
Re: Generic Cars [v0.1]
Sorry Gremnon, I was just throwing ideas out there in case somebody else wanted to work on the project too. If there was a separate thread, I would've posted there. Didn't mean to upset or overwhelm you, I just got excited. 

Hm?
Re: Generic Cars [v0.1]
I don't mind much, it's just this isn't really an ideal place to discuss it.
Let me work on it a bit more. It might be my first patch, so I'm going to see what I can do first, the build on that.
Let me work on it a bit more. It might be my first patch, so I'm going to see what I can do first, the build on that.
Re: Generic Cars [v0.1]
If CB36 would allow speddchange on RV's it is dooable with ease. If not, it's notcmoiromain wrote:Those cars are great!
Could it be possible to make them have random speeds when building (so we can see them overtaking each other), e.g. when building the same car twice, n°1 will have a maximum speed of 50kmph and n°2 will have 85kmph.

Re: Generic Cars [v0.1]
Unless you only display those who are in the neighbourhood of the screen...CommanderZ wrote:Ayways, you would need a few thausand cars for a 512*512 map to make it look good.
Contributor to the The 2cc Set and Dutch Trainset. Inventor of the Metro concept. Retired Graphics Artist.

Download TT | Latest TTDPatch | OpenTTD | OpenTTDCoop | BaNaNaS: OpenTTD content system | 2048² OTTD scenario of the Netherlands
GRF Codec | GRF Crawler | GRF Maker | Usefull graphics & tools sites | NML Documentation Wiki | NFO Documentation Wiki
All my graphics are licensed under GPL. "Always remember you're unique, just like everyone else."
Download TT | Latest TTDPatch | OpenTTD | OpenTTDCoop | BaNaNaS: OpenTTD content system | 2048² OTTD scenario of the Netherlands
GRF Codec | GRF Crawler | GRF Maker | Usefull graphics & tools sites | NML Documentation Wiki | NFO Documentation Wiki
All my graphics are licensed under GPL. "Always remember you're unique, just like everyone else."
Re: Generic Cars [v0.1]
In that case the road vehicles could not interact at all with trucks and buses otherwise it will be an instant desync...
- planetmaker
- OpenTTD Developer
- Posts: 9432
- Joined: 07 Nov 2007 22:44
- Location: Sol d
Re: Generic Cars [v0.1]
Right. It wouldn't hurt too much for a first step, though. On the other hand, as a 2nd step, one might give them just sufficient intelligence to get out of way of player vehiclesZephyris wrote:In that case the road vehicles could not interact at all with trucks and buses otherwise it will be an instant desync...

But of course, I see the requests coming in for interaction with player vehicles.
OpenTTD: manual | online content | translations | Wanted contributions and patches
#openttdcoop: blog | wiki | public server | DevZone | NewGRF web translator
DevZone - home of the free NewGRFs: OpenSFX | OpenMSX | OpenGFX | Swedish Rails | OpenGFX+ Trains|RV|Industries|Airports|Landscape | NML
Re: Generic Cars [v0.1]
For a "traffic" AI, how about this approach?
1. Use a build with shared infrastructure
2. Work with the noAI folks to create an AI that will create the traffic based on population and number of road stations. The cars will travel randomly among road stops.
1. Use a build with shared infrastructure
2. Work with the noAI folks to create an AI that will create the traffic based on population and number of road stations. The cars will travel randomly among road stops.
Who is John Galt?
Re: Generic Cars [v0.1]
Small towns probably won't have road stops, unless they're connected to another town...
Contributor to the The 2cc Set and Dutch Trainset. Inventor of the Metro concept. Retired Graphics Artist.

Download TT | Latest TTDPatch | OpenTTD | OpenTTDCoop | BaNaNaS: OpenTTD content system | 2048² OTTD scenario of the Netherlands
GRF Codec | GRF Crawler | GRF Maker | Usefull graphics & tools sites | NML Documentation Wiki | NFO Documentation Wiki
All my graphics are licensed under GPL. "Always remember you're unique, just like everyone else."
Download TT | Latest TTDPatch | OpenTTD | OpenTTDCoop | BaNaNaS: OpenTTD content system | 2048² OTTD scenario of the Netherlands
GRF Codec | GRF Crawler | GRF Maker | Usefull graphics & tools sites | NML Documentation Wiki | NFO Documentation Wiki
All my graphics are licensed under GPL. "Always remember you're unique, just like everyone else."
Re: Generic Cars [v0.1]
Best is to let them drive randomly. There's no need to waste valuable CPU time on a pathfinder for 'eye candy'.
Who is online
Users browsing this forum: No registered users and 7 guests