Transport Tycoon Forums

The place to talk about Transport Tycoon
It is currently Mon Nov 20, 2017 7:15 pm

All times are UTC




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

Joined: Mon Apr 17, 2017 4:52 pm
Posts: 320
Location: S.W. London
No, but it said something along the lines of unknown value for callback, and set the loco length to 1

_________________
Image

Maker of many GRFs, most of which are pretty poor.


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: 2544
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: 1272
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
Engineer
Engineer

Joined: Thu Jul 02, 2015 8:05 am
Posts: 62
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.


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: 2544
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: 1272
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: 902
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: 6922
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
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 28 posts ]  Go to page Previous 1 2

All times are UTC


Who is online

Users browsing this forum: No registered users and 8 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.