News:

Want to praise Simutrans?
Your feedback is important for us ;D.

two season FrontImage, one season BackImage

Started by Fabio, November 05, 2011, 04:41:44 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Fabio

If i set summer and winter for front and only summer for back, in winter only front is shown.

I would like that if there is only one back and one front for each season, the same back is shown also in winter. This way we could save memory putting only the snow in the front image

prissi

Identical images are not loaded during game time. Thus just include two.

A more sophoisticated approach could have been done; but in pak128 on ~100 images were double. For those such a complex system was decided too complex for little gain.

Fabio

So if i put the dame backimage twice and i set front to - in summer and snow layet in winter for frontimage, the backimage will be loaded only once? could it be also stored only once in the  .pak file?

prissi

The storing in pakfile is not implemented. Usually harddisk space is not too critical, but the number of images in memory is limited to 65534.

greenling

@Prissi
It´s Possible the Limit from 65534 images to lift up on to 131068 images?
I Have many Pakfiles they want i use.
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!

Fabio

Quote from: prissi on November 06, 2011, 07:47:49 PM
The storing in pakfile is not implemented. Usually harddisk space is not too critical, but the number of images in memory is limited to 65534.
Would it be possible to implement? ATM I have an issue with pak128 where i prepared a 300+ MB pak with a houses set which size would be halved by tjis implementation...

greenling

We need a higher limit for Images that new modelles can be build in!
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!

Václav

Quote from: greenling/As.fr.Ar.fo.Si. on November 06, 2011, 07:55:17 PM
It´s Possible the Limit from 65534 images to lift up on to 131068 images?
I Have many Pakfiles that I want use.
I don't see why to have in game all what is available ... like you. So, this is not most needed for your reason.

... Following number cannot be 131068 (or even 131071 that is 217-1) - because that max number of pictures is 65535 (216-1) ... and byte counting prevents such number as 217 (or not?, prissi)

Chybami se člověk učí - ale někteří lidé jsou nepoučitelní

ӔO

from my understanding, it's a memory address range issue.
65 534 (dec) = FFFF (hex) = 2^16 = 64KB

I guess the next step up would be
1 048 575 = FFFFF = 2^20 = 1024KB
My Sketchup open project sources
various projects rolled up: http://dl.dropbox.com/u/17111233/Roll_up.rar

Colour safe chart:

greenling

The Limit for 65 534 Images it´s too low for the many new modelles what fabio want make. ::( ::'(
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!

Fabio

Don't worry greenling, i don't plan to paint SO MANY houses. But less disk space would help instead ;)

greenling

fabio make your modelles and make the Simutransgame colorful.
I hat beginning to analyze Computer find many modelles they have many Images!
I be list up how many modelles be get exceed the Limit form 65 534 Images.
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!

Ters

Quote from: AEO on November 06, 2011, 09:14:27 PM
from my understanding, it's a memory address range issue.
65 534 (dec) = FFFF (hex) = 2^16 = 64KB

I guess the next step up would be
1 048 575 = FFFFF = 2^20 = 1024KB

65534 is the maximum value for a 16 bit number (minus one, possibly because one value is used to signify "no image"). The next logical step would be 32 bit, which would put the limit at over 4 billion. (The fact that official simutrans builds are only 32 bit means that they can't access enough memory to reach that limit in practice.) Doubling the size of image identifiers will increase the game's memory consumption, which in turn makes the game run slower. (Not sure how much, though.) 24 bit and a limit of 16 million or so is also technically possible, as are all multiples of 8 bits (a byte), but will either result in memory consumption equal to 32 bit, or introduce alignment issues that decrease performance further.

VS

I think it's simply index of an array, which was expected to never reach 64k entries (ought to be enough for everyone!) and to make object instances smaller, a smaller type was used. Bumping all the index variables to 32 bits is inevitable, new array size is arbitrary.

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

However, you can only reach this limit, if you copy EVERYTHING ever made into a single folder. This will however not give a nice nor a playable game.

If some pak really goes close to this border  (last time I check with pak128 evn with tons of addons was at 40k images) then we will extend it. But as written correctly, every singe thing in the game stores at least an image. Thus doubling this will increase memory consumption.

Giving that everthing grows, it will happen sooner or later. But currently it is not on the top of my list.

VS

...now that I read back, number of images was never the point of this thread :)

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!