Advice needed: multiple stops per stations in Station struct

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

Post Reply
User avatar
Celestar
Director
Director
Posts: 574
Joined: 02 Jul 2004 10:56
Contact:

Advice needed: multiple stops per stations in Station struct

Post by Celestar »

Hi

As some of you might have noticed, I'm working on the multiple road stops per stations thing. Most of it works pretty nicely meanwhile, just the code is ugly as hell, so I'll start tidying it up. However, I need your opinion about one problem.

Currently the Stations struct has two entries for the bus stations (all this goes for the truck stops as well). bus_tile and bus_stop_status. I'm going to implement the possibility to build "NUM_ROAD_STOPS" stations. So my first idea was to convert that to bus_tile[NUM_ROAD_STOPS] and bus_stop_status[NUM_ROAD_STOPS], I'd also need at least (trying to keep it at one) one other variable, let's call it bus_queue_system[NUM_ROAD_STOPS]. However, I'm not sure if this is the optimal solution.

If any of you have a better idea than the arrays, please let me know soon. (I'd like to freeze the design tomorrow latest). Some code or code fractions would be nice. Please notice that I'll need a good number of loops that run through all stops at a station.

Also, I'd like opinions about what "NUM_ROAD_STOPS" should be set to? 4? 8? ..

Last but not least, how should I treat savegames and "loadgames"?

Celestar
Storwin
Engineer
Engineer
Posts: 67
Joined: 16 Jan 2003 02:51

Post by Storwin »

I've got no clue as to what that means or what the impact might be, but good job on more useful features ;)
User avatar
lucaspiller
Tycoon
Tycoon
Posts: 1228
Joined: 18 Apr 2004 20:27

Post by lucaspiller »

From what I have been reading about the destinations thing the users like to be in control. As such NUM_ROAD_STOPS should be configurable by the user rather than limited by the developer.
matthijs
Engineer
Engineer
Posts: 76
Joined: 25 Jun 2004 15:20
Location: Enschede, Netherlands
Contact:

Post by matthijs »

Problem with making that user configurable, is that you can't allocate the array statically, but must do it dynamically which is less convenient (but possible I think?)
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 13 guests