Transport Tycoon Forums

The place to talk about Transport Tycoon
It is currently Sun Feb 19, 2017 11:57 am

All times are UTC




Post new topic  Reply to topic  [ 109 posts ]  Go to page 1 2 3 4 5 6 Next
Author Message
PostPosted: Sat Jul 07, 2007 10:25 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Mon May 21, 2007 11:47 am
Posts: 6559
Location: The Netherlands
New Tram Tracks for TTDP and OTTD
New Tram Tracks is a tramway replacement set featuring grass embedded off road tracks and single-sided wire supports for the overhead wires.

Downloads are available in the Release topic. Bugs and requests should also go in that topic, not here.


Attachments:
File comment: Screenshots
nwtrmtrk.png
nwtrmtrk.png [ 117.93 KiB | Viewed 36423 times ]
File comment: New Tram Tracks version 0.4.1 (DOS/Win)
NewTramTracks_v0.4.1.zip [648.39 KiB]
Downloaded 10699 times


Last edited by FooBar on Sat Oct 10, 2009 5:37 pm, edited 18 times in total.
Top
   
PostPosted: Sat Jul 07, 2007 11:00 pm 
Offline
Transport Coordinator
Transport Coordinator

Joined: Mon Oct 13, 2003 10:43 am
Posts: 264
Location: Dortmund, Germany
FooBar wrote:
- Maybe: poles for overhead wires between tracks: something like


This won't work without changing the programcode:
- You must use different poles for roads/non-roads
- You must change the sprite's 3D-Bounding-Box, because the poles in the foreground are over all vehicles and the poles in the background vice versa.


Top
   
PostPosted: Sat Jul 07, 2007 11:14 pm 
Offline
Tycoon
Tycoon

Joined: Fri Mar 04, 2005 1:07 am
Posts: 1491
RK wrote:
... You must use different poles for roads/non-roads ...

So that is what those other sprites are for ... those that never get used anywhere. The same pole and wire sprites are used for tracks on road and off road. Here is proof ...


Top
   
 Post subject:
PostPosted: Sun Jul 08, 2007 2:35 am 
Offline
TTDPatch Developer
TTDPatch Developer
User avatar

Joined: Sun Jul 24, 2005 5:07 am
Posts: 758
Location: Canberra, Australia
I'd imagine he meant that you can't really have the poles down the middle of the road... hence that you'd need poles on the outsides for on-road and poles down the middle for off-road?

Hence a reasonable code-change... but nothing massive; as long as you know assembler and feel up for a challenge :)

_________________
Image
Model Trains, DCC, Photography, Homebrew DCC Booster + Computer Interface


Top
   
 Post subject:
PostPosted: Sun Jul 08, 2007 7:29 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Tue Mar 30, 2004 12:30 pm
Posts: 16662
Location: Almere, The Netherlands
When making poles in the middle, I guess you'd get problems with roadvehicles incorrectly drawn over or under the poles.

_________________
Contributor to the The 2cc Set and Dutch Trainset. Inventor of the Metro concept. Retired Graphics Artist.
Image Image
Download TT | Latest TTDPatch | OpenTTD | OpenTTDCoop | BaNaNaS: OpenTTD content system | 2048² OTTD scenario of the Netherlands
GRF Codec | GRF Crawler | GRF Maker | Usefull graphics & tools sites | NML Documentation Wiki | NFO Documentation Wiki
All my graphics are licensed under GPL. "Always remember you're unique, just like everyone else."


Top
   
 Post subject:
PostPosted: Sun Jul 08, 2007 10:49 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Mon May 21, 2007 11:47 am
Posts: 6559
Location: The Netherlands
Thanks guys. Poles in the middle is indeed not possible without changing the game itself. And I don't feel like doing that.

I have another idea now: single-sided poles


Top
   
 Post subject:
PostPosted: Sun Jul 08, 2007 8:15 pm 
Offline
Engineer
Engineer
User avatar

Joined: Sat May 20, 2006 6:38 pm
Posts: 100
Location: The Hague, The Wetlands
FooBar wrote:


Thats my view every morning when i wake up :roll:

_________________
Overall Winner Screenshot Capture ContestImage


Top
   
 Post subject:
PostPosted: Sun Jul 08, 2007 8:19 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Wed Feb 15, 2006 12:00 pm
Posts: 1983
Skype: m3hww-henry
Location: University of Southampton
for the tracks to have grass in between you need to have the track sprites have the transparent blue inbeween
or mabeyt even have some off colour grass

_________________
The occasional look back at your past can teach you a great many things...


Top
   
 Post subject:
PostPosted: Sun Jul 08, 2007 8:58 pm 
Offline
Tycoon
Tycoon

Joined: Fri Mar 04, 2005 1:07 am
Posts: 1491
Technical question ...

Looking at ttdpbase.grf, sprites 393 to 444 are the poles and wires for tram tracks. I have identified that sprites 393 ... 413 are used for tracks, same for on-road and off-road tracks. 414 ... 429 are the northern tunnel exists. And 433 ... 444 are for the bridges. Now where are sprites 422 ... 432 used ? Can we simply ignore them ?


Top
   
 Post subject:
PostPosted: Mon Jul 09, 2007 4:43 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Mon May 21, 2007 11:47 am
Posts: 6559
Location: The Netherlands
@m3henry:
Transparent blue doesn't work, because off-road tram tracks are an overlay for road tiles. There's still road underneath! Using transparent inbetween tracks reveals the road. It's also exactly the first thing I tried making this set.

EDIT:
@OzTransLtd:
I quickly put a grf together, default sprites, but the sprite's number added to sprites 422-432. I don't see any numbers in the game, so my quick conclusion is that those sprites aren't used.
New question: why are those sprites unused?


Attachments:
File comment: tramtrack sprite tester
tramtrkw_test.grf [42.56 KiB]
Downloaded 377 times
Top
   
 Post subject:
PostPosted: Mon Jul 09, 2007 6:52 pm 
Offline
Tycoon
Tycoon

Joined: Fri Mar 04, 2005 1:07 am
Posts: 1491
FooBar wrote:
.. I quickly put a grf together, default sprites, but the sprite's number added to sprites 422-432. I don't see any numbers in the game, so my quick conclusion is that those sprites aren't used. ...

That is what I did too. Having now all sprites accounted for, except 422 ... 432 and 384/385; I assume they were planned initially and then remained unused. So we may just ignore them.

Unfortunately, there are a few missing :

. Construction Cargo (truck) tram stop icon.
. Custom cargo tram stops.
. Track sprites for the NE/NW (door) tram depots, that would show in transparent mode.


Top
   
 Post subject:
PostPosted: Mon Jul 09, 2007 7:34 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Mon May 21, 2007 11:47 am
Posts: 6559
Location: The Netherlands
Too bad we have to ignore them. I need 'em for my new idea!

Sprite 393 is used as background-sprite in for all 'foregrounds' 394 to 400. Same for 401 and 402 to 405. This means that my idea doesn't work out (see image attached below).
The pole can't be in the middle of a tile without having it in the middle of the road in certain track combinations. That could be solved by sprites 394 to 400 having their 'own' background sprites (possibly the intended use of sprites 422-428), but that's just not how the game works right now.

Seems all my ideas are impossible. Pole between tracks, single-sided pole... What's next?


Attachments:
problems.png
problems.png [ 4.28 KiB | Viewed 42394 times ]
Top
   
 Post subject:
PostPosted: Mon Jul 09, 2007 7:54 pm 
Offline
Tycoon
Tycoon

Joined: Fri Mar 04, 2005 1:07 am
Posts: 1491
Yes, I know. I think we need to stick pretty close to the 'original' implementation, i.e. poles are placed where 2 tiles meet, but they can overlap each other exactly, thus reducing the number of poles in the forest.

If those (422...432) sprites are not used. It would be pretty simple to change one of them to be the counterpart of 393, for the NE-SW direction [patch support required though]. Then, you could do what you want, but you would need to place your single pole, where the tiles meet.


Top
   
 Post subject:
PostPosted: Tue Jul 10, 2007 1:34 am 
Offline
TTDPatch Developer
TTDPatch Developer

Joined: Wed Feb 18, 2004 3:06 am
Posts: 10285
Steven? Care to expound on the uses of the various sprites?

_________________
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


Top
   
 Post subject:
PostPosted: Tue Jul 10, 2007 5:57 am 
Offline
TTDPatch Developer
TTDPatch Developer
User avatar

Joined: Sun Jul 24, 2005 5:07 am
Posts: 758
Location: Canberra, Australia
*digs up an old post*.... it's here somewhere...

Oh, here it is:
Image

I've no idea how up to date this is... and of course; all the offsets are wrong since this is from when it was in it's own tramtrkw.grf

I need to get home and decode the base GRF to tell you exactly how it's all laid out.

_________________
Image
Model Trains, DCC, Photography, Homebrew DCC Booster + Computer Interface


Top
   
 Post subject:
PostPosted: Tue Jul 10, 2007 9:47 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Mon May 21, 2007 11:47 am
Posts: 6559
Location: The Netherlands
If that's the actual situation, there's no problem at all. Anyhow, as far as I can tell, it's like in the images attached below.

First image is from ttdpbasew.grf.
Second image is form a testgrf I quickly put together. The numbers refer to ttdpbasew's sprite numbers. See for yourself


Attachments:
File comment: ingame test
tramtrkw_test.png [53 KiB]
Downloaded 177 times
File comment: ttdpbasew.grf sprite relations
ttdpbasew.png
ttdpbasew.png [ 10.96 KiB | Viewed 42204 times ]
Top
   
 Post subject:
PostPosted: Tue Jul 10, 2007 6:32 pm 
Offline
Tycoon
Tycoon

Joined: Fri Mar 04, 2005 1:07 am
Posts: 1491
stevenh wrote:
... sprite usage ...

May be that is how you intended it to work; we just discovered a little bug.

In my screenshot (further up) all those little yellow sprite numbers refer to the sprites actually used. #1 is #393 in ttdpbase or #37 in your sprite sheet. #1 is clearly used with every straight track including all intersections. This is also shown in FooBar's screenshot.


Top
   
 Post subject:
PostPosted: Tue Jul 10, 2007 9:36 pm 
Offline
TTDPatch Developer
TTDPatch Developer
User avatar

Joined: Wed May 26, 2004 4:37 pm
Posts: 1802
Location: Britain
The Tram draw code was orignially meant to be replaced by the newRoutes draw code...
So it was only temporary however with the delay in newRoutes it might need fixing, but at the end of the day, I believe Steven wanted Trams to become part of newRoutes in parts (such as drawing and store I guess).

(Correct me if I'm wrong though Steven),
~ Lakie

_________________
TTDpatch Developer 2005 - 2010 ~ It all started because of shortened vehicle not loading correctly, now look where I've gone with it!
Grfs coded ~ Finnish Train Set (Teaser) | Bm73 (Release 3) | Emu 680 (Release 3)| Glass Station (Release 1) | UK Roadset (Version 1.1a) | New Water Coasts (Version 7)
Pikka: "Lakie's a good coder, but before he'll add any feature to TTDP you have to convince him that you're not going to use it to destroy the world as we know it."


Top
   
 Post subject:
PostPosted: Tue Jul 10, 2007 10:42 pm 
Offline
TTDPatch Developer
TTDPatch Developer
User avatar

Joined: Sun Jul 24, 2005 5:07 am
Posts: 758
Location: Canberra, Australia
Let us not talk of the future (of which you are spot on) and attempt to correct the past.

I hereby promise to have this issue corrected (and since the extra sprites still exist in ttdpbase [but aren't getting used]) to have those in use by the end of Sunday.

Code:
var     tramfrontwiresprites,   db 0h, 37h, 37h, 3Fh, 37h, 37h, 43h, 37h, 37h, 3Fh, 37h, 37h, 3Fh, 37h, 37h, 37h
var     trambackpolesprites,    db 0h, 38h, 39h, 40h, 38h, 38h, 43h, 3Eh, 39h, 41h, 39h, 3Ch, 42h, 3Bh, 3Dh, 3Ah


...it should be a simple change to:

Code:
var     tramfrontwiresprites,   db 0h, 54h, 55h, 5Bh, 54h, 54h, 5Eh, 5Ah, 55h, 5Ch, 55h, 58h, 5Dh, 57h, 59h, 56h
var     trambackpolesprites,    db 0h, 38h, 39h, 40h, 38h, 38h, 43h, 3Eh, 39h, 41h, 39h, 3Ch, 42h, 3Bh, 3Dh, 3Ah



...heh.... it seems that I definately use sprite 37h for each one (see my original post for the numbering.) This should be pretty straight-forward then... I just need to renumber that top line (and even funnier is that the variable names are backwards... but that's minor.)

_________________
Image
Model Trains, DCC, Photography, Homebrew DCC Booster + Computer Interface


Top
   
 Post subject:
PostPosted: Tue Jul 10, 2007 11:04 pm 
Offline
Tycoon
Tycoon

Joined: Fri Mar 04, 2005 1:07 am
Posts: 1491
stevenh wrote:
I hereby promise to have this issue corrected (and since the extra sprites still exist in ttdpbase [but aren't getting used]) to have those in use by the end of Sunday.

Thank you, we shall wait patiently ...

@OpenTTD Developers : Now, the same occurs in OpenTTD, could we have that corrected there as well ?


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

All times are UTC


Who is online

Users browsing this forum: Bing [Bot], LabUser and 6 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-2017 phpBB Limited

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