The International Simutrans Forum

PakSets and Customization => General Resources and Tools => Topic started by: Max-Max on October 12, 2013, 03:05:15 AM

Title: DIM directions?
Post by: Max-Max on October 12, 2013, 03:05:15 AM
In the Simutrans wiki (http://simutrans-germany.com/wiki/wiki/tiki-index.php?page=en_BackImage) we can read about DIM referring to rotation.

0 northern end
1 western end
2 southern end
3 eastern end


The question is; end of what?

I know so far that south is pointing to the left down corner in relation to the camera and since the sun always are in the south it can't be the end facing the sun. It can't be the end facing the camera, because the camera is in an angel and there isn't one side facing the camera.

Do they mean the side of the building facing left bottom corner when rotating? :o

*** EDIT ***
I made a simple test and created a city hall with a mark on the south edge, when teh world was generated I found the City hall to be placed in all different directions. Shouldn't they all face the same direction and rotate when I rotate the map?

I used this dat file:

Obj=building
Name=City hall
type=tow
chance=100
Level=4
intro_year=1929
retire_year=2999
needs_ground=0
dims=1,1,4

# North
BackImage[0][0][0][0][0][0]=city-hall0000.0.0.0
# West
BackImage[1][0][0][0][0][0]=city-hall0001.0.0.0
# South
BackImage[2][0][0][0][0][0]=city-hall0002.0.0.0
# East
BackImage[3][0][0][0][0][0]=city-hall0003.0.0.0
--

Title: Re: DIM directions?
Post by: Ters on October 12, 2013, 08:54:12 AM
Quote from: Max-Max on October 12, 2013, 03:05:15 AM
I made a simple test and created a city hall with a mark on the south edge, when teh world was generated I found the City hall to be placed in all different directions. Shouldn't they all face the same direction and rotate when I rotate the map?

I know churches should always face west (not that they do in Simutrans), but I'm not aware that city halls should all face in the same direction.
Title: Re: DIM directions?
Post by: Max-Max on October 12, 2013, 02:36:32 PM
Quote from: Ters on October 12, 2013, 08:54:12 AM
I know churches should always face west (not that they do in Simutrans), but I'm not aware that city halls should all face in the same direction.
I just realized something...
When I rotate the map, south is still in the lower left corner - it is always in the lower left corner!
I thought the rotation param was to show the buildings with different shadows for map rotation since the sun should rotate too.
Okay, so the sun is fixed regardless of rotation.

Next question, The south edge of a building's graphics, is this always connected to the road? (it looks like so in my test).
This turned out to bee a coincident...

***EDIT
The question of what the DIM edge is related too is still not clear. With the above observations I believe it is related to the graphic's North facing the sun.
Title: Re: DIM directions?
Post by: Ters on October 12, 2013, 03:53:43 PM
In Simutrans, map rotation means map rotation, not viewport rotatation. Not exactly ideal, but the simplest solution to implement.

Buildings do have an ability to face roads, but I'm not sure which rotation corresponds to a road at what side.

It would make sense that rotation numbers followed the same "compass" as ribis. That would make 0 north. 1 would be a 90 degree clockwise rotation from north and so on.

Dims are always specified as for a 0 rotation, that is they are x and y dimensions. For odd rotations, the values would be swapped on the map. But I'm not quite sure what your asking about. When the wiki writes about ends, it's related to stations, which add an extra meaning to rotations. This meaning is illustrated.
Title: Re: DIM directions?
Post by: Fabio on October 12, 2013, 05:47:25 PM
For dat file reference you can check out my Pak128 blocks on svn. They have 16 rotation each, 4 of which are N S E W and the next 4 are road corners. Having all a main entrance on the streetwalk and a small courtyard you can easily tell apart which side is which.
Title: Re: DIM directions?
Post by: prissi on October 12, 2013, 07:55:57 PM
This reminds me again at implementing the compass ...
Title: Re: DIM directions?
Post by: IgorEliezer on October 12, 2013, 08:00:41 PM
Quote from: prissi on October 12, 2013, 07:55:57 PM
This reminds me again at implementing the compass ...
Yes, please. Not only a compass with a fixed North but also some kind of user-friendly coord system: http://forum.simutrans.com/index.php?topic=10851.0 (http://forum.simutrans.com/index.php?topic=10851.0)
Title: Re: DIM directions?
Post by: greenling on October 15, 2013, 06:19:25 PM
Hello All
a compass in Simutrans it a good idea.
Title: Re: DIM directions?
Post by: Max-Max on October 15, 2013, 06:37:30 PM
Is it possible to have 4 different images for the map rotation button? One image for each direction...
(of course it is possible, but how much work is it?)
Title: Re: DIM directions?
Post by: Markohs on October 15, 2013, 06:50:10 PM
Compass would indeed be a great addition to simutrans, it requires not *much* effort, and it's very attractive to our players.
Title: Re: DIM directions?
Post by: kierongreen on October 15, 2013, 07:12:00 PM
QuoteIs it possible to have 4 different images for the map rotation button? One image for each direction...
See previous discussion about having a reverse rotate button. It's not that difficult just tedious having to implement more rotation functions for the map and all objects in it.
Title: Re: DIM directions?
Post by: Max-Max on October 15, 2013, 09:45:29 PM
Quote from: kierongreen on October 15, 2013, 07:12:00 PMSee previous discussion about having a reverse rotate button. It's not that difficult just tedious having to implement more rotation functions for the map and all objects in it.
I didn't mean to modify the current system of map "rotation", only to have the image on the map rotation gadget to be different depending on what rotation the map is in, for example image 0 for north, 1 for east, 2 for south and 3 for west... In this way teh map rotation button would also indicate the current map rotation...
Title: Re: DIM directions?
Post by: kierongreen on October 15, 2013, 11:04:54 PM
Ah - well yes that should be relatively easy. Although the icon is a bit small to indicate that?
Title: Re: DIM directions?
Post by: Max-Max on October 15, 2013, 11:07:21 PM
Quote from: kierongreen on October 15, 2013, 11:04:54 PMAh - well yes that should be relatively easy. Although the icon is a bit small to indicate that?
In this way the PAK designer can design the image for each direction. PAK128 already show all 4 directions, it would be enough to just paint the facing direction with another colour, or an arrow in the north direction. It's really up to the pack designer.

We need to add the images somehow in the .dat file although...
Title: Re: DIM directions?
Post by: An_dz on October 15, 2013, 11:13:19 PM
Just add N, S, E, W on map button, just like the number of spacing with signals.