Thx for bik support, so now we have 3 or 4 images format that we can use in game. But I'm wonder - why we still using extensions to recognize filetype? I suggest to recognize filetype by header what can gives us possibility to replace resources (locators) on our fileservers without change all maps. That's just an example, but will be very nice if I can overwrite all jpg or png files with bik animations under jpg or png extension - then on all my maps where I used static signs before, I'll can replace them by animated ones just by replacing remote files. Now it's impossible, because TM recognizes animations/images by extension (but not in all cases - I can write PNG as file with JPG extension and game recognizes file proper).
Please - make resoures extension-independent. It will be nice.
Suggestion - formats independent of the extensions
Moderator: NADEO
-
- Posts: 536
- Joined: 05 Aug 2011, 18:12
- Contact:
Re: Suggestion - formats independent of the extensions
Moved to ManiaPlanet reports as it could be very interesting regardless of the game type.
But this suggestion has to be thought about very carefully.
E.g. file names should be different, so where is the matter then?
And on your own disk, how would you then recognize the files without looking inside of them?
But this suggestion has to be thought about very carefully.
E.g. file names should be different, so where is the matter then?
And on your own disk, how would you then recognize the files without looking inside of them?
-
- Posts: 536
- Joined: 05 Aug 2011, 18:12
- Contact:
Re: Suggestion - formats independent of the extensions
TMarc - please, read about file headers. I know that people who using only Windows thinks that extension is the only way to recognize filetype, but on other computers and filesystems extension was only fragment of filename and nothing more.
I'm also wonder what do you mean when you write: "file names should be different, so where is the matter then?". For me that question has no sense, but maybe I don't understand this.
Ok, I'll give you example:
1. Create any JPEG file.
2. Rename that file into "zzz.fik" (what is fik? fik is nothing, fik is extension that I just invented :)
3. Upload that file into fileserver
4. Here is direct link to that file: http://www.loc.thrash.pl/zzz.fik (link really works, check that)
As you see, your browser doesn't care that JPEG has no JPEG or JPG extension, isn't? :) Of course if you save that FIK file into your HDD then you probably will have problems with open that file by double click or image viewer will show you an error, but this is Windows problem, not image itself.
Now, if you know that, let's move forward. Imagine that you upload files on your own fileserver before game allow put bik animations on billboard or MT. So all your files are like that:
left.jpg, right.jpg, up.png, down.png
Now you created 100 maps with that static signs and TM programmers at last made bik support. So - best way to replace boring static signs on every of your maps into animated ones is create 4 nice bik animations and replace files on server. But files has extensions like ".jpg" or ".png" so...? Exactly! So what? Rename bik extension to jpg and this still will be bik, but in wrong extension, which is not important, because every file has unique header.
And that way you can change signs on your every map using just one rename (one per file).
Possibilities are greater - for example, some fileserver doesn't allow to upload ogg or mux files. So - just rename supersong.ogg into supersong.abc and that's all - it's still ogg, but will be recognized by header, not by extension.
I hope now is clear.
PS. Of course I don't write about free fileservers or other free crap where you cannot control or replace your resources.
I'm also wonder what do you mean when you write: "file names should be different, so where is the matter then?". For me that question has no sense, but maybe I don't understand this.
Ok, I'll give you example:
1. Create any JPEG file.
2. Rename that file into "zzz.fik" (what is fik? fik is nothing, fik is extension that I just invented :)
3. Upload that file into fileserver
4. Here is direct link to that file: http://www.loc.thrash.pl/zzz.fik (link really works, check that)
As you see, your browser doesn't care that JPEG has no JPEG or JPG extension, isn't? :) Of course if you save that FIK file into your HDD then you probably will have problems with open that file by double click or image viewer will show you an error, but this is Windows problem, not image itself.
Now, if you know that, let's move forward. Imagine that you upload files on your own fileserver before game allow put bik animations on billboard or MT. So all your files are like that:
left.jpg, right.jpg, up.png, down.png
Now you created 100 maps with that static signs and TM programmers at last made bik support. So - best way to replace boring static signs on every of your maps into animated ones is create 4 nice bik animations and replace files on server. But files has extensions like ".jpg" or ".png" so...? Exactly! So what? Rename bik extension to jpg and this still will be bik, but in wrong extension, which is not important, because every file has unique header.
And that way you can change signs on your every map using just one rename (one per file).
Possibilities are greater - for example, some fileserver doesn't allow to upload ogg or mux files. So - just rename supersong.ogg into supersong.abc and that's all - it's still ogg, but will be recognized by header, not by extension.
I hope now is clear.
PS. Of course I don't write about free fileservers or other free crap where you cannot control or replace your resources.
Re: Suggestion - formats independent of the extensions
Thanks for the detailed explanations
Although this is really nothing new to me it will help all the others to understand your idea.
You should never underestimate others, despite the possibly dumb questions they're asking.
Perhaps they're testing you
So you still keep the original files on your own PC, it is only a server-side thing.
But you forgot one thing: your "lazyness" in replacing the files on the server causes lot of performance issue to both the servers and the clients.
The files have to be analysed before they can be passed to the appropriate readers,
which is not necessary if you directly chose the right file extension.
I don't say your idea is bad, I don't say it cannot be implemented, but it definitely needs more intelligent file readers.
At least the idea with the somehow universal linking sounds good

Although this is really nothing new to me it will help all the others to understand your idea.
You should never underestimate others, despite the possibly dumb questions they're asking.
Perhaps they're testing you

So you still keep the original files on your own PC, it is only a server-side thing.
But you forgot one thing: your "lazyness" in replacing the files on the server causes lot of performance issue to both the servers and the clients.
The files have to be analysed before they can be passed to the appropriate readers,
which is not necessary if you directly chose the right file extension.
I don't say your idea is bad, I don't say it cannot be implemented, but it definitely needs more intelligent file readers.
At least the idea with the somehow universal linking sounds good

-
- Posts: 536
- Joined: 05 Aug 2011, 18:12
- Contact:
Re: Suggestion - formats independent of the extensions
How I can choose right extension if I want to replace static signs on extisting maps into animated ones? Back in time and change extension? :)TMarc wrote:But you forgot one thing: your "lazyness" in replacing the files on the server causes lot of performance issue to both the servers and the clients.
The files have to be analysed before they can be passed to the appropriate readers,
which is not necessary if you directly chose the right file extension.
And forgive me, but every programmer know how to read few first bytes of file (all files must be download anyway - that's how locator works) and first bytes determines filetype. Old computers that have processors like 7MHz (or worse) can do that without any "performance issues" so, as I expect, modern computers can do the same way.
More - can be preselection of possible filetypes. For example - you know that on billboards can be placed only images and animations, so you can recognize only 4 filetypes - png, jpg, bik and dds. And check yourself - rename PNG file into JPG and test it in TM (even TM United) - try to place that file into billboard and it works! So? Some kind of filetype recognition is already made, right?
Re: Suggestion - formats independent of the extensions
You still forget that on a nice map there are many nice signs, hence many links must be downloaded, many files must be analysed, etc.
The more custom HD textures and signs are there, the more this causes traffic to the servers, and in consequence and lag spikes.
And you are never alone on servers.
Of course all the data could be downloaded before the race starts on a map,
but then the system should prevent connection to a server during any race or any match.
The more custom HD textures and signs are there, the more this causes traffic to the servers, and in consequence and lag spikes.
And you are never alone on servers.
Of course all the data could be downloaded before the race starts on a map,
but then the system should prevent connection to a server during any race or any match.
-
- Posts: 536
- Joined: 05 Aug 2011, 18:12
- Contact:
Re: Suggestion - formats independent of the extensions
Believe me, analysing first few bytes of file takes the same time like analysing few characters of filename. And number of players has nothing to do with that. If you have 20 images and 10 animations, then main problem is display them, not recognize them. And this problem TM programmers resolves.
And all the data IS downloaded before display (there is no partial display of images) so I don't really see what are you talking about. Try to figure out how it really works. Thank you.
And all the data IS downloaded before display (there is no partial display of images) so I don't really see what are you talking about. Try to figure out how it really works. Thank you.
Re: Suggestion - formats independent of the extensions
I know how it works, thank you.
Yo'ure totally misunderstanding me.
I'm not at all speaking of reading a few header bytes, this of course is insignificant.
I'm thinkning of the connections and the downloads themselves, but this goes to a different direction indeed.
On servers players connect and disconnect all the time, and this also while others are already playing.
The only solution to this issue would be to place any custom content on other servers than especially the game hosting server.

Yo'ure totally misunderstanding me.
I'm not at all speaking of reading a few header bytes, this of course is insignificant.
I'm thinkning of the connections and the downloads themselves, but this goes to a different direction indeed.
On servers players connect and disconnect all the time, and this also while others are already playing.
The only solution to this issue would be to place any custom content on other servers than especially the game hosting server.
-
- Posts: 536
- Joined: 05 Aug 2011, 18:12
- Contact:
Re: Suggestion - formats independent of the extensions
Sorry, I can't understand your point of view (for real).
1. Map is loaded...
2. then all resources from map must be loaded too (locators)
3. AFTER locator is loaded, game check few first bytes (this is NOT separate download! you can check header AFTER download whole file that must be downloaded anyway!)
4. If header of loaded file is bik header - file is display as bik, if it's JPEG - file is display as JPEG.
And OF COURSE i'm talking about FILESERVER not GAMESERVER! So, this is separate server (man, I'm talking about locators).
All the time you wrote that you know everything or testing me, but I'm start to think that you just be afraid to write that you don't understand something. It's not a shame, many people ask many questions and they're not lamers.
1. Map is loaded...
2. then all resources from map must be loaded too (locators)
3. AFTER locator is loaded, game check few first bytes (this is NOT separate download! you can check header AFTER download whole file that must be downloaded anyway!)
4. If header of loaded file is bik header - file is display as bik, if it's JPEG - file is display as JPEG.
And OF COURSE i'm talking about FILESERVER not GAMESERVER! So, this is separate server (man, I'm talking about locators).
All the time you wrote that you know everything or testing me, but I'm start to think that you just be afraid to write that you don't understand something. It's not a shame, many people ask many questions and they're not lamers.
Re: Suggestion - formats independent of the extensions
I'm by no means testing you, I only ask for clarity and try to avoid misunderstandings
not only for me, also for the other readers of this topic

not only for me, also for the other readers of this topic

Who is online
Users browsing this forum: No registered users and 1 guest