The International Simutrans Forum

 

Author Topic: Airplane stop problem  (Read 2260 times)

0 Members and 1 Guest are viewing this topic.

Offline Milko

  • Devotee
  • *
  • Posts: 828
Airplane stop problem
« on: February 10, 2011, 10:11:03 PM »
Hi

I have a strange problem, I'm trying to make the model of an aircraft in an attempt to align properly I came across a strange problem that occurs with the stop of the aircraft. The problem manifests itself in the latest versions in both standard simutrans than in the experimental, and manifests itself with the air of pak128 and with what I'm doing. When a plane stops with the muzzle upward stops perfectly in the pitch (you can see in STOP1) but if it stops with the nose pointing down will stop ahead and overflowing from the tile (as seen in STOP2). In both images I left highlighted the size of the tile with the yellow border and I left the aircraft black background to show how you place the box of the plane itself. We see that the box does not stop the aircraft in the same position. I wonder is a bug?

Giuseppe

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4564
  • Languages: EN, DE, AT
Re: Airplane stop problem
« Reply #1 on: February 11, 2011, 06:10:06 AM »
This is due to the position of the airplane sprite. Try moving it around in your png.

Offline Milko

  • Devotee
  • *
  • Posts: 828
Re: Airplane stop problem
« Reply #2 on: February 11, 2011, 08:42:24 AM »
Hi

I'm not convinced that this is a problem of the sprite, I think it is a problem in the code.

All aircraft in all packages have the same problem and all planes are centered in the sprite 128x128.

In STOP1 the land (bounded by yellow border) is perfectly aligned to 128x128 sprite plane, in fact, the corners of the yellow border coincide perfectly with the edges of the box of the plane. When the plane stops moving towards south-east or south-west (STOP2) the situation is different in this case, the box of the plane stopped over and the corners of the yellow box of the ground are no longer aligned with the box of the plane.

Giuseppe

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4564
  • Languages: EN, DE, AT
Re: Airplane stop problem
« Reply #3 on: February 11, 2011, 09:20:30 AM »
Quote
All aircraft in all packages have the same problem and all planes are centered in the sprite 128x128.
Then do not center all images. This is due to how the movement code works: vehicles in stations driving north or west (STOP1) are moved forward a half tile, vehicles driving south or east are not moved forward. This is the same for all vehicles since years.

Solution: move aircraft image for S/E back a half tile in png, or provide an approproate offset (+-64,+-32) in the dat-file.

Offline Milko

  • Devotee
  • *
  • Posts: 828
Re: Airplane stop problem
« Reply #4 on: February 11, 2011, 09:26:52 AM »
Hi

Ok, I'll try.

Thanks

Giuseppe