Lossy Compression

Started by
7 comments, last by The Reindeer Effect 21 years, 10 months ago
What uses does it have. I allready figure that it would work relatively well on media files (jpeg), but are there any others? ------------------- The Reindeer Effect Insomniac Software
Advertisement
Sound files too (mp3 et all.).

You could compress a text-file of some dictionaries and the result would look like most of the spelling on the Internet .

Lossy compression is useful when you don''t place as much importance on something. For example, in pictures luminance is more important than colour, so colour can be compressed more heavily. If you can generalize that then the answer is "lossy compression is useful where you don''t notice the difference."

Specific examples? Well, I can''t think of any off the top of my head. How about replays for games like Tekken - I wouldn''t be watching because I always get my ass kicked so I wouldn''t notice if the replay wasn''t exact .
Lossy Compression has no other advantage over lossless compression than better compression ratios. Some data will be much smaller using lossy compression algorithms. That includes image data (pixel matrices) and sound files (waves). Of course, text data can''t be encoded using lossy compression unless you accept that your text will be different after decompressing.
regarding the issue with lossy replays in games, I must say that that can be very annoying.

The Replay function in GTA3 isn''t very exact, and it is very annoying, because you really want to see that cool move or that nice explosion again, but end up watching the car not exploding at all or something as incorrect.
quote:Original post by parklife
regarding the issue with lossy replays in games, I must say that that can be very annoying.

The Replay function in GTA3 isn''t very exact, and it is very annoying, because you really want to see that cool move or that nice explosion again, but end up watching the car not exploding at all or something as incorrect.

Wow! I was joking when I said that - I didn''t imagine for a second that any games wouldn''t have accurate replays. It makes a mockery of the whole concept. There''s an interesting article on Gamasutra about reproducible behaviour; I wonder if the GTA3 makes saw it and whether that was a conscious design decision.
Its not lossy, its just that the GTA3 engine isn''t ''perfect''. If given the same inputs, but at a different framerate it can produce different results. Thats why I don''t like most of the "framerate independent" stuff I see, as the rounding errors created make it difficult to impossible to reproduce (both for replays and for multiplayer games).
yeah, most of the "frame independent" methods ppl use happen to be the x+=dx*someFactor which is VERY framerate dependent. true framerate independent movement is done using a fixed time step loop, and during the render you interpolate between the last two ticks (ie last two position results from the game logic running). the is ensures exact reproducable results, though input handling might be tricky (you must decide to only check every game logic tick or every frame, though nomatter which you choose, the input will only affect the game when the game logic is run).

quake2 ran its logic at 10 frames per second, but the actual display ran at whatever the hardware supported. the inbetween frames were interpolated.
Well, technically GTA3 surely doesn''t use lossy compression when saving replays, but the routine is very bad and doesn''t record things as cars being repaired, garage doors opening, time of explosion, sound (!!!) or explosions. Everything else is recorded but feels a bit ''thin'' or ''degraded'' when played back.
GTA3''s replays were "hacked-in" for the PC version and it''s obvious they didn''t spent a whole lot of time on that feature.

There are other games that display incorrect replays. In the Playstation 2 game "Sky Odyssey", you can take off and fly a whole mission, and then when you watch the replay it sometimes shows you stalling after take-off and crashing into the ground!
Narcusmy homepage:http://www.pcis.net/amenzies

This topic is closed to new replies.

Advertisement