Passenger Transport

P1SIM is a commercial game under development featuring traffic, logistics, city building and more.
User avatar
smallfly
Chairman
Chairman
Posts: 884
Joined: 19 Oct 2009 13:29
Location: Germany

Passenger Transport

Post by smallfly »

For those who are interested in the passenger transporting system of P1SIM, I recommend reading the latest post on P1SIM.org about Passenger Transport Aspects.
preview.png
preview.png (23.15 KiB) Viewed 20978 times
As always I hope for constructive critism.
www.p1sim.org - P1SIM - Traffic, Logistics, City-Building & more
Join the discussions here on tt-forums.net!
User avatar
Katve
Transport Coordinator
Transport Coordinator
Posts: 382
Joined: 02 May 2011 12:49
Location: Finland

Re: Passenger Transport

Post by Katve »

Will there be only weekdays when people go to work and somebody have always holiday or will there be also weekends when passenger movements and movement times are different?
User avatar
thphwh
Director
Director
Posts: 516
Joined: 23 Dec 2011 13:50
Location: Letchworth GC

Re: Passenger Transport

Post by thphwh »

This is perfect! It is more complex than OpenTTD and also realistic. I like the idea of individuals and what their need is; like Roller Coaster Tycoon. Will they choose what mode of transport to take?
User avatar
smallfly
Chairman
Chairman
Posts: 884
Joined: 19 Oct 2009 13:29
Location: Germany

Re: Passenger Transport

Post by smallfly »

Katve wrote:Will there be only weekdays when people go to work and somebody have always holiday or will there be also weekends when passenger movements and movement times are different?
There won't be any differences beetween weekdays and weekend. Every day will be the same. A new destination is calculated every day.
thphwh wrote:Will they choose what mode of transport to take?
Passengers will go for the most suitable route. Comfort-orientated customers will choose more expensive, faster routes. Price-orientated customers will choose cheaper, slower routes.
www.p1sim.org - P1SIM - Traffic, Logistics, City-Building & more
Join the discussions here on tt-forums.net!
User avatar
thphwh
Director
Director
Posts: 516
Joined: 23 Dec 2011 13:50
Location: Letchworth GC

Re: Passenger Transport

Post by thphwh »

smallfly wrote: Passengers will go for the most suitable route. Comfort-orientated customers will choose more expensive, faster routes. Price-orientated customers will choose cheaper, slower routes.
Excellent! This system combines my two favorite games; (O)TTD and RCT. I like this system very much and cannot fault it.

OT: I like the graphics a lot, it reminds me of Simutrans Comic Pak. How are you making them?
User avatar
YNM
Tycoon
Tycoon
Posts: 3570
Joined: 22 Mar 2012 11:10
Location: West Java

Re: Passenger Transport

Post by YNM »

Seeing the last picture/scheme, isn't the number of "citizen id" would be soo limitating ? (unless its not as detailed as that, im agree)
YNM = yoursNotMine - Don't get it ?
「ヨーッスノットマイン」もと申します。
User avatar
smallfly
Chairman
Chairman
Posts: 884
Joined: 19 Oct 2009 13:29
Location: Germany

Re: Passenger Transport

Post by smallfly »

Yoursnotmine wrote:Seeing the last picture/scheme, isn't the number of "citizen id" would be soo limitating ? (unless its not as detailed as that, im agree)
Sorry i dont get the question. Could you please rephrase it?

The citizen id is a running number from 1 to x (total number of citizens on the map). The id is used as a seed for an internal random number Generator. Providing the Same seed leads to a citizen with identical characteristics. Thus citizen 747397 is always an Office worker and acts like a price orientated customer.
www.p1sim.org - P1SIM - Traffic, Logistics, City-Building & more
Join the discussions here on tt-forums.net!
LocoMH
Chairman
Chairman
Posts: 845
Joined: 26 Nov 2005 16:21
Location: Dresden (formerly Ruhr Area)
Contact:

Re: Passenger Transport

Post by LocoMH »

How many citizens are there possible might have been the question he was asking?
User avatar
YNM
Tycoon
Tycoon
Posts: 3570
Joined: 22 Mar 2012 11:10
Location: West Java

Re: Passenger Transport

Post by YNM »

LocoMH wrote:How many citizens are there possible might have been the question he was asking?
Ah, for sure I was asking that - I'm aware that this is depend on the computer specs. But, just give a ratio : How much your current computer can handle it ? (specs too, as its really effecting)
YNM = yoursNotMine - Don't get it ?
「ヨーッスノットマイン」もと申します。
User avatar
smallfly
Chairman
Chairman
Posts: 884
Joined: 19 Oct 2009 13:29
Location: Germany

Re: Passenger Transport

Post by smallfly »

Yoursnotmine wrote:
LocoMH wrote:How many citizens are there possible might have been the question he was asking?
Ah, for sure I was asking that - I'm aware that this is depend on the computer specs. But, just give a ratio : How much your current computer can handle it ? (specs too, as its really effecting)
I have to calculate the maximum amount (on modern personal computers) as soon as I know which data has to be saved for each citizen.

Currently I think each citizen has a

- numeric citizen identifier (32 bit integer) [much data is calculated in real time based on the identifier used a seed for a random generator]
- numeric flat identfier (32 bit integer) [where does the citizen live]
- numeric work identifier (32 bit integer) [where does the citizen work]
- numeric car identfier (32 bit integer) [which car belongs to this citizen]

But this list could be extended. Its just not sure yet. But I think there will be "enough" citizens. Don't worry ;-)
www.p1sim.org - P1SIM - Traffic, Logistics, City-Building & more
Join the discussions here on tt-forums.net!
Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4763
Joined: 09 Sep 2007 05:03
Location: home

Re: Passenger Transport

Post by Alberth »

I am a bit puzzled of what you're doing here.

Wouldn't object identity be a much more useful notion to identify a citizen rather than some number (that is, use (the address of) the Citizen object itself to identify a citizen)?
That also removes the 32bit limit without any further effort. It is also faster, as you eliminate the need to map numbers back to objects.
Obviously, in the same way you can use Work, Flat, and Car objects instead too.
I have a bit of trouble seeing a work identifier and a flat identifier as being unrelated to each other however :)

(The notion that every citizen has a car made me smile, apparently, nobody needs a public transport system ;) )


As for using citizen identification as seed for its properties:
Obviously, there is no need to store the properties in such a case, as it is duplicate information (that is, given a seed, I can compute the properties at any time).

Also, the normal approach with seeds is to initialize a random number generator one time (upon game start) with a seed, and then use that one generator for generating all values for all citizens (and all other things you want to have randomized).
Random number generators are carefully designed not to have correlation in the sequence of numbers that they generate.
By using a separate generator for each citizen, you may introduce such correlations, that is, reduce the quality of the drawn numbers.
User avatar
smallfly
Chairman
Chairman
Posts: 884
Joined: 19 Oct 2009 13:29
Location: Germany

Re: Passenger Transport

Post by smallfly »

Alberth wrote:Wouldn't object identity be a much more useful notion to identify a citizen rather than some number
Of course you are right. Only object pointers are saved. Thus the term "integer" is wrong. Sorry for that. [But object references (pointers) also have a size of 32 bit (or 64 bit on 64 bit systems).]
Alberth wrote:I have a bit of trouble seeing a work identifier and a flat identifier as being unrelated to each other however
Why should there be a relation between the citizen's flat and the citizen's factory/office?
Alberth wrote:The notion that every citizen has a car made me smile
Every citizen CAN save a car pointer. That doesn't mean that every citizen really has a car. To get accurate: Pupils and students wont own cars in P1SIM. All others do. But having a car doesn't mean always using car. Check out real life. If someone has a car, that does not mean, that s/he does not use public transport.
Alberth wrote:Obviously, there is no need to store the properties in such a case, as it is duplicate information (that is, given a seed, I can compute the properties at any time).
In general you are right. But in some cases it could be clever to store the calculated values.
Alberth wrote:Also, the normal approach with seeds is to initialize a random number generator one time (upon game start) with a seed, and then use that one generator for generating all values for all citizens (and all other things you want to have randomized).
I coded a random generator on my own. It always outputs the same number y when inputting the same number x. That way I can easily ask my "random generator": "Which shirt color does the citizen 45923 have?" And the generator will always output "green". [It will output an integer value which I translate to the color value]

That way I dont have to store the characteristics of a special citizen: Shirt color, car color, being price or comfort-orientated traveller, profession, gender, age etc. can be calculated in real time.
www.p1sim.org - P1SIM - Traffic, Logistics, City-Building & more
Join the discussions here on tt-forums.net!
Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4763
Joined: 09 Sep 2007 05:03
Location: home

Re: Passenger Transport

Post by Alberth »

Thanks for your clarifications.
Varkaleas
Engineer
Engineer
Posts: 86
Joined: 16 Apr 2012 08:38

Re: Passenger Transport

Post by Varkaleas »

smallfly wrote:I coded a random generator on my own. It always outputs the same number y when inputting the same number x. That way I can easily ask my "random generator": "Which shirt color does the citizen 45923 have?" And the generator will always output "green". [It will output an integer value which I translate to the color value]
All the computer based random number generators which I came across seem to work this way - you seed them with a value, or data set, and for the same seed a generator will always create the same sequence of numbers. I've been making use of this in some projects, about the same way you will use yours. But I didn't have to make my own for that.

Why did you make your own, and what's the special feature that the other crng's don't have? I'm asking because a 'good' crng is really had to design.
Working on a Simutrans fork with a nicer UI: http://sourceforge.net/projects/ironsimu/
User avatar
smallfly
Chairman
Chairman
Posts: 884
Joined: 19 Oct 2009 13:29
Location: Germany

Re: Passenger Transport

Post by smallfly »

OFFTOPIC:
Varkaleas wrote:Why did you make your own, and what's the special feature that the other crng's don't have? I'm asking because a 'good' crng is really had to design.
The random generator I am using is based on two seeds. It needed it for map generation. The map coordinates x/y 571/120 look completely different to 120/571. I didnt want any symmetrical terrain. If I would use a standard "mono-dimensional" random generator, the height value would be the same for x/y and y/x.

but this is a very technical detail of P1SIM, which i dont want to discuss here in the passenger transport section. if you would like to go on with this special discussion, please open a new thread for it or ask me via private message. thx

/OFFTOPIC
www.p1sim.org - P1SIM - Traffic, Logistics, City-Building & more
Join the discussions here on tt-forums.net!
User avatar
robo
Route Supervisor
Route Supervisor
Posts: 398
Joined: 14 Jan 2007 12:14

Re: Passenger Transport

Post by robo »

I'm a bit sceptical about passenger transport for several reasons (mainly for performance reasons).
I think you should keep it very simple, but in a way that it can add some complexity to the game.
I was playing Virtual City 2 Paradise Resort recently, not really a bad game (I usually prefer sandboxgameplay), but the passenger system is too simple and hard to understand, because for example, different passengers like office workers or tourists can't be identified by the player. There are no workers for industries in this game.
Although it could be fun to see some people walking around in a town, it may be better for performance if they would only show up at stations.
The game Virtual City 2 has industries and production chains which remind me industry giant2, but the concept of IG2 was better. One problem of IG2 were the ridiculous high profits, missing option to expand by credit and static demand. Virtual City 2 is only a disguised transport game (you can only make money by transporting people and rawmaterials/goods).
Theoretically it would be possible to reduce an economy to a simple formula for a game: One company's wages (costs) are other companies' revenues.
You could do a simple mod for locomotion: Buildings produce workers that go to industries, industries produce tired workers which go to shopping centers to buy goods and food and then return home, but the way tired workers buy goods (=more realistic demand) would need some extra programming work. ;)
User avatar
robo
Route Supervisor
Route Supervisor
Posts: 398
Joined: 14 Jan 2007 12:14

Re: Passenger Transport

Post by robo »

thphwh wrote:This is perfect! It is more complex than OpenTTD and also realistic. I like the idea of individuals and what their need is; like Roller Coaster Tycoon.
Yes, Rollercoaster tycoon already had a quite good economic model. Peeps have a certain amount of money they can spent and a few preferences how they spent it, they are getting hungry from time to time but there's a limit how much they can eat ;-). But trucks and trains have large capacities in reality and in order to meet the demand of people on this small scale you would have to scale down the transporting capacities of vehicles drastically?
User avatar
smallfly
Chairman
Chairman
Posts: 884
Joined: 19 Oct 2009 13:29
Location: Germany

Re: Passenger Transport

Post by smallfly »

Please stick to the topic: It's "Passenger Transport". Or post your ideas/questions to the correct thread, i.e. P1SIM - Economic System.
www.p1sim.org - P1SIM - Traffic, Logistics, City-Building & more
Join the discussions here on tt-forums.net!
User avatar
robo
Route Supervisor
Route Supervisor
Posts: 398
Joined: 14 Jan 2007 12:14

Re: Passenger Transport

Post by robo »

smallfly wrote:Please stick to the topic: It's "Passenger Transport". Or post your ideas/questions to the correct thread, i.e. P1SIM - Economic System.
I just wanted to point out that you need to connect public transport and economy in some way.
If you look at rollercoaster tycoon2, you realize that the pathfinding of people is quite poor (but good enough for this kind of game) and the game is written in assembler code, which seem to be more efficient than the programmcode programmers want to use today, but the game is still limited to a few thousand peeps.
For this reason it may be better to transfer people just from one station to another. Ideally they could "get sorted" at stations automatically with the capability to change the vehicle.
User avatar
smallfly
Chairman
Chairman
Posts: 884
Joined: 19 Oct 2009 13:29
Location: Germany

Re: Passenger Transport

Post by smallfly »

robo wrote:For this reason it may be better to transfer people just from one station to another. Ideally they could "get sorted" at stations automatically with the capability to change the vehicle.
I will join this discussion aspect when I have reached the programming routines of citizen generation/movement.
www.p1sim.org - P1SIM - Traffic, Logistics, City-Building & more
Join the discussions here on tt-forums.net!
Locked

Return to “P1SIM”

Who is online

Users browsing this forum: No registered users and 4 guests