New Rail Types

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

peter1138
OpenTTD Developer
OpenTTD Developer
Posts: 1729
Joined: 30 Mar 2005 09:43

Re: New Rail Types

Post by peter1138 »

Proprosed spec change for cost factor from a byte to a word. Any objections?
He's like, some kind of OpenTTD developer.
maquinista
Tycoon
Tycoon
Posts: 1828
Joined: 10 Jul 2006 00:43
Location: Spain

Re: New Rail Types

Post by maquinista »

This is the problem that I see in extra zoom levels. There are grass between track tiles. It could be solved easily, allowing to place the new sprites over the default track tiles instead of landscape tiles.

I know that extra zoom levels are not a part of the official OpenTTD build, but This is very easy to solve, only with a new option in the Action 0 sprite, It would take only a bit, like draw overhead wires.

The construction could be made with the landscape tiles, because these tiles doesn't have grass.
Attachments
Screenshot.
Screenshot.
problem_railtypes.JPEG (118.37 KiB) Viewed 2996 times
Sorry if my english is too poor, I want learn it, but it isn't too easy.[/list][/size]
michael blunck
Tycoon
Tycoon
Posts: 5948
Joined: 27 Apr 2005 07:09
Contact:

Re: New Rail Types

Post by michael blunck »

petern wrote: Proprosed spec change for cost factor from a byte to a word. Any objections?
So, that "cost factor" isn´t a factor, i.e. [0 .. 255] * base_cost.build_track, but already the final cost?


Being on topic.

- I´ve already seen that colour byte for tracks in the mini map in your test .grf. Will this be implemented?

- And there should be a track description in the query tool.

- And instead of "random tiles for track" (mentioned somewhere in this thread?), having random tiles for tunnels (and possibly depots) would be far more interesting.

In any way, a promising feature.

regards
Michael
Image
Rubidium
OpenTTD Developer
OpenTTD Developer
Posts: 3815
Joined: 09 Feb 2006 19:15

Re: New Rail Types

Post by Rubidium »

michael blunck wrote:So, that "cost factor" isn´t a factor, i.e. [0 .. 255] * base_cost.build_track, but already the final cost?
It's a factor, although there are people that think a factor 255 difference between the cheapest and most expensive rail is not sufficient.
peter1138
OpenTTD Developer
OpenTTD Developer
Posts: 1729
Joined: 30 Mar 2005 09:43

Re: New Rail Types

Post by peter1138 »

maquinista wrote:This is the problem that I see in extra zoom levels. There are grass between track tiles. It could be solved easily, allowing to place the new sprites over the default track tiles instead of landscape tiles.
Draw your ground tiles properly.
He's like, some kind of OpenTTD developer.
User avatar
neob
Chief Executive
Chief Executive
Posts: 687
Joined: 29 Dec 2009 02:56

Re: New Rail Types

Post by neob »

any other reason why not consider including more flexibility to the artist beside your definition of proper?
Image
maquinista
Tycoon
Tycoon
Posts: 1828
Joined: 10 Jul 2006 00:43
Location: Spain

Re: New Rail Types

Post by maquinista »

The current tram graphics are drawn over roads.

It's only a option in the NFO code and It would be very helpful.
Sorry if my english is too poor, I want learn it, but it isn't too easy.[/list][/size]
frosch
OpenTTD Developer
OpenTTD Developer
Posts: 988
Joined: 20 Dec 2006 13:31
Location: Aschaffenburg

Re: New Rail Types

Post by frosch »

This is going to get quite off-topic. So, moderators, feel free to split off and lock :)

@maquinista: Sorry, you are wrong. This is not a simple change of adding a single bit. The exact same glitch also happens with bridgeheads, various cases with foundations, and probably in a dozen similiar places with houses, industries, and esp. newgrf stuff.

@neob: It has been said quite some times, that ground tiles may not extent the tiles' borders. E.g. http://www.tt-forums.net/viewtopic.php?p=847576#p847576 . If artists decide to not care about that, it is their decision, and not a problem of OTTD. If this would be reported as bug to OTTD to an not-ignorable amount, the fix would be to crop groundsprites to the allowed extents or just to force-disable the sets with a big red error box.
⢇⡸⢸⠢⡇⡇⢎⡁⢎⡱⢸⡱⢸⣭⠀⢸⢜⢸⢸⣀⢸⣀⢸⣭⢸⡱⠀⢰⠭⡆⣫⠰⣉⢸⢸⠀⢰⠭⡆⡯⡆⢹⠁⠀⢐⠰⡁
maquinista
Tycoon
Tycoon
Posts: 1828
Joined: 10 Jul 2006 00:43
Location: Spain

Re: New Rail Types

Post by maquinista »

frosch wrote:This is going to get quite off-topic. So, moderators, feel free to split off and lock :)

@maquinista: Sorry, you are wrong. This is not a simple change of adding a single bit. The exact same glitch also happens with bridgeheads, various cases with foundations, and probably in a dozen similiar places with houses, industries, and esp. newgrf stuff.

@neob: It has been said quite some times, that ground tiles may not extent the tiles' borders. E.g. http://www.tt-forums.net/viewtopic.php?p=847576#p847576 . If artists decide to not care about that, it is their decision, and not a problem of OTTD. If this would be reported as bug to OTTD to an not-ignorable amount, the fix would be to crop groundsprites to the allowed extents or just to force-disable the sets with a big red error box.
But I'm suggesting something that could be useful not only in 32 bpp extra zoom levels. This could be useful to develop a railtype with a third rail without draw the railways. The sprite could be only the third rail, drawn over the default railway sprite.


But If this is not possible, Ok, don't problem. This was only a suggestion. Maybe It could be solved with a higher railway sprites, and maybe with a short grass in the rail way points (these areas can't be overlapped), leaving the ballast overlap the grass in the other areas.
Sorry if my english is too poor, I want learn it, but it isn't too easy.[/list][/size]
peter1138
OpenTTD Developer
OpenTTD Developer
Posts: 1729
Joined: 30 Mar 2005 09:43

Re: New Rail Types

Post by peter1138 »

As you are happy with the ground tile overlapping, there is no reason you can't go the whole hog and make the track overlay sprite overlap as well. Sure, it will look odd in some cases, but then you have that problem anyway.
He's like, some kind of OpenTTD developer.
User avatar
adf88
Chief Executive
Chief Executive
Posts: 644
Joined: 14 Jan 2008 15:51
Location: PL

Re: New Rail Types

Post by adf88 »

maquinista wrote:This is the problem that I see in extra zoom levels. There are grass between track tiles.
Hmm, looks like this is a result of improper magnify algorithm. You cannot treat pixels that are out of a tile as simply transparent pixels. You must treat them as they are not a part of image. When you extrapolate new colours of pixels at edge, you cannot read surrounding pixels from original image that are out of a tile area.
Nearest neighbour algorithm would be better here, modified a little to handle tile edges properly.
:] don't worry, be happy and checkout my patches
peter1138
OpenTTD Developer
OpenTTD Developer
Posts: 1729
Joined: 30 Mar 2005 09:43

Re: New Rail Types

Post by peter1138 »

michael blunck wrote:- I´ve already seen that colour byte for tracks in the mini map in your test .grf. Will this be implemented?
Yup, this is now in.
michael blunck wrote:- And there should be a track description in the query tool.
Still looking at this, hopefully simple enough but will cause quite a bit of string changes, along with a new property.
michael blunck wrote:- And instead of "random tiles for track" (mentioned somewhere in this thread?), having random tiles for tunnels (and possibly depots) would be far more interesting.
The random data provided by random action2 will work for any tile with rail on it, be it level crossing, depot, tunnels, etc. However it is pseudo-random, so the random data will always be the same on the same tile, and can't be altered.
He's like, some kind of OpenTTD developer.
User avatar
HackaLittleBit
Director
Director
Posts: 550
Joined: 10 Dec 2008 16:08
Location: tile 0x0000

Re: New Rail Types

Post by HackaLittleBit »

petern wrote:michael blunck wrote:
- And instead of "random tiles for track" (mentioned somewhere in this thread?), having random tiles for tunnels (and possibly depots) would be far more interesting.
The random data provided by random action2 will work for any tile with rail on it, be it level crossing, depot, tunnels, etc. However it is pseudo-random, so the random data will always be the same on the same tile, and can't be altered.
As long as the hole that the vehicles enter has the same size and form that should not be a problem otherwise you would get graphical glitches.
The point of becoming visible, invisible is fixed. and unfortunately different for road vehicles and trains.
I do not know if the size of the tunnel entrances (hole) is defined.

EDIT: Thinking about that now It would be perfect if each tunnel sprite could define that x,y point for vehicle to become (in)visible. :roll:
User avatar
Snail
Tycoon
Tycoon
Posts: 1283
Joined: 28 Apr 2003 18:52
Contact:

Re: New Rail Types

Post by Snail »

hackalittlebit wrote:
michael blunck wrote::
- And instead of "random tiles for track" (mentioned somewhere in this thread?), having random tiles for tunnels (and possibly depots) would be far more interesting.
As long as the hole that the vehicles enter has the same size and form that should not be a problem otherwise you would get graphical glitches.
The point of becoming visible, invisible is fixed. and unfortunately different for road vehicles and trains.
I do not know if the size of the tunnel entrances (hole) is defined.

EDIT: Thinking about that now It would be perfect if each tunnel sprite could define that x,y point for vehicle to become (in)visible. :roll:
Another interesting idea. Maybe, instead of random tunnels, we could have tunnels whose appearance changes according to the year the tunnel was built? So we could have "old style" stone-built tunnel entrances as well as modern entrances built in concrete...
The French Narrow Gauge Train Set is now released! Get it here
michael blunck
Tycoon
Tycoon
Posts: 5948
Joined: 27 Apr 2005 07:09
Contact:

Re: New Rail Types

Post by michael blunck »

Snail wrote: [...] Maybe, instead of random tunnels, we could have tunnels whose appearance changes according to the year the tunnel was built?
Since tunnels are linked to their track type class, we already have something like this, if track types are introduced over time.

But o/c, if Peter likes it, he may add more frills. :cool:

regards
Michael
Image
User avatar
PikkaBird
Graphics Moderator
Graphics Moderator
Posts: 5601
Joined: 13 Sep 2004 13:21
Location: The Moon

Re: New Rail Types

Post by PikkaBird »

Gentlemens,

Is it possible to disable the default rail types? (a la disabling default industries, houses...)

If not, a request!
User avatar
DJ Nekkid
Tycoon
Tycoon
Posts: 2141
Joined: 30 Nov 2006 20:33

Re: New Rail Types

Post by DJ Nekkid »

Isnt it already? If no rail vehicles are able to run on the certain track, then they are disabled as well? :)
Member of the
ImageImage
User avatar
PikkaBird
Graphics Moderator
Graphics Moderator
Posts: 5601
Joined: 13 Sep 2004 13:21
Location: The Moon

Re: New Rail Types

Post by PikkaBird »

They're greyed out, but they're still in the list. ;)
User avatar
Snail
Tycoon
Tycoon
Posts: 1283
Joined: 28 Apr 2003 18:52
Contact:

Re: New Rail Types

Post by Snail »

michael blunck wrote: Since tunnels are linked to their track type class, we already have something like this, if track types are introduced over time.
That's true, but there might be some track types that last for most part of the game and are never replaced (for instance, NG tracks).
Also, a player might want to build a new branch line very late in the game using light, cheap SG track. In that case, that line should display modern-looking concrete tunnel portals rather than old-style portals built in stone...
The French Narrow Gauge Train Set is now released! Get it here
User avatar
DJ Nekkid
Tycoon
Tycoon
Posts: 2141
Joined: 30 Nov 2006 20:33

Re: New Rail Types

Post by DJ Nekkid »

Tunnels:

Why not "only" use VarAction2 variable 23 or 24? They will update over time tho, and not on when they are built, but with some trickery they may not change all at once...
Member of the
ImageImage
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 11 guests