Author Topic: DIM directions?  (Read 4552 times)

0 Members and 1 Guest are viewing this topic.

Offline Max-Max

DIM directions?
« on: October 12, 2013, 03:05:15 AM »
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:

Code: [Select]
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
--
« Last Edit: October 12, 2013, 03:24:00 AM by Max-Max »
- My code doesn't have bugs. It develops random features...

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 4632
  • Total likes: 168
  • Helpful: 107
  • Languages: EN, NO
Re: DIM directions?
« Reply #1 on: October 12, 2013, 08:54:12 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.

Offline Max-Max

Re: DIM directions?
« Reply #2 on: October 12, 2013, 02:36:32 PM »
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.
« Last Edit: October 12, 2013, 02:59:11 PM by Max-Max »
- My code doesn't have bugs. It develops random features...

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 4632
  • Total likes: 168
  • Helpful: 107
  • Languages: EN, NO
Re: DIM directions?
« Reply #3 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.

Offline Fabio

  • Devotee
  • Administrator
  • *
  • Posts: 2898
  • Total likes: 6
  • Helpful: 91
  • The Pak128 Guy
    • Visit me on Facebook
  • Languages: EN, IT, RO, FR
Re: DIM directions?
« Reply #4 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.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 8725
  • Total likes: 303
  • Helpful: 228
  • Languages: De,EN,JP
Re: DIM directions?
« Reply #5 on: October 12, 2013, 07:55:57 PM »
This reminds me again at implementing the compass ...

Offline IgorEliezer

  • Devotee
  • Administrator
  • *
  • Posts: 3921
  • Total likes: 124
  • Helpful: 69
  • Lost In Stupid Parenthesis
    • Igor Eliezer Architect and Urban Planner/Arquiteto e Urbanista
  • Languages: PT, EN, AutoLISP, Python
Re: DIM directions?
« Reply #6 on: October 12, 2013, 08:00:41 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

Offline greenling

  • Lounger
  • *
  • Posts: 1729
  • Total likes: 2
  • Helpful: 15
  • Simutransarchology it my hobby!
  • Languages: DE,EN
Re: DIM directions?
« Reply #7 on: October 15, 2013, 06:19:25 PM »
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!

Offline Max-Max

Re: DIM directions?
« Reply #8 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?)
- My code doesn't have bugs. It develops random features...

Offline Markohs

  • DevTeam, Coder/patcher
  • Devotee
  • *
  • Posts: 1560
  • Total likes: 2
  • Helpful: 86
  • Languages: EN,ES,CAT
Re: DIM directions?
« Reply #9 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.

Offline kierongreen

Re: DIM directions?
« Reply #10 on: October 15, 2013, 07:12:00 PM »
Quote
Is 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.

Offline Max-Max

Re: DIM directions?
« Reply #11 on: October 15, 2013, 09:45:29 PM »
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.
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...

Offline kierongreen

Re: DIM directions?
« Reply #12 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?

Offline Max-Max

Re: DIM directions?
« Reply #13 on: October 15, 2013, 11:07:21 PM »
Ah - 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...

Offline An_dz

  • Web Admin
  • Administrator
  • *
  • Posts: 2591
  • Total likes: 288
  • Helpful: 89
  • D'oh
    • by An_dz
  • Languages: PT, EN, (it, de)
Re: DIM directions?
« Reply #14 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.