Sloped stations (r15114)

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
Wolf01
Tycoon
Tycoon
Posts: 2013
Joined: 24 Apr 2004 10:43
Location: Venezia - Italia
Contact:

Sloped stations (r15114)

Post by Wolf01 »

v04 Bugfixing
- Fix: Airports have foundations again
- Fix: Roadbays on slopes now show the right graphics
- Fix: Vehicles now don't sink on the roadbay if placed on slope
- Fix: Debug PBS graphics now shows correct trackbit on sloped stations
- Change: a lot of code duplication and useless code removed

===========
v03 Initial release

Here's the first good looking version of my sloped stations patch.
It still have some bugs like the road bay placed on slopes but not facing the slopes become sloped too. (FIXED)
Rail stations don't look so good, ok they are really weird.
Roadstops and truckstops are really good, I didn't tried it with trams yet.
This patch should be compatible with old savegames because I didn't added new things, I only changed a bit the drawing code and the check which disallowed to build stations facing slopes.
Savegames made with this patch should be compatible with trunk too.
What it misses is newgrf support, a little of code style and less code duplication.

Try it and let me know what you think :D

Win32 build attached, it should need only the original grfs to work
Attachments
sloped_stations_final.PNG
sloped_stations_final.PNG (91.43 KiB) Viewed 11411 times
sloped_stations_15114_v04.diff
(8.85 KiB) Downloaded 158 times
sloped_stations.zip
(3.59 MiB) Downloaded 171 times
Last edited by Wolf01 on 17 Jan 2009 00:15, edited 3 times in total.

jaybud4
Engineer
Engineer
Posts: 116
Joined: 16 Feb 2008 06:13

Re: Sloped stations (r15098)

Post by jaybud4 »

Just a thought, rail stations might look better if you draw the rails AFTER the station.
That way the station won't go over the rail and look horrible.
Granted, it's not a perfect solution, but...
Image
If you're bugged by anything I say/do: Please send me a PM. I don't always watch every thread I post in after I do so.

User avatar
SirkoZ
Tycoon
Tycoon
Posts: 1507
Joined: 06 Mar 2004 23:51
Location: The sunny side of Alps

Re: Sloped stations (r15098)

Post by SirkoZ »

A very useful patch indeed. Keep up the good work, Wolf01.

User avatar
Wolf01
Tycoon
Tycoon
Posts: 2013
Joined: 24 Apr 2004 10:43
Location: Venezia - Italia
Contact:

Re: Sloped stations (r15098)

Post by Wolf01 »

jaybud4 wrote:Just a thought, rail stations might look better if you draw the rails AFTER the station.
That's the case I want to not do at all, stations must be drawn over the rails (like the 8 shaped test track) with the proper sloped graphics
What you mean is already done at the squared test track, since tracks/roads come with terrain tile the terrain will always be drawn over the station and the station partly disappear

User avatar
Wolf01
Tycoon
Tycoon
Posts: 2013
Joined: 24 Apr 2004 10:43
Location: Venezia - Italia
Contact:

Re: Sloped stations (r15098)

Post by Wolf01 »

Updated first post, new version, less duplicate code, less stupid comments, less bugs and thank you frosch for the support :D

DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Re: Sloped stations (r15098)

Post by DaleStan »

Wolf01 wrote:less stupid comments, less bugs
"Fewer", "fewer"! Bugs and comments (stupid or otherwise) are both countable. If you can count them there are fewer of them; if you can't count it, there's less of it.
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

MJS
Director
Director
Posts: 539
Joined: 28 Jul 2005 09:31

Re: Sloped stations (r15114)

Post by MJS »

So your idea, Wolf, is that somebody now draws a sloped station that will also look right, is that correct? Because with the default stations it looks quite ugly indeed.

User avatar
Wolf01
Tycoon
Tycoon
Posts: 2013
Joined: 24 Apr 2004 10:43
Location: Venezia - Italia
Contact:

Re: Sloped stations (r15114)

Post by Wolf01 »

Drawing sloped station is not enough, I need first to code the support for the new 4 sloped tiles which might be included in openttd(d/w).grf, then I'll have to think about a newgrf callback and what it should do.

These are some ideas I have:
* Foundation always leveled, example: buffer stop should be always horizontal also on slopes
* Allowed slope directions, example: always buffer stop, can be built on slope, but not facing the slope (or you'll get a step)
* Different graphic for the same station class when built on plain or on slope, to avoid too many entries on the station class list

User avatar
ostlandr
Chairman
Chairman
Posts: 882
Joined: 12 May 2007 01:09
Location: Northeastern USA

Re: Sloped stations (r15114)

Post by ostlandr »

I like this idea! Not sure if I would use it for rail, but sloped stations for bus/truck stops would be wonderful. I hate it when I count the tiles and decide I need a bus stop there - and it's a sloped tile. I tend to build joined drive-through stations for passengers and mail, and sometimes with slopes and curves I can't do that.
Who is John Galt?

User avatar
andythenorth
Tycoon
Tycoon
Posts: 5154
Joined: 31 Mar 2007 14:23
Location: Lost in Music

Re: Sloped stations (r15114)

Post by andythenorth »

Nice patch.

Sloped rail stations: EDIT (because maybe I was a bit unfair about this patch). I wouldn't use them for trains, but that doesn't matter, other people might like them. I don't know of any sloped stations in real life anywhere except a cog railway or cable railway (with apologies to Belugas for bringing real life into the discussion). One thing though, I know how much work goes into the station grfs, and slopes just produces about 8x more drawing work.

Sloped road stops: absolutely yes, brilliant. :D For towns like this, it would really help in the game. Also, there are no problems to do with 'real life' and not many graphics would be needed.
road_stops_slopes_yes.png
road_stops_slopes_yes.png (210.28 KiB) Viewed 10289 times
cheers,

Andy
Last edited by andythenorth on 19 Jan 2009 07:56, edited 1 time in total.

User avatar
belugas
OpenTTD Developer
OpenTTD Developer
Posts: 1507
Joined: 05 Apr 2005 01:48
Location: Deep down the deepest blue
Contact:

Re: Sloped stations (r15114)

Post by belugas »

andythenorth wrote:Sloped rail stations: no thanks. :( Find me a sloped station in real life anywhere except a cog railway or cable railway (with apologies to Belugas for bringing real life into the discussion).
No offense taken. But i'd say that I like the sloped rail station, actually.
Thing is, as always, you do like them? Do not use them. As simple as that.
Keep on working fine Wolf01 :D
If you are not ready to work a bit for your ideas, it means they don't count much for you.
OpenTTD and Realism? Well... Here are a few thoughs on the matter.
He he he he
------------------------------------------------------------
Music from the Bloody Time Zones

User avatar
andythenorth
Tycoon
Tycoon
Posts: 5154
Joined: 31 Mar 2007 14:23
Location: Lost in Music

Re: Sloped stations (r15114)

Post by andythenorth »

belugas wrote:Thing is, as always, you do like them? Do not use them. As simple as that.
I've edited my post above in case it was discouraging to Wolf01. (It's a nice patch!)

I've thought of a situation where I would use sloped rail stations. I still wouldn't use them for train platforms, but they could be useful for some of the many non-track tiles in sets like ISR, especially the road tile pieces. This would need new sprites drawing though :twisted:

cheers,

Andy
Last edited by andythenorth on 19 Jan 2009 21:54, edited 1 time in total.

User avatar
khamura
Traffic Manager
Traffic Manager
Posts: 218
Joined: 27 May 2005 21:50
Location: Tourian, Planet Zebes, Orion Arm, Milky Way
Contact:

Re: Sloped stations (r15114)

Post by khamura »

andythenorth wrote:I've thought of a situation where I would use for sloped rail stations. I still wouldn't use them for train platforms, but they could be useful for some of the many non-track tiles in sets like ISR, especially the road tile pieces. This would need new sprites drawing though :twisted:
One word:

Waypoints. 8)
Graduate of the LeRoy Funkified Badass School of Soul

User avatar
Thief^
Route Supervisor
Route Supervisor
Posts: 468
Joined: 10 Oct 2004 00:11

Re: Sloped stations (r15114)

Post by Thief^ »

Can we get the "inline road stops on slopes" part separated and put forward for merging into trunk? Those already look perfect and we can sort out whether train stations on slopes makes sense or could be made to look good later.
Melt with the Shadows,
Embrace your destiny...

User avatar
CommanderZ
Tycoon
Tycoon
Posts: 1872
Joined: 07 Apr 2008 18:29
Location: Czech Republic
Contact:

Re: Sloped stations (r15114)

Post by CommanderZ »

Thief^ wrote:Can we get the "inline road stops on slopes" part separated and put forward for merging into trunk? Those already look perfect and we can sort out whether train stations on slopes makes sense or could be made to look good later.
Good idea. Any voluteers to create sloped DTRS graphics? :P

User avatar
JacobD88
Chief Executive
Chief Executive
Posts: 675
Joined: 16 Aug 2008 17:51
Location: Long Eaton, Nottinghamshire. UK
Contact:

Re: Sloped stations (r15114)

Post by JacobD88 »

MJS wrote:So your idea, Wolf, is that somebody now draws a sloped station that will also look right, is that correct? Because with the default stations it looks quite ugly indeed.
I have a suggestion (if its possible coding wise, im not sure) but in the immediate future, until special sloped graphics become available why not make the patch only display the foreground portions of a station tile and any roofs, it may not work with all station sets but it will stop the background portion of a station tile being lost in the slope...

Seen as the majority of station sets comprise of foreground, background, and roof tiles i can't see this being a problem appearance wise, you just need to find some way to tell the graphics engine not to display the background portion on these sloped tiles :)

It would certainly make the default graphics in the FP look nicer anyhoo as non of the station buildings would be there to sink into the slope or fall over the track

User avatar
Wolf01
Tycoon
Tycoon
Posts: 2013
Joined: 24 Apr 2004 10:43
Location: Venezia - Italia
Contact:

Re: Sloped stations (r15114)

Post by Wolf01 »

Ok, I'll try to take in account your suggestions (but I should tell that limiting to road stations only need to add code, not to remove it :P) especially to ones for drawing only part of the stations (roofs and maybe benches)
But this when I'll have time, at least somebody doesn't want to give me a boost :)

User avatar
coyoteelabs
Engineer
Engineer
Posts: 25
Joined: 07 Aug 2006 09:52
Location: Romania

Re: Sloped stations (r15114)

Post by coyoteelabs »

I would recommend a flag for the station graphics that specifies whether that graphics set has the needed sprites for sloped stations or not.
That way, the patch could be allowed in trunk more easily since it wouldn't need graphics for it to be included.

If a gfx set doesn't have slopped station sprites, just use old behavior and show an error message. This would also prevent glitches when using graphics sets that don't have the needed sprites.

User avatar
Thief^
Route Supervisor
Route Supervisor
Posts: 468
Joined: 10 Oct 2004 00:11

Re: Sloped stations (r15114)

Post by Thief^ »

THAT sounds like a good idea.

Though the default drive-through bus and truck stops sould be marked as supporting it, because they look fine on a slope.
Melt with the Shadows,
Embrace your destiny...

User avatar
FooBar
Tycoon
Tycoon
Posts: 6559
Joined: 21 May 2007 11:47
Location: The Netherlands
Contact:

Re: Sloped stations (r15114)

Post by FooBar »

Thief^ wrote:Though the default drive-through bus and truck stops sould be marked as supporting it, because they look fine on a slope.
I think it's better to have proper graphics for those right from the start. Since the current drive through graphics are currently shipped within openttd(w).grf, I don't think it would hurt adding the graphics for four additional directions (16 sprites: 4 directions, 2 sprites per direction, 2 types (bus, truck)). I don't mind voluteering to create those sprites tomorrow night.

The sprites could be added to the end of Type 11 for Action 05. And then in the same order as sprites 1324-1327 of trg1[r].grf.

Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: Google [Bot] and 17 guests