The International Simutrans Forum


Author Topic: Climate-dependant graphics in one object  (Read 1549 times)

0 Members and 1 Guest are viewing this topic.

Offline Leartin at

  • Devotee
  • *
  • Posts: 1249
  • PAK-DEV P192C
  • Languages: DE, EN
Climate-dependant graphics in one object
« on: April 24, 2014, 11:14:20 AM »
Obviously, you can already assign which object can be in which climate zone, and for buildings and trees, this works. However, there are two drawbacks:
1) Anything the player builds is climate independant. For example, a depot, station extensions, but also ways. If you want to have different streets in a desert than in mountains, you'd have to provide them as seperate objects, making the menu more clunky.
2) When you change climate, all the climate dependent stuff is still there, allowing for cacti in mountains as well as flower meadows in a desert.

My suggestion is to have one object with different graphics, depending on the climate it is placed in, somewhat similar to the loaded graphics of vehicles. Additionally to the normal code, the DAT-File would have something like "[ 0 ]climateimage..." and "climate [ 0 ] = desert, tropic" or something similar. In a non-climate specific context, like buildings preview in the map editor, the standard graphics would be used, while on the field the climate graphics are rendered.
Some things where this could be useful:
  • Creating more destinct climate zones. Most often, the amount of streets in a simu-city is higher than the amount of buildingss, but the streets always look the same. Therefore they always have to be generic enough to fit all climate zones, and thus all climate zones look a bit generic as well.
  • Enabling more graphics. In pak192.comic, we currently use German signals (as far as I am aware, I have no idea about those things). Citarofahrer made swiss signals as well, but we all agreed that it's not a good thing to have multiple signals which all do the same things, so they won't be in the main set. With climate depending graphics, there would still be only one signal-building-button, so players who don't care too much about graphics won't have anything changed. But those who do and want, for example, be swiss, can just change their climate to swiss and have the signals they want.
  • Easier use of similar buildings in multiple climates. For example, we have a townhall in pak192.comic which shows a German, Austrian and European flag, simply because that was a better choice over completely generic flags which might belong to some old duchy anyway. They are animated as Frontimages. With Climate Dependant Graphics, you would only have to change the animation part for different climate zones, giving them fitting flags. The same is true for other things, like vegetation in the garden. Make a tree Frontimage and exchange it with ease for each climate.
  • Changing ground-objects with climate. Not only would it be nice to turn palm trees into oaks and solid rock into a pile of sand by changing the climate. You could also create the same object for different groundtextures easily. For example, you could use alpha-shadows by pre-combining them with the ground texture, thus creating multiple objects, one for each climate. That's not feasable with the way things are currently, as they would be destinct objects with destinct description, rather than one object.

In further speculation, maybe this could enable even more Multi-graphic-objects. Eg. instead of 20 different rocks in a climate, you might want to have one rock object which gets a random number at spawn, showing the correct rock image by that number. Or, if extended to ways, you could have a tiny bit of road with skid marks, gully, dead toad, zebra,... at a low chance.