[UNIV] New Tram Tracks Development

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
athanasios
Tycoon
Tycoon
Posts: 3138
Joined: 23 Jun 2005 00:09
Contact:

Re: New Tram Tracks [version 0.3 (2007/07/15)]

Post by athanasios »

This approach for drawing tram tracks above roads SUCKS A LOT. When I made a complain in OpenTTD about something relevant I didn't think that things are so HORRIBLE. :evil:
http://members.fortunecity.com/gamesart
"If no one is a fool I am also a fool." -The TTD maniac.


I prefer to be contacted through PMs. Thanks.
User avatar
OzTrans
Tycoon
Tycoon
Posts: 1680
Joined: 04 Mar 2005 01:07

Re: New Tram Tracks [version 0.3 (2007/07/15)]

Post by OzTrans »

stevenh wrote: ... The issue was snow tiles/climates/etc.... it was a neater and actually pretty-nice-looking answer to just draw the appropriate road tile underneath (since the off-road tram tiles didn't take the full width nor have the appropriate landscapes around them)
It should be straight forward to use as ground sprite, the road sprite if tracks are on-road and just the normal terrain sprite if tracks are off-road. If on-road, the tracks let the road show through and if off-road the tracks already include the balast and are different anyway.

Thus no need to add extra pixles to off-road track sprites to cover parts of road surface.
User avatar
stevenh
TTDPatch Developer
TTDPatch Developer
Posts: 759
Joined: 24 Jul 2005 05:07
Location: Canberra, Australia
Contact:

Re: New Tram Tracks [version 0.3 (2007/07/15)]

Post by stevenh »

athanasios wrote:This approach for drawing tram tracks above roads SUCKS A LOT. When I made a complain in OpenTTD about something relevant I didn't think that things are so HORRIBLE. :evil:
Thanks for the compliment... I hope you don't treat all your guests like this?

OzTransLtd wrote:It should be straight forward to use as ground sprite, the road sprite if tracks are on-road and just the normal terrain sprite if tracks are off-road. If on-road, the tracks let the road show through and if off-road the tracks already include the balast and are different anyway.
'Straight-forward', yes... IRL not-feasible for the current fornight due to work/social committments.

If anyone wants to give me a the addresses (ie. sprite numbers) of all the ground tiles for the respective situations then please do, it'll make this update a lot quicker.
User avatar
OzTrans
Tycoon
Tycoon
Posts: 1680
Joined: 04 Mar 2005 01:07

Re: New Tram Tracks [version 0.3 (2007/07/15)]

Post by OzTrans »

stevenh wrote: ... If anyone wants to give me a the addresses (ie. sprite numbers) of all the ground tiles for the respective situations then please do, it'll make this update a lot quicker.
Here you go. All terrain sprites (from trg1r.grf) are physically mapped to the road sprites above. I assume only below snow/rainforest and above snow/desert matters.
User avatar
stevenh
TTDPatch Developer
TTDPatch Developer
Posts: 759
Joined: 24 Jul 2005 05:07
Location: Canberra, Australia
Contact:

Re: New Tram Tracks [version 0.3 (2007/07/15)]

Post by stevenh »

OzTransLtd, you're the best... Unfortunately I'll need all possible road-tile bases (Desert, etc..) since I don't just get to assume what it's about to draw is correct... since that's an entire 'null' value.

I still need to refer back to the landscape arrays to get the correct current landscape data (ie. tile type for current landscape) and then choose the appropriate sprite... Shouldn't be too hard but I will need some time...

FooBar, I hope this helps with your GRF in the end.
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Re: New Tram Tracks [version 0.3 (2007/07/15)]

Post by DaleStan »

If memory serves, only those two tilesets ever exist. When other types are required, they replace those tiles with Action A-style behaviour.
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
User avatar
stevenh
TTDPatch Developer
TTDPatch Developer
Posts: 759
Joined: 24 Jul 2005 05:07
Location: Canberra, Australia
Contact:

Re: New Tram Tracks [version 0.3 (2007/07/15)]

Post by stevenh »

My apologies OzTransLtd, I should read your posts more thoroughly.... but not when I'm at work :P


This is starting to look a lot simpler and I'll try and look at it ASAP.
User avatar
OzTrans
Tycoon
Tycoon
Posts: 1680
Joined: 04 Mar 2005 01:07

Re: New Tram Tracks [version 0.3 (2007/07/15)]

Post by OzTrans »

DaleStan wrote:If memory serves, only those two tilesets ever exist. When other types are required, they replace those tiles with Action A-style behaviour.
That is how I understand it; whenever we replace sprites through action-A, we only need to think 'below snow' and 'above snow'; i.e. temperate, sub-arctic and rainforest always use the same sprite numbers, so do above snow and desert.
User avatar
FooBar
Tycoon
Tycoon
Posts: 6553
Joined: 21 May 2007 11:47
Location: The Netherlands
Contact:

Re: New Tram Tracks [version 0.3 (2007/07/15)]

Post by FooBar »

Replacing road sprites with ground sprites solves one problem (my problem), but will introduce another one concerning tunnel entrances (will be my problem).
Have a look at the attachment below. The left side shows how a straight piece of off-road track and a tunnel entrance of off-road track is drawn. The right side shows how both situations get drawn in the future (if this change is made). Works great on normal pieces, but off-road tunnel entrances are history, because a road surface is drawn underneath the tracks. Please note that plain straight pieces of track are used to place between the two parts of a tunnel entrance.

In my opinion, the best solution would be:
- Having three sets of track sprites: on for on-road, another for off-road tracks ground type A, a third for off-road tracks ground type B.
- Having ground sprites of type A or B drawn underneath the last two track types respectively.
- Having 3 times 2 extra sprites for tunnel entrances (two sprites for each track set). Currently, there are seperate track sprites for tunnel exits, but none for tunnel entrances.

This would solve my problems, and probably will work for anyone because all possibilities are covered. Of course this requires a lot of work. A complete new spriteset for trams needs to be created. In the game, correct sprites need to be used in the correct places. Not to forget that grf action 5 needs to be changed too!

EDIT:
Well, this time I'll include the attachment myself :?
Attachments
change-in-tram-tracks.png
change-in-tram-tracks.png (6.51 KiB) Viewed 4187 times
User avatar
stevenh
TTDPatch Developer
TTDPatch Developer
Posts: 759
Joined: 24 Jul 2005 05:07
Location: Canberra, Australia
Contact:

Re: New Tram Tracks [version 0.3 (2007/07/15)]

Post by stevenh »

FooBar wrote: - Having three sets of track sprites: on for on-road, another for off-road tracks ground type A, a third for off-road tracks ground type B.
- Having ground sprites of type A or B drawn underneath the last two track types respectively.
- Having 3 times 2 extra sprites for tunnel entrances (two sprites for each track set). Currently, there are seperate track sprites for tunnel exits, but none for tunnel entrances.
Where 'Ground-Type A' is Grass and 'Ground-Type B' is Snow (As a temperate example?) ... understood and do-able.
The tunnel entrances would run off the same principle.. you'd have to ammend the current sprite-set for the base graphics (ttdpbase.grf) at the same time to save Pikka the work (unless he wants to jump in.)

Can we get everyone elses opinion before we confirm this idea... This does mean that you'll have the ability to work with the 'off-road' tunnel entrances since you'll have an 'entrance piece' that will draw over the road tile... and unfortunately you will have to cover that entirely... re-working how tunnel entrances are drawn would be quite a headache.
User avatar
FooBar
Tycoon
Tycoon
Posts: 6553
Joined: 21 May 2007 11:47
Location: The Netherlands
Contact:

Re: New Tram Tracks [version 0.3 (2007/07/15)]

Post by FooBar »

stevenh wrote:Where 'Ground-Type A' is Grass and 'Ground-Type B' is Snow (As a temperate example?) The tunnel entrances would run off the same principle..
correct.
stevenh wrote:you'd have to ammend the current sprite-set for the base graphics (ttdpbase.grf) at the same time to save Pikka the work (unless he wants to jump in.)
No problem. Does it matter how sprites are ordered? I could add the new sprites to the end, but reordering the whole thing would make more sense. Do you need a .pcx, .nfo, both, .grf or all of them? I guess I should also remove the two unused sprites. This will break compatibility very badly though.


When this gets changed, people at OTTD are going to hate me. First it was the wires, then there was another problem with wires on bridges (that problem didn't exist in Patch) and now this. And all because of me wanting to create a stupid track set. :mrgreen:
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Re: New Tram Tracks [version 0.3 (2007/07/15)]

Post by DaleStan »

IMO, the order should be changed in such a way that the current sprites remain in their original positions. Note also that Steven only has to deal with two ground types, but for tunnel entrances you probably have to deal with all of them. I'd select the correct sprite block depending on climate (action 7 var 83).
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
User avatar
OzTrans
Tycoon
Tycoon
Posts: 1680
Joined: 04 Mar 2005 01:07

Re: New Tram Tracks [version 0.3 (2007/07/15)]

Post by OzTrans »

If moving to terrain only tiles for off-road tram tracks, then things should look like this (see pic).

The only thing needed to solve FooBar's problem with tunnels is another set of sprites for the southern tunnel exits (tram only and road and tram), similar to what we have for the northern exits; i.e. 2 + 2 sprites showing tram tracks.

@FooBar : I think you'll still have to replace the second sprite set (tram tracks with ballast) with your own; i.e. they should allow to show terrain between tracks. But different (new) sprites need to be used for the tunnel entrances. For tram only tunnels, you may want to show something other than grass (or snow) anyway, so the new sprites could be adjusted for graphical issues and should work with any tunnel.

Note : Tunnel GRFs should not be impacted by what tram tracks are doing.
User avatar
stevenh
TTDPatch Developer
TTDPatch Developer
Posts: 759
Joined: 24 Jul 2005 05:07
Location: Canberra, Australia
Contact:

Re: New Tram Tracks [version 0.3 (2007/07/15)]

Post by stevenh »

This is what I'm proposing:

:arrow: For Off-road tracks I draw the proper ground tiles; not the road tiles. [and then the artists modify the off-road tram tracks to show through whatever they want]
:arrow: On-Road tracks don't change... [even if they end up looking exactly like the off-road tiles.]
:arrow: On-Road tunnels don't change.
:arrow: Off-Road tunnels only require changes for the entrances/exits that use the full Off-road sprites (the 'Southern' ones as OzTransLtd stated.) Seeing as that there are two sprites free... we could just re-draw and use them... hence not shifting anything around in the GRF.

Everybody wins.
User avatar
FooBar
Tycoon
Tycoon
Posts: 6553
Joined: 21 May 2007 11:47
Location: The Netherlands
Contact:

Re: New Tram Tracks [version 0.3 (2007/07/15)]

Post by FooBar »

Your proposal is good enough for me, but I don't think it's a long-term fix.
What if next month someone shows up who wants to make fancy off-road tracks with heaps of snow along the side? Such thing really requires a third set of sprites, because we don't want those snow-heaps on grass.
More generally speaking: it will be possible to put bare tracks on bare ground, but will still be not possible to create a bit more ground-specific texturized look to blend in things a bit more.

You have my "go for it", but I really doubt this 'easy fix' is a final solution. It works for now, but does it still work in three months? It breaks ttdpbase[w].grf compatibility anyways (if not broken already).



@OzTransLtd:
Indeed I do have to replace the second sprite set. It will be something exactly like the first set :)
For tram only tunnels, I was thinking about concrete or something, just like the bridges. I could also put some kind of ballast in there. Grass doesn't really grow inside tunnels anyway.
User avatar
OzTrans
Tycoon
Tycoon
Posts: 1680
Joined: 04 Mar 2005 01:07

Re: New Tram Tracks [version 0.3 (2007/07/15)]

Post by OzTrans »

stevenh wrote:This is what I'm proposing: ...
Sounds good to me.
FooBar wrote: ... but I really doubt this 'easy fix' is a final solution. It works for now, but does it still work in three months? ...
You cannot have the cake and eat it too ... The tram tracks are an overlay of existing road sprites (on-road) and an overlay of terrain sprites (off-road) and that system should not interfere with other GRFs, like roads, tunnels and terrains. You could of course suggest a 3rd and a 4th etc track system to cover other situations, but that would require a rewrite of the whole tram system. The only thing I can think of is below/above snowline support for off-road tracks. But before we embark on this we should rewrite the road system. Currently we only have city roads, urban roads and urban roads above snowline. We don't have snowy city roads. We don't have snowy drive through bus stops nor bus/truck stations.

I'm quite happy if we get an off-road tram track system that can be different to the on-road one and does not share sprites.

BTW, what about tram only bridges ? Road bridge + off-road tram tracks (that let terrain show through) will visually look like a road and tram bridge !
User avatar
FooBar
Tycoon
Tycoon
Posts: 6553
Joined: 21 May 2007 11:47
Location: The Netherlands
Contact:

Re: New Tram Tracks [version 0.3 (2007/07/15)]

Post by FooBar »

I see. Well, I'm not a dev and don't know how difficult it is to change such things. You just convinced me that it's not easy at all.

I'll be happy when Steven does his proposed magic :mrgreen:

As for bridges, they have seperate sprites already. There's six of them. TBH I don't know if there's currently a road surface underneath or not, because I used a concrete looking overlay for that.
User avatar
OzTrans
Tycoon
Tycoon
Posts: 1680
Joined: 04 Mar 2005 01:07

Re: New Tram Tracks [version 0.3 (2007/07/15)]

Post by OzTrans »

FooBar wrote:... As for bridges, they have seperate sprites already. There's six of them. TBH I don't know if there's currently a road surface underneath or not, because I used a concrete looking overlay for that.
I forgot about them completely. Well, there is no problem with bridges then. But there is road underneath anyway, because there are no road-less bridge sprites. So, you just have to provide sprites that cover the road surface, which you have done already.
User avatar
FooBar
Tycoon
Tycoon
Posts: 6553
Joined: 21 May 2007 11:47
Location: The Netherlands
Contact:

Re: New Tram Tracks [version 0.3 (2007/07/15)]

Post by FooBar »

Let's digg this up again :mrgreen:

I've been on holidays for a couple of weeks and wasn't able to check the forums

Any news?
Stevenh, are you still willing to change the sprite drawing behaviour? I'd be more than happy with the changes you proposed a couple of weeks ago.
User avatar
FooBar
Tycoon
Tycoon
Posts: 6553
Joined: 21 May 2007 11:47
Location: The Netherlands
Contact:

Re: New Tram Tracks UPDATED [v0.4 oct 2007]

Post by FooBar »

New Version Released!
An all-new version has been released a couple of minutes ago (see first post)!

New Tram Tracks now supports all major climates as well as the New Terrain and the Japanese Landscape Set.

More information and screenshots in first post.
Post Reply

Return to “Graphics Development”

Who is online

Users browsing this forum: Google Adsense [Bot] and 55 guests