News:

Simutrans.com Portal
Our Simutrans site. You can find everything about Simutrans from here.

Out of images (more than 65534!), what's it?

Started by paulo francis PF20, May 12, 2013, 03:16:08 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

paulo francis PF20

I'm currently downloading addons pak128, and when I put on, and open the game, this error appears ´´ ERRO... register_image ***Out of images (more than 65534!)*** ``
what should it be? please help me! :)
PF FRANCIS

DirrrtyDirk

Simple: you installed too many addons. Simtrans can only handle a limited number of images and you are over this limit now. Reduce the number of addons you use and the game will run again.
  
***** PAK128 Dev Team - semi-retired*****

paulo francis PF20

but if I reduce the numbers of add ons, saved game, I have to delete. have another option?
PF FRANCIS

Ters

The number of add-ons you used for your saved game was apparently OK, or you wouldn't have been able to play it, let alone save it. Just go back to the add-ons you had then, and you can continue to play your saved game.

greenling

Hello Ters and paulo francis PF20
A brand new pak128 have alone already a 55% of memory use.
We need for pak128 slowly an new idea, how we can get more space in the memory from simutrans.
I think, that Simutrans need a new memory administration, that's support more than 65534 images can 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!

paulo francis PF20

let me get this straight ...the simutrans has a maximum capacity of memory image?
PF FRANCIS

VS

Yes, maximum is 65534 images.

(Vehicles have most images: 1 vehicle = N*8 images)

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!

IgorEliezer

Quote from: VS on May 12, 2013, 06:28:42 PM
Yes, maximum is 65534 images.
65534 is almost 2^(2^(2^2)). Yeah, power-of-two for the win!


paulo francis PF20

but there is no way to increase this capacity?
PF FRANCIS

Combuijs

No, apart from a rewrite of the whole program.
Bob Marley: No woman, no cry

Programmer: No user, no bugs



DirrrtyDirk

Quote from: paulo francis PF20 on May 12, 2013, 09:38:23 PM
but there is no way to increase this capacity?

Not for us normal users, no. The developers could increase this capacity of course, but it would probably cause performance to decrease, or increase the memory consumption of the game - or both. Therefore I don't think it's going to happen - especially since it only benefits a few people (those who use so many addons).
  
***** PAK128 Dev Team - semi-retired*****

An_dz

Quote from: IgorEliezer on May 12, 2013, 08:11:51 PM
65534 is almost 2^(2^(2^2)). Yeah, power-of-two for the win!
That's the reason!
2^2^2^2^2 = 65536, but programming start from 0 so you reduce one, the number is 65535.
But 65535 is the limit, you have only 65534 working slots.

Ters

Quote from: An_dz on May 13, 2013, 12:03:16 AM
That's the reason!
2^2^2^2^2 = 65536, but programming start from 0 so you reduce one, the number is 65535.
But 65535 is the limit, you have only 65534 working slots.

Or 2^16 as it is usually written. (That is, with ^ notation. 216 would be the correct way. Just in case someone is puzzled by the odd notation.)

I think the error message is slightly misleading. There are 65536 possible image "slots" numbered 0 through 65535. Slot 65535 is for "no image", reducing the number of possible actual images to 65535 (0 through 65534). The error prints 65534 apparently because there were attempts to load more images after slot 65534 had been filled, but that means there are actually 65535 loaded images. Either that, or Simutrans' calculations are one off, meaning that there is actually room for one more image, unless there is another special slot I'm not aware of.

IgorEliezer

Quote from: Ters on May 13, 2013, 05:00:34 AM
Or 2^16 as it is usually written.
Yes, I had found 216 too, but as 16 is a binary number, I broke it up for pedantic purposes. XD

Why not:

    2
   2
  2
2

2    = 65536


.... oh math spree! ;o)

Anyway, I propose a more descriptive error message, such as: "ERROR: Simutrans tried to load a number of images/graphics more than the limit (65534 images). Check your pakset folder and remove the exceeding pak files".

Václav

I think that Pak128 may be one of first pakset where may be problem with capacity of images - when too many add-ons have been installed. But there is question: What number is too many?

As development of some paksets will go on, I am afraid of that number may be lowered too much. And then, pure paksets may achieve this capacity. And this would not be. No pakset should achieve capacity.

But on other side, I don't understand usage of too many add-ons.

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

Spacethingy

I was wondering how on earth this would be possible, but actually...
Wild math guesses:

500 vehicles = 500*8 = 4,000 images
So, actually, relatively negligible.

Enough buildings to make a 100x100 city have no repeats (ignoring roads) = 100^2 *2 (for winter) = 20,000 images

multiply by three for various eras = 60,000

I've hit the limit already, and I've ignored roads, terrain, attractions...

So, actually, we must be nearly at the limit already, as already mentioned, in pak128 etc.
Life is like a Simutrans transformer:

You only get one of them, and you can't have it on a slope.

Ters

A pak set with 30000 different buildings? I imagined the most developed pak sets would have no more than a few thousand or so.

As for raising the limit, this would make an OpenGL renderer much more difficult. With all image slots filled, the images in pak128 would require 4 GB of video memory. Even more memory would be required for the frame buffer(s) and the geometry.

Markohs

For sure if images are to be stored in VRAM, a mechanism to load/unload them on demand will be needed.

paulo francis PF20

Quote from: Spacethingy on May 13, 2013, 05:07:41 PM
I was wondering how on earth this would be possible, but actually...
Wild math guesses:

500 vehicles = 500*8 = 4,000 images
So, actually, relatively negligible.

Enough buildings to make a 100x100 city have no repeats (ignoring roads) = 100^2 *2 (for winter) = 20,000 images

multiply by three for various eras = 60,000

I've hit the limit already, and I've ignored roads, terrain, attractions...

So, actually, we must be nearly at the limit already, as already mentioned, in pak128 etc.
That's right! over time, it will be a constant problem ... for more pak will be created, taking More stock images.
PF FRANCIS

Ters

Quote from: Markohs on May 13, 2013, 05:36:37 PM
For sure if images are to be stored in VRAM, a mechanism to load/unload them on demand will be needed.

Although having all images at the same size means it's easier to replace one without having to regenerate everything, having to swap images complicates things.

IgorEliezer

Hey, not mentioning that double heights, new landscape and new world board patches will add a ton of new images into Simutrans... so, free room is going to be no longer *so* free.

prissi

Only if they actually have different content. Otherwise simutrans merges the images in demand. And the last time I checked, the amount of images of pak128 was samethign around 35000 (or rather exact 35044). Double height will add about 4000 images (dependign on ways and so on).

In order to reach this limit, you will have to throw to paks together, like pak128.britain and pak in one folder. Since those use totally different styles alignment and industries, this is a very bad idea. Using all know vehicles for pak128 (and not pak128.japan or britain) you will not reach this limit (yet).

Fabio

but instead of crashing couldn't it simply stop loading with a warning  and crash only if resulting pakset. is invalid?
addons should be loaded after base pakset.

An_dz


Ters

Just continuing to load without loading it all might cause all kinds of odd things. And people, having just ignored the warning, will complain that things are strange. I think it's better that they get a fatal error right away, so that they can come here complaining about that. Then we can easily tell them what's wrong from a simple error message, rather than having to deduce what caused the mysterious strangeness.

greenling

Hello Ters,An_dz,Fabio,prissi
The limit from 65530 images reach for a full develop pak128 not really out.
Pak128 it before 1930 at the Vehicle and factory,and after 2000 not full development.
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!

SaschaPascalS

Well, as the first guy reaching the border already one year ago, I can say, the most images produced are NOT by trains (only 8 normally), but by WAYS and Catenaries. Because there you have much images so that for etc a elevated track looks good in much different alignments, also as the corresponding catenary. And especially the pak128.japan has a much amount of different ways, elevated in 80-360 in different speeds and colours (with our without earth on the beton-body), Catenaries in much styles (even for more parallel tracks, a realistic establishment, or tell me any train station with 10 tracks, where you have one-arm catenaries for every track) etc. For simple gaming perhabs too much, but for example I am a map artist ;) I like to build up interesting looking maps :D