Bounding boxes
Moderator: OpenTTD Developers
Re: Bounding boxes
No, but it said something along the lines of unknown value for callback, and set the loco length to 1
-
- Tycoon
- Posts: 1283
- Joined: 23 Oct 2009 19:35
- Location: Here and there, sometime or another
Re: Bounding boxes
Eddi/planetmaker wrote that code originally. Anyway, this:Leanden wrote:Seems not, hopefully oberhuemer can shine some light this way as to how he achieved it.
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.stefino_cz wrote:8 is maximum and bigger boxes have to done by articulated parts
--- 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. ---
--- 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. ---
- stefino_cz
- Transport Coordinator
- Posts: 268
- Joined: 02 Jul 2015 08:05
- Location: Czech Republic
- Contact:
Re: Bounding boxes
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.oberhümer wrote:Eddi/planetmaker wrote that code originally. Anyway, this:Leanden wrote:Seems not, hopefully oberhuemer can shine some light this way as to how he achieved it.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.stefino_cz wrote:8 is maximum and bigger boxes have to done by articulated parts
Re: Bounding boxes
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.
-
- Tycoon
- Posts: 1283
- Joined: 23 Oct 2009 19:35
- Location: Here and there, sometime or another
Re: Bounding boxes
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. ---
--- 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. ---
- V453000 :)
- President
- Posts: 946
- Joined: 01 Feb 2011 11:22
- Location: Beer
Re: Bounding boxes
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.
Re: Bounding boxes
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.
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.
-
- Tycoon
- Posts: 1828
- Joined: 10 Jul 2006 00:43
- Location: Spain
Re: Bounding boxes
This is the main reason because I moved to Locomotion... the smooth curves and realistic train proportions.
But OpenTTD is still a good game. 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.
But OpenTTD is still a good game. 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.
Last edited by maquinista on 30 Dec 2017 20:37, edited 1 time in total.
Sorry if my english is too poor, I want learn it, but it isn't too easy.
- [list][*]Why use PNG screenshots in 8 bpp games.
[*]Caravan site New Industry. · Spain set. · Some spanish trains for locomotion[*]Favourites:GRVTS · ECS · FIRS
Re: Bounding boxes
I wonder why...
Who is online
Users browsing this forum: No registered users and 20 guests