News:

Simutrans Wiki Manual
The official on-line manual for Simutrans. Read and contribute.

patch: allow snow images for sidewalks

Started by Dwachs, April 27, 2010, 07:22:58 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Dwachs

Attached a simple but effective patch that allows for snowy sidewalk graphics. No new makeobj needed.

Edit: Deleted a lot of text and added:

Documentation of the incorporated feature at the wiki:
http://simutrans-germany.com/wiki/wiki/tiki-index.php?page=en_MiscDef#Sidewalk
Parsley, sage, rosemary, and maggikraut.

jamespetts

Excellent! Now all that we need is an animation routine for the little pedestrians slipping and falling over...
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

The Hood

Good work!  I've been wanting this for a while.  Hope it gets into trunk.

Dwachs

I am tempted to move this topic to 'Considered patches' or even 'Incorporated patches' :D

Are there any opinions about the indexing? The trunk version uses indices 0,3,6,9,12 - these wont change. I implemented to use the old indices+16 for snow images (eg 16,19,22,25). Are there any worries to implement the snow images at+1 (ie 1,4,7,10) ?

What about transition images? Are they necessary?
Parsley, sage, rosemary, and maggikraut.

prissi

I would leike to use rather "image[flat]", "image[NE]", and so on, if one really touches this. Or using [0][0] as an alternative to [16] to have more consistency. (It can be put into the same position by makeobj anyway.)

And being greedy, I think it should be also allowed for empty images; then the city road can have all the snow and the sidewalk.

Fabio

Great! I was waiting for this for ages!

Any chance to have also, say, a timeline?

prissi

A timeline could be easily done by using different graphics for the actual city roads.

gauthier

QuoteNow all that we need is an animation routine for the little pedestrians slipping and falling over...

I support ;)

prissi

I am sorry, since the catergory of those images is misc, we have indeed go with the [16+X] definitions ... THus I am think this is ready for inclusion. (Or one would have to have a new ground obj with the name "sidewalk" ...

Dwachs

anyone against changing the index to X+1 (instead of X+16) as above? then the dat files will be more compact.
Parsley, sage, rosemary, and maggikraut.

prissi


Dwachs

Implemented in revision 3194.

Snow images are at X+1, transitions images at X+2 (for sloped tiles, snow at top, no snow at bottom).
Parsley, sage, rosemary, and maggikraut.

The Hood

Question about transition images on sloped tiles - is it currently possible for way graphics to have a similar switch from snow at top to snow at bottom?

Fabio

Quote from: Dwachs on May 01, 2010, 07:29:31 AM
then the dat files will be more compact.

Would it be possible to have all omissed entries in a dat file to be considered as "-" by makeobj?

e.g. this dat file:

Obj=misc
Name=Sidewalk
Image[0]=ls-tiles.0.4
Image[3]=ls-tiles.0.2
Image[6]=ls-tiles.0.3
Image[9]=ls-tiles.0.1
Image[12]=ls-tiles.0.0
Image[16]=ls-tiles-2.0.4
Image[19]=ls-tiles-2.0.2
Image[22]=ls-tiles-2.0.3
Image[25]=ls-tiles-2.0.1
Image[28]=ls-tiles-2.0.0


being the same as this one:

Obj=misc
Name=Sidewalk
Image[0]=ls-tiles.0.4
Image[1]=-
Image[2]=-
Image[3]=ls-tiles.0.2
Image[4]=-
Image[5]=-
Image[6]=ls-tiles.0.3
Image[7]=-
Image[8]=-
Image[9]=ls-tiles.0.1
Image[10]=-
Image[11]=-
Image[12]=ls-tiles.0.0
Image[13]=-
Image[14]=-
Image[15]=-
Image[16]=ls-tiles-2.0.4
Image[17]=-
Image[18]=-
Image[19]=ls-tiles-2.0.2
Image[20]=-
Image[21]=-
Image[22]=ls-tiles-2.0.3
Image[23]=-
Image[24]=-
Image[25]=ls-tiles-2.0.1
Image[26]=-
Image[27]=-
Image[28]=ls-tiles-2.0.0


Dwachs

Quote
Would it be possible to have all omissed entries in a dat file to be considered as "-" by makeobj?
Possible maybe, but the part of makeobj that compiles these sidewalk-graphics does not know about the maximal number of entries. Thus it stops as soon as an image-index is missing (and assuming no more will follow).

However, the incorporated patch uses different indices than the opening post! See here:

http://simutrans-germany.com/wiki/wiki/tiki-index.php?page=en_MiscDef#Sidewalk

Parsley, sage, rosemary, and maggikraut.

Fabio

It was just a general note, i've seen something changed :)

Still going general, what if Image[0] is not the firts Image entry but, say, Image[28], makeobj goes down from 28 to 0? Does it make sense? Just curious...

Dwachs

Quote from: fabio on May 04, 2010, 10:03:04 AM
Still going general, what if Image[0] is not the firts Image entry but, say, Image[28], makeobj goes down from 28 to 0? Does it make sense? Just curious...
... would have to be implmented. I do not know how hard that would be, eventually.
Parsley, sage, rosemary, and maggikraut.

Fabio

I don't know if it fits here, but could you use the indexes 16+ to define the "sidewalk" images shown in underground mode?

thanks!

Dwachs

New misc-object implemented: TunnelTexture. Now guess, where it is used :)
Parsley, sage, rosemary, and maggikraut.


Fabio

Quote from: Dwachs on May 15, 2010, 10:03:31 AM
New misc-object implemented: TunnelTexture. Now guess, where it is used :)

Wow, i'm looking forward to seeing this incorporated ;D

Dwachs

It is implemented. 'Only' graphics/paks are missing ;)
Parsley, sage, rosemary, and maggikraut.

The Hood

What is a TunnelTexture, and how is it used?