Transport Tycoon Forums

The place to talk about Transport Tycoon
It is currently Tue Mar 19, 2019 5:01 am

All times are UTC




Post new topic  Reply to topic  [ 72 posts ]  Go to page 1 2 3 4 Next
Author Message
 Post subject: [WIP] Trails
PostPosted: Sun Jun 22, 2008 11:14 am 
Offline
Tycoon
Tycoon

Joined: Sun Apr 08, 2007 4:07 am
Posts: 1884
This topic is dedicated for my patch that adds a third road type, a kind of dirt road only to be used by heavy trucks and maybe horse carriages. The idea came from andythenorth in this thread: viewtopic.php?f=32&t=37964

FYI, I've talked to Rubidium about the topic of new road types, and new road types won't be added in trunk until a rewrite of the system is done. So this will stay a patch of its own for now, with (sadly) only eyecandy-purposes.

The patch is currently WIP.
I will update this thread if there are news.

_________________
* @Belugas wonders what is worst... a mom or a wife...
<Lakie> Well, they do the same thing but the code is different.

______________
My patches
check my wiki page (sticky button) for a complete list

ImageImage
ImageImageImageImageImageImageImage


Top
   
 Post subject: Re: [WIP] Trails
PostPosted: Sun Jun 22, 2008 11:14 am 
Offline
Tycoon
Tycoon

Joined: Sun Apr 08, 2007 4:07 am
Posts: 1884
[reserved for future use]

_________________
* @Belugas wonders what is worst... a mom or a wife...
<Lakie> Well, they do the same thing but the code is different.

______________
My patches
check my wiki page (sticky button) for a complete list

ImageImage
ImageImageImageImageImageImageImage


Top
   
 Post subject: Re: [WIP] Trails
PostPosted: Sun Jun 22, 2008 1:35 pm 
Offline
Tycoon
Tycoon

Joined: Sun Apr 08, 2007 4:07 am
Posts: 1884
andythenorth, the .pcx file you uploaded in the other thread seems to have a wrong pallete. I'm applying the palette to it now and will reupload it here then.

You can find the palette here in two formats:
svn://svn.openttd.org/extra/ottd_grf/pa ... penttd.gpl
svn://svn.openttd.org/extra/ottd_grf/pa ... alette.act

_________________
* @Belugas wonders what is worst... a mom or a wife...
<Lakie> Well, they do the same thing but the code is different.

______________
My patches
check my wiki page (sticky button) for a complete list

ImageImage
ImageImageImageImageImageImageImage


Top
   
 Post subject: Re: [WIP] Trails
PostPosted: Sun Jun 22, 2008 2:01 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Mar 31, 2007 2:23 pm
Posts: 4806
Location: Lost in Music
Roujin wrote:
andythenorth, the .pcx file you uploaded in the other thread seems to have a wrong pallete.


Oops. That's a pain. Looks like I can use the .act file to load swatches in Photoshop. Out of interest, did it look like the colours were transposed (just not correct for OTTD) or were they correct OTTD colours, used in the wrong place?


Top
   
 Post subject: Re: [WIP] Trails
PostPosted: Sun Jun 22, 2008 3:04 pm 
Offline
Tycoon
Tycoon

Joined: Sun Apr 08, 2007 4:07 am
Posts: 1884
I think it was transposed, since the grfcodec would not encode it, saying something like "Error: wrong palette". But maybe it was just in another order? I don't know.. but the palette has to be correct, else the grfcodec won't accept it and make it into a .grf.

Now here's something new: A screenshot to tease you a bit ;)
The local farmer of Funborough Farm has made some trails with his tractor ;)
Attachment:
Funborough Transport, 24th Apr 1950.png [103.68 KiB]
Downloaded 635 times


On a different note, after converting the thing to the proper palette, there were some action colors in it. Don't know if you've already learned about them since you're rather new to openttd grfs.. these are blinking colors of some sorts, and you normally don't want them in your sprite (except you're using them on purpose).
Here is a program that can be run over a sprite to replace action colors with similar looking ones: viewtopic.php?f=26&t=7519

I'll repost the sprites you gave me before, after I've done that..

edit: another thing: there is a certain limitation we have to get along with: the road sprites include the ground (grass, bare ground using some palette swap, or with pavement). Therefore for the combination of road and trails, we have to draw the road first, then the trails. Now if there is a x-crossing of road and trail, there can't be done much. The brown mud will be shown over the road. We can live with that I think, just imagine the heavy vehicles crossing the road there have made it muddy.
However, if we have a T-crossing of road and trail, we can make it better looking, if you adjust the half-tiles of the trails accordingly. Just imagine you lay a half tile of the trails over an orthoganal road piece. It should then look like the trail is nicely splitting off the road. Could you do that?

(I'm not sure if it's understandable what I wrote, so ask if it wasn't clear..)

_________________
* @Belugas wonders what is worst... a mom or a wife...
<Lakie> Well, they do the same thing but the code is different.

______________
My patches
check my wiki page (sticky button) for a complete list

ImageImage
ImageImageImageImageImageImageImage


Top
   
 Post subject: Re: [WIP] Trails
PostPosted: Sun Jun 22, 2008 3:21 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Mar 31, 2007 2:23 pm
Posts: 4806
Location: Lost in Music
Roujin wrote:
Now here's something new: A screenshot to tease you a bit ;)
The local farmer of Funborough Farm has made some trails with his tractor ;)
Attachment:
Funborough Transport, 24th Apr 1950.png


Hey, that works surprisingly well! I wasn't sure how much the sprites would line up etc. I have ideas for ways to improve them, but I'm tied up drawing grfs at the moment. Looks good.

There is a test .grf for Heavy Equipment here - can you get the mining truck to go down the trail? :wink: (truck is available in 1985, use 2nd CC to change it to the colour of your choice).
Roujin wrote:
On a different note, after converting the thing to the proper palette, there were some action colors in it.[snip]
I'll repost the sprites you gave me before, after I've done that..


Apologies for that - I know about action colours (I am trying to figure out a way to use them to get blinking amber beacons on Heavy Equipment vehicles) - but I didn't intend to use them in trail sprites :shock:

I've got the palette loaded into Photoshop swatches; when you post the sprites, I'll check they are matching up; possibly Photoshop colour management has transposed some, or, more likely, it's conversion to indexed colours on the PCX export that has caused the problem.


Top
   
 Post subject: Re: [WIP] Trails
PostPosted: Sun Jun 22, 2008 3:31 pm 
Offline
Tycoon
Tycoon

Joined: Sun Apr 08, 2007 4:07 am
Posts: 1884
okay, here's the .pcx file.
It was only one pixel that had an action color, so no worries :lol:

Have you read my edit in the post above?
About the mining truck: sorry, some more coding is required first before vehicles can go on the trails, and I don't have time anymore right now.. will come back at that later/tomorrow...


Attachments:
File comment: converted to openttd palette and ran over with palconvert
trails.pcx [89.67 KiB]
Downloaded 342 times

_________________
* @Belugas wonders what is worst... a mom or a wife...
<Lakie> Well, they do the same thing but the code is different.

______________
My patches
check my wiki page (sticky button) for a complete list

ImageImage
ImageImageImageImageImageImageImage
Top
   
 Post subject: Re: [WIP] Trails
PostPosted: Sun Jun 22, 2008 3:41 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Mar 31, 2007 2:23 pm
Posts: 4806
Location: Lost in Music
Roujin wrote:
About the mining truck: sorry, some more coding is required first before vehicles can go on the trails, and I don't have time anymore right now.. will come back at that later/tomorrow...

Nah, don't worry. I figured it might not be ready yet. Here's a fake teaser:
Attachment:
trails_teaser_2.png [107.32 KiB]
Downloaded 423 times


Top
   
 Post subject: Re: [WIP] Trails
PostPosted: Sun Jun 22, 2008 3:44 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Mar 31, 2007 2:23 pm
Posts: 4806
Location: Lost in Music
Roujin wrote:
edit: another thing: there is a certain limitation we have to get along with: the road sprites include the ground (grass, bare ground using some palette swap, or with pavement). Therefore for the combination of road and trails, we have to draw the road first, then the trails. Now if there is a x-crossing of road and trail, there can't be done much. The brown mud will be shown over the road. We can live with that I think, just imagine the heavy vehicles crossing the road there have made it muddy.


That's fine, desirable even - but means taking a certain amount of care with how I draw the edges of the trails - they currently have green in them. Similar issue to dealing with different climate tiles; I guess I need to pick the brains of someone who has drawn a roadset (such as US Roads).

Roujin wrote:
However, if we have a T-crossing of road and trail, we can make it better looking, if you adjust the half-tiles of the trails accordingly. Just imagine you lay a half tile of the trails over an orthoganal road piece. It should then look like the trail is nicely splitting off the road. Could you do that?
(I'm not sure if it's understandable what I wrote, so ask if it wasn't clear..)


I can probably figure it out. If not, I'll leave you a PM. Won't do anything on that today.


Last edited by andythenorth on Sun Jun 22, 2008 6:26 pm, edited 1 time in total.

Top
   
 Post subject: Re: [WIP] Trails
PostPosted: Sun Jun 22, 2008 5:26 pm 
Offline
Tycoon
Tycoon

Joined: Sun Apr 08, 2007 4:07 am
Posts: 1884
Here's a little something to illustrate what I mean. The vehicles won't enter the halftiles anyway, but reverse on the last tile before the halftile.

Current situation:
Attachment:
Trails_road.png [67.84 KiB]
Downloaded 244 times

Proposal for the half tiles (right side illustrates how it would look like with a road):
Attachment:
trails_road_tile.png
trails_road_tile.png [ 2 KiB | Viewed 9924 times ]


Of course, it would still need to look well if there's no road but plain grass where the trail ends...

_________________
* @Belugas wonders what is worst... a mom or a wife...
<Lakie> Well, they do the same thing but the code is different.

______________
My patches
check my wiki page (sticky button) for a complete list

ImageImage
ImageImageImageImageImageImageImage


Top
   
 Post subject: Re: [WIP] Trails
PostPosted: Sun Jun 22, 2008 6:30 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Mar 31, 2007 2:23 pm
Posts: 4806
Location: Lost in Music
Roujin wrote:
...[snip]...Of course, it would still need to look well if there's no road but plain grass where the trail ends...


Yep, I think I get it, so to confirm, the trail tile goes over the regular road? Therefore anything I draw for the trail, like muddy tyre tracks, will be overlaid on the tarmac road surface?

(I don't know how OTTD handles it, but in other co-ordinate systems, a sprite with have a higher z index would appear above one with a lower z index - so we could refer to the trail piece as having a higher z index)


Top
   
 Post subject: Re: [WIP] Trails
PostPosted: Sun Jun 22, 2008 6:52 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Mar 31, 2007 2:23 pm
Posts: 4806
Location: Lost in Music
Roujin wrote:
Of course, it would still need to look well if there's no road but plain grass where the trail ends...


OK, give this a go:
1. I've tried two different approaches, I don't know which will work best until I see it overlaid in the game :)
2. PCX should now 'just work' with the right palette. Let me know if there's any more issues...
Attachment:
trails.pcx [88.3 KiB]
Downloaded 145 times


Top
   
 Post subject: Re: [WIP] Trails
PostPosted: Sun Jun 22, 2008 8:52 pm 
Offline
Tycoon
Tycoon

Joined: Sun Apr 08, 2007 4:07 am
Posts: 1884
Yes, this time it worked right away :)

Here is a screen showing the new tiles.
Two of the halftile ones seem brighter than the other two though...


Attachments:
trails_new.png [87.91 KiB]
Downloaded 507 times

_________________
* @Belugas wonders what is worst... a mom or a wife...
<Lakie> Well, they do the same thing but the code is different.

______________
My patches
check my wiki page (sticky button) for a complete list

ImageImage
ImageImageImageImageImageImageImage
Top
   
 Post subject: Re: [WIP] Trails
PostPosted: Sun Jun 22, 2008 9:20 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Mar 31, 2007 2:23 pm
Posts: 4806
Location: Lost in Music
Roujin wrote:
Two of the halftile ones seem brighter than the other two though...

That's as expected - I was experimenting. :wink: I don't really like either of those that much yet, I need to do more work on junctions I think. I'll get back on that sometime this week - will also do the GUI sprites.


Top
   
 Post subject: Re: [WIP] Trails
PostPosted: Mon Jun 23, 2008 7:43 am 
Offline
Engineer
Engineer

Joined: Tue May 08, 2007 8:46 pm
Posts: 18
Location: Germany, Dresden
Could the half tile transition be traffic dependent?


Top
   
 Post subject: Re: [WIP] Trails
PostPosted: Mon Jun 23, 2008 3:23 pm 
Offline
Tycoon
Tycoon

Joined: Sun Apr 08, 2007 4:07 am
Posts: 1884
Not without major changes in code that I want to avoid.

_________________
* @Belugas wonders what is worst... a mom or a wife...
<Lakie> Well, they do the same thing but the code is different.

______________
My patches
check my wiki page (sticky button) for a complete list

ImageImage
ImageImageImageImageImageImageImage


Top
   
 Post subject: Re: [WIP] Trails
PostPosted: Mon Jun 23, 2008 7:15 pm 
Offline
Tycoon
Tycoon

Joined: Sun Apr 08, 2007 4:07 am
Posts: 1884
News! I've enabled road vehicles (non-tram ones, that is) to drive on trails. So here's some screens (quick one with standard vehicles). Will grab your test .grf and make another one with it now...

edit: here we go.
Some Terex mining trucks work their way through difficult terrain in order to transport Iron Ore from the remotely located Gruntfingfield Mines ;)
Attachment:
File comment: Some Terex mining trucks work their way through difficult terrain in order to transport Iron Ore from the remotely located Gruntfingfield Mines.
trails_mine.png [124.82 KiB]
Downloaded 199 times


Attachments:
File comment: Daily Work at Sarnwell Farm
trails_farm.png [121.85 KiB]
Downloaded 402 times
File comment: The little village of Fluntfingbridge in the woods.
trails_village.png [186.35 KiB]
Downloaded 406 times

_________________
* @Belugas wonders what is worst... a mom or a wife...
<Lakie> Well, they do the same thing but the code is different.

______________
My patches
check my wiki page (sticky button) for a complete list

ImageImage
ImageImageImageImageImageImageImage
Top
   
 Post subject: Re: [WIP] Trails
PostPosted: Mon Jun 23, 2008 8:18 pm 
Offline
Tycoon
Tycoon

Joined: Sun Apr 08, 2007 4:07 am
Posts: 1884
Okay, back to some serious business now..

as you can see in the screenshot below, right now the three road types are freely combinable. Question is, should it stay like that, or should some combinations be forbidden?

e.g. forbid road and trail on the same roadbit (note: different roadbits on one tile can stay allowed). Or, keep it like it is - it doesn't really make sense, but it could be seen as "dirty road" for eyecandy.

Also an issue is trail + tram. In the middle of the image, there's some tram+trail track. It can hardly be seen, only some pixels difference from "tram-only" tracks. That is because tram is drawn above trail (only thing that makes sense in my opinion...).

Screenshot:
Attachment:
trails_roadtypes.png [96.21 KiB]
Downloaded 343 times


Other than that, how are the graphics progressing, andy? 8) I think we should also do trail stations (bus/truck), so that you can place nice stations on trail tracks, without having an ugly piece of road on them (like shown the farm picture I posted above...)

_________________
* @Belugas wonders what is worst... a mom or a wife...
<Lakie> Well, they do the same thing but the code is different.

______________
My patches
check my wiki page (sticky button) for a complete list

ImageImage
ImageImageImageImageImageImageImage


Top
   
 Post subject: Re: [WIP] Trails
PostPosted: Mon Jun 23, 2008 8:44 pm 
Offline
President
President
User avatar

Joined: Sun Jun 18, 2006 6:18 pm
Posts: 953
Location: Switzerland
2way trails?

(shouldn't it be thinner then normal roads.)

One path in the middle and maybe some parts for bypssing other vehicels?

Greets
Ammler

_________________
Image
Town Names: Image Portuguese Image Belarusian Image French Image Swiss · Image Temperate Lumber Mill
Still work in progress: OpenGFX or/and OpenSFX - Please help!


Top
   
 Post subject: Re: [WIP] Trails
PostPosted: Mon Jun 23, 2008 11:28 pm 
Offline
Tycoon
Tycoon

Joined: Sun Apr 08, 2007 4:07 am
Posts: 1884
Well, one could draw it like this, but the road vehicles would still drive on their sides, like they do on normal roads.

_________________
* @Belugas wonders what is worst... a mom or a wife...
<Lakie> Well, they do the same thing but the code is different.

______________
My patches
check my wiki page (sticky button) for a complete list

ImageImage
ImageImageImageImageImageImageImage


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 72 posts ]  Go to page 1 2 3 4 Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000-2019 phpBB Limited

Copyright © Owen Rudge/The Transport Tycoon Forums 2001-2019.
Hosted by Zernebok Hosting.