News:

Congratulations!
 You've won the News Item Lottery! Your prize? Reading this news item! :)

DIM directions?

Started by Max-Max, October 12, 2013, 03:05:15 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Max-Max

In the Simutrans wiki 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
--

- My code doesn't have bugs. It develops random features...

Ters

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.

Max-Max

#2
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.
- My code doesn't have bugs. It develops random features...

Ters

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.

Fabio

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.

prissi

This reminds me again at implementing the compass ...

IgorEliezer

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

greenling

Hello All
a compass in Simutrans it a good idea.
Opening hours 20:00 - 23:00
(In Night from friday on saturday and saturday on sunday it possibly that i be keep longer in Forum.)
I am The Assistant from Pakfilearcheologist!
Working on a big Problem!

Max-Max

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?)
- My code doesn't have bugs. It develops random features...

Markohs

Compass would indeed be a great addition to simutrans, it requires not *much* effort, and it's very attractive to our players.

kierongreen

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.

Max-Max

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...
- My code doesn't have bugs. It develops random features...

kierongreen

Ah - well yes that should be relatively easy. Although the icon is a bit small to indicate that?

Max-Max

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...
- My code doesn't have bugs. It develops random features...

An_dz

Just add N, S, E, W on map button, just like the number of spacing with signals.