About the weight of objects

Discuss everything related to Trackmania 2.

Moderator: English Moderator

User avatar
Demented
Posts: 2327
Joined: 07 Nov 2010, 13:17
Location: United States

Re: About the weight of objects

Post by Demented »

BusardCendre wrote:I have to confess that this job is a little bit tedious .
Conquering those boring tasks...
That's the very thing that makes it so appreciated by others. :thumbsup:
You'll look back at it with pride.
CPU: Intel I7-4770 64Bit @ 3.4Ghz.
Ram: 32GB DDR3
GPU: Geforce GXT 1060 6.2GB DDR5
Windows: 7 Pro SP1 64bit
BusardCendre
Posts: 174
Joined: 30 May 2013, 09:40

Re: About the weight of objects

Post by BusardCendre »

Demented wrote:
BusardCendre wrote:I have to confess that this job is a little bit tedious .
Conquering those boring tasks...
That's the very thing that makes it so appreciated by others. :thumbsup:
You'll look back at it with pride.
I knew it would be long and boring when I began to think about making that little thing ;)
I just wanted to complain a little bit about it. :lol:
Anyway, thanks for your moral support :thx:

I already have weight of 181 objects in Canyon, and 99 icons for those which are in Items folder (when there is one).
For sure I will get icons when objects are in a Pack.gbx, but I got another little idea ... ;)
about icons, I have a question for you guys : as a lot of objects have no icons ingame, I wonder if I should make some icons for those ones ... so people who don't know all objects by heart don't have to clic on empty icon to know which object they want ( I'm in this case ^^). As I will have to make picture with at least the name of those object like ingame, I could make real icons to these files in my tool.
well, it will be easy for me to use it because I have two screens, but I know everybody isn't so lucky and that it will be faster/less borring to search for an object ingame instead of swiching between ManiaPlanet and my little thing ...
I don't really know if you'll find it usefull, so what do you think ?

sorry for my english ;)
Image

CPU : AMD FX-4170 (4 CPUs, ~4.2 GHz)
GPU : Sapphire Radeon HD 7850, 2 Go , DX 11
RAM : 8 Go DDR3
Win 7 Ultimate x64
User avatar
Demented
Posts: 2327
Joined: 07 Nov 2010, 13:17
Location: United States

Re: About the weight of objects

Post by Demented »

Icons would be nice.
Are you doing all objects or just ones that are embeddable?
I'd maybe just make icons for embeddable objects, then if you have time and still want to, do some others.
CPU: Intel I7-4770 64Bit @ 3.4Ghz.
Ram: 32GB DDR3
GPU: Geforce GXT 1060 6.2GB DDR5
Windows: 7 Pro SP1 64bit
BusardCendre
Posts: 174
Joined: 30 May 2013, 09:40

Re: About the weight of objects

Post by BusardCendre »

the tool is to know how much free space is left once some embeddable objects are choosen, so for the moment it should be only with embeddable ones ;) .

I will add some visual thing (maybe some color around objects) so we can easily know wich objects still can be added without exceeding the weight limit .
and a little counter to know what is the free space remaining .

I began writing some code,
as I learned web coding alone, it's going to be a little bit hard :lol:
it's gonna take me some time but I will succed ;)
I've tried some things in php, but I can't make it work for the moment
gonna try it in javascript ...
I really need to make more tests before choosing how to write it .
Image

CPU : AMD FX-4170 (4 CPUs, ~4.2 GHz)
GPU : Sapphire Radeon HD 7850, 2 Go , DX 11
RAM : 8 Go DDR3
Win 7 Ultimate x64
BusardCendre
Posts: 174
Joined: 30 May 2013, 09:40

Re: About the weight of objects

Post by BusardCendre »

Hi all

I have a big problem with weight of objects !
gonna try to explain ...

I have finally succeeded to write some code in javascript to have something that is working :
when you click on an object, the color around his image becomes blue
and his weight is displayed in a green rectangle as well as the remaining space,
you can select as many objects as you want ...
when max weight has been reached, the rectangle becomes red, so we easily know we won't be able to save the map with all these objects.
then we just need to deselect the object(s) you don't want any more, then blue around object(s) disappear and the rectangle comes back to green once total weight < 307.2 ...
I have some more ideas that I will try to add later ;)

but I now have a big problem :
If I select with my tool some objects so that the total weight is 306.4 (remaining space is 0.8 ko), and try to save a map with the same objects, the game tells me it's not possible because total weight is 308.4 :o ( so + 2.0 ko)
Then if I remove from my tool and from my map an object which weight given by electron's programm is 15.0 ko,
I have with my tool 291.4
now the map is savable ( new english word from 'to save' 8-) ) with all objects, but electron's prog tells me the total weight is 288.5 ( so - 2.9 )
so my object's weight is 4.9 ko bigger ingame than with the program made by Electron
and I don't understand anymore anything ...
does object's weitght change if more than one object in a map ?
As I've spent I don't know how many hours getting weight of almost 200 Canyon embeddable Objects saving maps with only one object to get all those weights, seeing the weights I have are not good makes me a little bit :evil:

hope you understand all my little story and will be able to help me before I get crazy ;)

P.S. : just tried with another one instead of the 15.0 ko one) : with my tool : 327.6 , ingame 330.1 :roll:
Image

CPU : AMD FX-4170 (4 CPUs, ~4.2 GHz)
GPU : Sapphire Radeon HD 7850, 2 Go , DX 11
RAM : 8 Go DDR3
Win 7 Ultimate x64
BusardCendre
Posts: 174
Joined: 30 May 2013, 09:40

Re: About the weight of objects

Post by BusardCendre »

I've just put what I've done online so you can test the weight differences beetween the game and my page
(if you don't understand what I mean, read the last post)
some images are missing, it's because objects are in a .Pack.gbx and I still haven't worked on them ( but you can click on their names to add their weight to the counter ).
I will do it if someone find a solution for thosese weight differences ...
I don't really want to spend so much time on something that gives false results, and I really don't know what to do to make it work properly ... I need the real weight of objects
Strangely, after some tests, sometimes the game gives a bigger total weight and sometimes a smaller one.

As I show you what I've done, here are some little things about my tool :
On the left, the folder's names where Items are stored and in ( ) the login of who made the 3D object.
You have to click on the Icon of the Items you want to embed,
weight is added at the top right of the screen, if free space < 0 then the green rectangle becomes red.
then you can click again on an Icon to deselect it.
there are not enough items for the moment but if your window is small enough, you'll notice that you can see the rectangle with total weight and free space even if you scroll down ;)
As you can see, there are some VioK's objects in ithere, and they are at the beginning of the page, it's because the game gives us items in reverse alphabetical order, so I did the same.
I will try to add a cool functionality (hope you like it^^) : the possibility to uncheck the objects that you don't have ingame, so you don't have to search what you need between items you don't have ( with about 200 ones, if you just uselly use 50 of them you certainly understand what I mean)
for sure I would like that my page remember the items you don't want to use and see, but don't really know how I will do that, maybe with cookies (never used that kind of thing so I don't know yet how it works) or may be keeping your settings on page's side, but then the page must recognize you ... maybe I could use ManiaPlanet's API, then I think I will need help ( been trying to understand it a few times but never understood how to make it work :oops: )

but first I need the real weight on objects

Thanks for your help ;)

link for the page
Image

CPU : AMD FX-4170 (4 CPUs, ~4.2 GHz)
GPU : Sapphire Radeon HD 7850, 2 Go , DX 11
RAM : 8 Go DDR3
Win 7 Ultimate x64
User avatar
Electron
Posts: 797
Joined: 15 Jun 2010, 18:02
Contact:

Re: About the weight of objects

Post by Electron »

BusardCendre wrote:does object's weitght change if more than one object in a map ?
Yes (see my postings above).

It's not easy to explain:

This is the layout of the Items block inside the map:

Code: Select all

uint32 version
uint32 0
uint32 sizeItems // Embedded Items block size (from the next byte to the end of the chunk)
uint32 countItems
meta items[countItems] // item folder, collection, author
uint32 sizeZip
byte zip[sizeZip] // .ZIP archive of all item files
if version >= 1:
   uint32 countTextures
   string texture[countTextures]
The definition of "meta" and "string" is described here.

My tool indicates the "sizeItems" value and it looks like, this value is the one that is compared against the limit (307,2 KB) inside the editor. But I am not really sure because I have not much Items downloaded to test.

The folder paths, the environment string and the author names ("meta items") are stored in a "lookback" list. Only the first occurrence is stored with full length. For every further appearance (e.g. a different Item from the same author) only a reference/index to the string in the lookback list is stored.

Same with the references to the used ingame textures ("string texture"). If Item "A" uses the same texture as Item "B", the ingame path to that texture file is stored only once.

The Items itself (*.Item.gbx, *.Mesh.gbx, *.Shape.gbx) are stored as one regular ZIP archive inside the map.
Compressing all used Item files at ones will have a different ZIP size than the sum of each Item zipped alone.
Image
TM²: TrackMania Telemetry Monitor version 1.2.4
BusardCendre
Posts: 174
Joined: 30 May 2013, 09:40

Re: About the weight of objects

Post by BusardCendre »

Thanks for your answer man,

If I understand well what you wrote, then when putted together, we have chance that the weight of object decrease a little bit,
if that was always true, then that wouldn't cause me any problem ;)

but with my first test (with several objects I made with almost same texture + one from another creator), the total size was bigger than the addition of the size of each of them :roflol:
and then, it's not good anymore ...

Well let's tell I will add a sentence at the beginning of my tool's page to explain that when total weight is near the limit, then, my tool doesn't always give a true answer, so sometime it doesn't work ..

it's really too bad, because the main interest of this tool is when the max weight limit is almost reached :roll:

however, been keeping working on it last night ( until 6 this morning ), I've add some tooltips when mouse is over icons, that tells us the name of objects and the creator's login.
gonna try tonight to automatically change the color around items when their weight is too big compared to available space ...
but I don't know if there is something like the php foreach function in javascript, I think I'm going to have some fun with that ;)

do not hesitate, guys, to tell me some good ideas for this tool =)
Image

CPU : AMD FX-4170 (4 CPUs, ~4.2 GHz)
GPU : Sapphire Radeon HD 7850, 2 Go , DX 11
RAM : 8 Go DDR3
Win 7 Ultimate x64
User avatar
Electron
Posts: 797
Joined: 15 Jun 2010, 18:02
Contact:

Re: About the weight of objects

Post by Electron »

BusardCendre wrote:If I understand well what you wrote, then when putted together, we have chance that the weight of object decrease a little bit,
That's what I expected. Therefore I have uttered no further warning.
BusardCendre wrote:but with my first test (with several objects I made with almost same texture + one from another creator), the total size was bigger than the addition of the size of each of them
I have currently no explanation for this.

If helpful, I could rewrite my tool (only for you) so that it extracts the ZIP file with the items from a given map. So you could get the icons from items that are stored in packages (*.Pack.Gbx).

I could also provide a Unlimiter tool that removes the embedded items storage limit of 307,2 KB.
Hmm, no, better not (as long as it's not clear why there is this limit at all).
BusardCendre
Posts: 174
Joined: 30 May 2013, 09:40

Re: About the weight of objects

Post by BusardCendre »

Electron wrote:
BusardCendre wrote:If I understand well what you wrote, then when putted together, we have chance that the weight of object decrease a little bit, but with my first test (with several objects I made with almost same texture + one from another creator), the total size was bigger than the addition of the size of each of them
I have currently no explanation for this..
Maybe someone from Nadeo team will a day come and explain us what's going on with it ... :?:

Electron wrote:If helpful, I could rewrite my tool (only for you) so that it extracts the ZIP file with the items from a given map. So you could get the icons from items that are stored in packages (*.Pack.Gbx).
:yes: That would be really great ! !
Image

CPU : AMD FX-4170 (4 CPUs, ~4.2 GHz)
GPU : Sapphire Radeon HD 7850, 2 Go , DX 11
RAM : 8 Go DDR3
Win 7 Ultimate x64
Post Reply

Return to “Trackmania 2”

Who is online

Users browsing this forum: No registered users and 1 guest