[OTTD] Generic Cars [v0.4] 22/02/2010

Discuss, get help with, or post new graphics for TTDPatch and OpenTTD, using the NewGRF system, here. Graphics for plain TTD also acceptable here.

Moderator: Graphics Moderators

User avatar
cmoiromain
Chief Executive
Chief Executive
Posts: 655
Joined: 15 Jan 2007 21:45
Location: FRANCE
Contact:

Re: Generic Cars [v0.1]

Post by cmoiromain »

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.
I am little, ugly, and nasty. How do you do?
User avatar
Gremnon
Tycoon
Tycoon
Posts: 1517
Joined: 16 Sep 2005 12:23
Skype: the_gremnon
Location: /home
Contact:

Re: Generic Cars [v0.1]

Post by Gremnon »

cmoiromain wrote:...let them drive randomly on the map...
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.
At least until I run into a roadblock on it - no pun intended.
User avatar
cmoiromain
Chief Executive
Chief Executive
Posts: 655
Joined: 15 Jan 2007 21:45
Location: FRANCE
Contact:

Re: Generic Cars [v0.1]

Post by cmoiromain »

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.
I am little, ugly, and nasty. How do you do?
User avatar
CommanderZ
Tycoon
Tycoon
Posts: 1872
Joined: 07 Apr 2008 18:29
Location: Czech Republic
Contact:

Re: Generic Cars [v0.1]

Post by CommanderZ »

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.
This would kill performance on larger maps. Anyways...god luck. I would love to have this feature.
User avatar
Zephyris
Tycoon
Tycoon
Posts: 2897
Joined: 16 May 2007 16:59

Re: Generic Cars [v0.1]

Post by Zephyris »

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.
User avatar
CommanderZ
Tycoon
Tycoon
Posts: 1872
Joined: 07 Apr 2008 18:29
Location: Czech Republic
Contact:

Re: Generic Cars [v0.1]

Post by CommanderZ »

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 :)
User avatar
Gremnon
Tycoon
Tycoon
Posts: 1517
Joined: 16 Sep 2005 12:23
Skype: the_gremnon
Location: /home
Contact:

Re: Generic Cars [v0.1]

Post by Gremnon »

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.
User avatar
pseudoprometheus
Engineer
Engineer
Posts: 13
Joined: 03 May 2007 19:42
Location: Omaha, NE, US

Re: Generic Cars [v0.1]

Post by pseudoprometheus »

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."
Hm?
User avatar
CommanderZ
Tycoon
Tycoon
Posts: 1872
Joined: 07 Apr 2008 18:29
Location: Czech Republic
Contact:

Re: Generic Cars [v0.1]

Post by CommanderZ »

I think road vehicles are undervalued in OTTD/TTDP, and implementing these things could change that.
You are mistaken, this will further weaken RVs, as traffic jams will significantly decrease their efficiency.
User avatar
pseudoprometheus
Engineer
Engineer
Posts: 13
Joined: 03 May 2007 19:42
Location: Omaha, NE, US

Re: Generic Cars [v0.1]

Post by pseudoprometheus »

CommanderZ wrote:
You are mistaken, this will further weaken RVs, as traffic jams will significantly decrease their efficiency.
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.

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?
User avatar
Gremnon
Tycoon
Tycoon
Posts: 1517
Joined: 16 Sep 2005 12:23
Skype: the_gremnon
Location: /home
Contact:

Re: Generic Cars [v0.1]

Post by Gremnon »

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.
User avatar
pseudoprometheus
Engineer
Engineer
Posts: 13
Joined: 03 May 2007 19:42
Location: Omaha, NE, US

Re: Generic Cars [v0.1]

Post by pseudoprometheus »

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?
User avatar
Gremnon
Tycoon
Tycoon
Posts: 1517
Joined: 16 Sep 2005 12:23
Skype: the_gremnon
Location: /home
Contact:

Re: Generic Cars [v0.1]

Post by Gremnon »

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.
User avatar
DJ Nekkid
Tycoon
Tycoon
Posts: 2141
Joined: 30 Nov 2006 20:33

Re: Generic Cars [v0.1]

Post by DJ Nekkid »

cmoiromain 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.
If CB36 would allow speddchange on RV's it is dooable with ease. If not, it's not :)
Member of the
ImageImage
User avatar
Purno
Tycoon
Tycoon
Posts: 16659
Joined: 30 Mar 2004 12:30
Location: Almere, The Netherlands

Re: Generic Cars [v0.1]

Post by Purno »

CommanderZ wrote:Ayways, you would need a few thausand cars for a 512*512 map to make it look good.
Unless you only display those who are in the neighbourhood of the screen...
Contributor to the The 2cc Set and Dutch Trainset. Inventor of the Metro concept. Retired Graphics Artist.
Image Image
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."
User avatar
Zephyris
Tycoon
Tycoon
Posts: 2897
Joined: 16 May 2007 16:59

Re: Generic Cars [v0.1]

Post by Zephyris »

In that case the road vehicles could not interact at all with trucks and buses otherwise it will be an instant desync...
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: Generic Cars [v0.1]

Post by planetmaker »

Zephyris wrote:In that case the road vehicles could not interact at all with trucks and buses otherwise it will be an instant desync...
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 vehicles :) - as unrealistic as that may be. (doh, the 'r'-word, there it is).

But of course, I see the requests coming in for interaction with player vehicles.
User avatar
ostlandr
Chairman
Chairman
Posts: 882
Joined: 12 May 2007 01:09
Location: Northeastern USA

Re: Generic Cars [v0.1]

Post by ostlandr »

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.
Who is John Galt?
User avatar
Purno
Tycoon
Tycoon
Posts: 16659
Joined: 30 Mar 2004 12:30
Location: Almere, The Netherlands

Re: Generic Cars [v0.1]

Post by Purno »

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.
Image Image
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."
Youri219
Traffic Manager
Traffic Manager
Posts: 191
Joined: 28 Apr 2007 11:53

Re: Generic Cars [v0.1]

Post by Youri219 »

Best is to let them drive randomly. There's no need to waste valuable CPU time on a pathfinder for 'eye candy'.
Post Reply

Return to “Graphics Development”

Who is online

Users browsing this forum: No registered users and 2 guests