Transport Tycoon Forums

The place to talk about Transport Tycoon
It is currently Mon Oct 15, 2018 4:04 pm

All times are UTC




Post new topic  Reply to topic  [ 30 posts ]  Go to page Previous 1 2
Author Message
 Post subject: Re: Bounding boxes
PostPosted: Mon Oct 16, 2017 8:09 pm 
Offline
Director
Director
User avatar

Joined: Mon Apr 17, 2017 4:52 pm
Posts: 614
Location: Western Ile-de-France Region
No, but it said something along the lines of unknown value for callback, and set the loco length to 1


Top
   
 Post subject: Re: Bounding boxes
PostPosted: Mon Oct 16, 2017 8:19 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Thu Mar 19, 2009 7:25 pm
Posts: 2619
Location: Kent
oberhümer wrote:
I summon Blue Eyes White Oberhuemer

_________________
Image


Top
   
 Post subject: Re: Bounding boxes
PostPosted: Wed Oct 18, 2017 8:02 pm 
Offline
Tycoon
Tycoon

Joined: Fri Oct 23, 2009 7:35 pm
Posts: 1276
Location: Here and there, sometime or another
Leanden wrote:
Seems not, hopefully oberhuemer can shine some light this way as to how he achieved it.
Eddi/planetmaker wrote that code originally. Anyway, this:
stefino_cz wrote:
8 is maximum and bigger boxes have to done by articulated parts

is exactly correct. In fact, all vehicles in the CETS/Britrains code consist of three articulated parts. The first part is assigned the actual vehicle graphics, and the curvature between the first/second and second/third part is queried to show intermediate sprites when going around a curve. With this approach, you can have semi-smoothly turning vehicles with a length of between 3 and 16 units, as long as you manage to figure out good-looking sprite offsets. Once again, all credits for this go to Eddi/planetmaker.

_________________
--- Licenses: GNU LGPL, version 2 or newer, code and graphics. CC-By-SA, graphics, alternatively. If you're using any, I'd like to hear about it --- Call them "track types" ---
--- Mostly inactive developer for: NuTracks - Central European Train Set --- Running/compiling for: Linux (x86) - Android - Windows (32/64 bit) ---

--- Need a file packer? 7-Zip --- BOINC - use your computing power to benefit science --- Block trackers, not ads --- Unix in dispersible pellets, the formula for the future. ---


Top
   
 Post subject: Re: Bounding boxes
PostPosted: Thu Oct 19, 2017 8:02 am 
Offline
Traffic Manager
Traffic Manager
User avatar

Joined: Thu Jul 02, 2015 8:05 am
Posts: 144
Location: Czech Republic
oberhümer wrote:
Leanden wrote:
Seems not, hopefully oberhuemer can shine some light this way as to how he achieved it.
Eddi/planetmaker wrote that code originally. Anyway, this:
stefino_cz wrote:
8 is maximum and bigger boxes have to done by articulated parts

is exactly correct. In fact, all vehicles in the CETS/Britrains code consist of three articulated parts. The first part is assigned the actual vehicle graphics, and the curvature between the first/second and second/third part is queried to show intermediate sprites when going around a curve. With this approach, you can have semi-smoothly turning vehicles with a length of between 3 and 16 units, as long as you manage to figure out good-looking sprite offsets. Once again, all credits for this go to Eddi/planetmaker.

But in CETS you still have one long graphics or not? And this graphics is loaded where? At the middle 8 units long box? If so, you have to have the same problems as us on the bridges etc.

_________________
Image


Top
   
 Post subject: Re: Bounding boxes
PostPosted: Thu Oct 19, 2017 8:18 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Thu Mar 19, 2009 7:25 pm
Posts: 2619
Location: Kent
I think because the graphics are trailing instead of forerunning, the glitches are minimal. As the front of the bounding box still encompasses the front of the train fully which is where you usually get weird overlaps.

_________________
Image


Top
   
 Post subject: Re: Bounding boxes
PostPosted: Fri Oct 20, 2017 8:17 am 
Offline
Tycoon
Tycoon

Joined: Fri Oct 23, 2009 7:35 pm
Posts: 1276
Location: Here and there, sometime or another
Yes, should be that.

_________________
--- Licenses: GNU LGPL, version 2 or newer, code and graphics. CC-By-SA, graphics, alternatively. If you're using any, I'd like to hear about it --- Call them "track types" ---
--- Mostly inactive developer for: NuTracks - Central European Train Set --- Running/compiling for: Linux (x86) - Android - Windows (32/64 bit) ---

--- Need a file packer? 7-Zip --- BOINC - use your computing power to benefit science --- Block trackers, not ads --- Unix in dispersible pellets, the formula for the future. ---


Top
   
 Post subject: Re: Bounding boxes
PostPosted: Wed Oct 25, 2017 2:24 pm 
Offline
President
President
User avatar

Joined: Tue Feb 01, 2011 11:22 am
Posts: 909
Location: Beer
I think the glitches will just move to a different area, aka if you had them at the front-facing tunnels originally, they will start appearing at away-facing tunnels.

_________________
ImageImageImage


Top
   
 Post subject: Re: Bounding boxes
PostPosted: Sun Nov 05, 2017 1:25 am 
Offline
Tycoon
Tycoon

Joined: Wed Jan 17, 2007 12:14 am
Posts: 7153
the code for CETS roughly follows the ideas outlined in this ancient thread (some things were updated for newer features/fixes)

and here is the core of the display code: https://paste.openttdcoop.org/pystey9tu

the sprite is split into 3 parts when the vehicle is on a straight piece of track, and shown as one full sprite for the center vehicle, not the first vehicle, if the vehicle is on a curve/slope

this does not eliminate all glitches, but goes quite a long way.

_________________
You might not exactly be interested in Ferion, but if you are, have fun :)


Top
   
 Post subject: Re: Bounding boxes
PostPosted: Sat Dec 30, 2017 8:33 pm 
Offline
Tycoon
Tycoon

Joined: Mon Jul 10, 2006 12:43 am
Posts: 1808
Location: Spain
This is the main reason because I moved to Locomotion... the smooth curves and realistic train proportions.

But OpenTTD is still a good game. :D Also, I miss a lot of things from OpenTTD in Locomotion, because it doesn't allow liveries and the number of different vehicles is really small. Also, building tracks OpenTTD is much better than in Locomotion, you don't need thousands of mouse clicks.

For developing new graphics I prefer Locomotion, because I feel better with the result, but OpenTTD is better for playing.

_________________
Sorry if my english is too poor, I want learn it, but it isn't too easy.


Last edited by maquinista on Sat Dec 30, 2017 8:37 pm, edited 1 time in total.

Top
   
 Post subject: Re: Bounding boxes
PostPosted: Sat Dec 30, 2017 8:36 pm 
Offline
Director
Director
User avatar

Joined: Mon Apr 17, 2017 4:52 pm
Posts: 614
Location: Western Ile-de-France Region
I wonder why...


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 30 posts ]  Go to page Previous 1 2

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-2018 phpBB Limited

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