A sprite sorting issue?

Got a problem with TTDPatch? Get help here.

Moderator: TTDPatch Moderators

Post Reply
User avatar
KrevRenko
Engineer
Engineer
Posts: 104
Joined: 25 Mar 2005 14:28

A sprite sorting issue?

Post by KrevRenko »

This topic is an evolution of a discussion @ Tycoonez.com:munity.

It seems there are more issues with the sprite sorter than just the stations and the bridges. It has been observed that there are issues with parts of train catenary disappearing/being drawn over sprites when a train passes on the track. I include evidence in the attachments. Is this known or has it just been overlooked? I guess it would be solved when the already discussed things are solved. Now am I right?

The pix are taken from a48(I suppose, if not, I'll correct myself). It is shown with different train sets(CSDset trains and traction and also original trains with MB traction) so this is probably not a GRF problem, more likely a sprite sorting problem.
Attachments
orig.jpg
orig.jpg (24.35 KiB) Viewed 913 times
csd2.jpg
csd2.jpg (33.35 KiB) Viewed 210 times
csd1.jpg
csd1.jpg (199 KiB) Viewed 211 times
Last edited by KrevRenko on 16 Apr 2005 17:18, edited 1 time in total.
User avatar
KrevRenko
Engineer
Engineer
Posts: 104
Joined: 25 Mar 2005 14:28

Post by KrevRenko »

Sorry for the double post, this is meant to be a (bump) in the first place.

I've read somewhere @ one of the older threads here on the forums that the sprite sorter works by judging the center pixel of the bounding-boxes. Now, I don't know how complex this is, but as long as everything is somehow stuck to the ground(RVs, trains and buildings comply), I mean if there are no objects hanging from wires or so, then probably the lower left corner of the bounding box would be a better place for measuring. If that corner is lower on-screen, it means closer in perspective. Please correct me if I'm wrong in any way.
Patchman
Tycoon
Tycoon
Posts: 7575
Joined: 02 Oct 2002 18:57
Location: Ithaca, New York
Contact:

Post by Patchman »

No, it doesn't work that way, and it's a whole lot more complicated.

One big problem is that the bounding boxes can only be oriented in the X and Y directions (along a grid line), which causes the boxes for vehicles moving horizontally to be either too wide or not long enough. This cannot be fixed without rewriting the whole sprite collecting and sorting system, including assigning bounding boxes to vehicles. Don't hold your breath for that to happen.
Josef Drexler

TTDPatch main | alpha/beta | nightly | manual | FAQ | tracker
No private messages please, you'll only get the answering machine there. Send email instead.
User avatar
KrevRenko
Engineer
Engineer
Posts: 104
Joined: 25 Mar 2005 14:28

Post by KrevRenko »

I thought that vehicle sprites had their bounding boxes that move along with them. If I got this right, they don't, right? Thx for the explanation.


----------------------------------------------------
This happens when a person with no practice at doing something tries to think about it.
Patchman
Tycoon
Tycoon
Posts: 7575
Joined: 02 Oct 2002 18:57
Location: Ithaca, New York
Contact:

Post by Patchman »

No, the bounding boxes move, but they're much smaller than the vehicle in the hor and ver directions. This leads to some unavoidable clipping errors.
Josef Drexler

TTDPatch main | alpha/beta | nightly | manual | FAQ | tracker
No private messages please, you'll only get the answering machine there. Send email instead.
Post Reply

Return to “Problems with TTDPatch”

Who is online

Users browsing this forum: No registered users and 13 guests