News:

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

show different age for tree objects

Started by Frank, January 03, 2010, 02:29:24 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Frank

show different age for tree objects

old:

[age] months old

new:

age 0 months = 0 months old
age = 1 month = 1 month old
age 2 -11 months = x months old
age 12 - 23 months = 1 year old
age > 23 months = x years old

changed translate string "Monate alt" to "months old"
add translate strings "month old", "year old" and "years old"

different_show_age_treeobjects.diff

VS

Good idea.




Actually... we might as well consider using gettext if we're going to dive into plurals. Czech has three forms (1, 2-4, 5+) and rules for some other languages are a lot more complicated.

My projects... Tools for messing with Simutrans graphics. Graphic archive - templates and some other stuff for painters. Development logs for most recent information on what is going on. And of course pak128!

jamespetts

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.

prissi

Not sure if this is such a good idea, given the speed of many translations. Apart from the plural issues.

MHD

At least the idea with years instead months is better than now. The numbers are big and noone will calculate the years from it (except he feels very very bored) ;-)

skreyola

Yeah. Tree ages are generally understood in years (if not centuries) IRL.
--Skreyola
You can also help translate for your language with SimuTranslator.

Fabio

IMO, 0 months old is a bit lame... "just planted" would sound much better, wouldn't it? :::)

Isaac Eiland-Hall

It would, unless it causes too much havoc in the code. Except that also, was it planted? Or did it just germinate naturally? ;-)

jamespetts

And is it growing on chalk or clay soil?
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.

VS

An useful addition would be one comprehensive info window for all trees on tile, instead of a score of these... Of course that is entirely different matter.

My projects... Tools for messing with Simutrans graphics. Graphic archive - templates and some other stuff for painters. Development logs for most recent information on what is going on. And of course pak128!

prissi

I was also thinking of merging trees in a single structure to save memory (like TTD does), but then the "pure" OOP approach let me abstain from it.

However, it seems that tree age in years is a majority vote, so it will be done.

skreyola

I think trees under 1month old should still say 1 month... perhaps tree ages should start counting at 1... or display in this fashion: 1 month (for 0-1) ... 12 months (for 11-12), then 1 year, etc.
I don't think it should ever give the age as 0 months... Maybe 'sapling' or 'new' or 'days old' (without specifying the number).
--Skreyola
You can also help translate for your language with SimuTranslator.

prissi

I would think a string like "%i years %i months" will be added. And honestly, you will almost never ever find a zero aged tree, unless you planted it deliberately at zero age.

Spike

Quote from: prissi on January 05, 2010, 09:23:51 PM
I was also thinking of merging trees in a single structure to save memory (like TTD does), but then the "pure" OOP approach let me abstain from it.

A "flyweight" design pattern might help with this. And it's OOP.

prissi

Ok, the new translation has been added.

Spike


prissi

Thiis is slowing going towards offtopic but:
Trees are already only 12bit references and the position and so one is needed, as a tree in simutrans is allowed to be anywhere on a tile.
The only way out I see would be forest tiles with a predefined pattern for the trees (maximum four or so) with individual type and age but fixed position and so on. But I am not sure how to handle loading, or I rather thing this is a lot of work with not so much gain, as memory is usually not the limit nowadays.

Dwachs

Quote from: prissi on January 18, 2010, 10:49:34 PM
Thiis is slowing going towards offtopic but:
Trees are already only 12bit references and the position and so one is needed, as a tree in simutrans is allowed to be anywhere on a tile.
The only way out I see would be forest tiles with a predefined pattern for the trees (maximum four or so) with individual type and age but fixed position and so on. But I am not sure how to handle loading, or I rather thing this is a lot of work with not so much gain, as memory is usually not the limit nowadays.
Also the displaying of multi-tree tiles will become a problem, if multiple trees are organized in one instance.

One possible change could be to remove the position from the ding_t class, since many derived classes only need to know their position on the map if their image is to be calculated (almost everything in dings/*). Only vehicles/grounds/maybe ways need to know their position always. This could save 5 bytes per object.
Parsley, sage, rosemary, and maggikraut.

Spike

I just thought, since a few times it was suggested to players to turn treees off, since they make up for 30% of mein memory apparently, that there must be quite an overhead. I didn't knwo that trees had been optimized this much already.

For me, the trees are something important, particularly that they age, seed new trees, basicially that they are a micro ecological simulation in the Simutrans world.

prissi

One could also pass the position as step() method, then the tree could do without. And we can remove x offset too. Hmm.

z9999+

[off-topic]
Rate of wood on rectangle map is very bad.
If we start a new game with rectangle map like 1024x256 or 256x1024, more than 80% of land is wood. I feel this is too much.

Dwachs

yes, the create forest function do not scale right with map size.
Parsley, sage, rosemary, and maggikraut.