English Amiga Board


Go Back   English Amiga Board > Coders > Coders. General

 
 
Thread Tools
Old 14 June 2016, 10:16   #21
majikeyric
Registered User

majikeyric's Avatar
 
Join Date: Oct 2015
Location: France
Posts: 61
Thanks Stephane

I would want to give it a try but your link requires an account creation.
majikeyric is offline  
AdSense AdSense  
Old 14 June 2016, 17:23   #22
nogginthenog
Amigan

 
Join Date: Feb 2012
Location: London
Posts: 492
Try this link, I think it is the same download:

https://www.dropbox.com/sh/smgwbi8g6...NXo703vQa?dl=0
nogginthenog is offline  
Old 16 June 2016, 11:00   #23
majikeyric
Registered User

majikeyric's Avatar
 
Join Date: Oct 2015
Location: France
Posts: 61
Thanks for the link nogginthenog
majikeyric is offline  
Old 16 June 2016, 21:54   #24
Mrs Beanbag
Glastonbridge Software
Mrs Beanbag's Avatar
 
Join Date: Jan 2012
Location: Edinburgh/Scotland
Posts: 2,202
i like data compression, it is fun to design this sort of thing... what is best depends on the sort of image of course. if there is a lot of block colour (like Prince of Persia sprites) it might help to store the image as an outline and then use the Blitter to fill it. Or possibly "rotating" the data in some way might help, for instance instead of storing the data left-to-right, top-to-bottom store it bytewise (or wordwise) top-to-bottom, left-to-right, and then compress that using some custom LZ variant. Maybe a wordwise rather than bytewise variant of LZ. You will have to experiment, do some tests.
Mrs Beanbag is offline  
Old 17 June 2016, 23:36   #25
ReadOnlyCat
Code Kitten

 
Join Date: Aug 2015
Location: Montreal/Canadia
Age: 46
Posts: 1,012
One might also want to try differential compression between successive frames of an animation. In Prince of Persia for example, each frame is quite similar to one another since the animation is quite smooth so encoding the difference might be a rudimentary but efficient form of compression.
ReadOnlyCat is offline  
Old 20 June 2016, 13:52   #26
zero
Registered User

 
Join Date: Jun 2016
Location: UK
Posts: 138
Is there any sprite flipping going on? For example you quite often need the player sprite to turn around, in which case writing a flipping routine will reduce the amount of data.

Following on from what ReadOnlyCat said, you can sometimes break the sprite up into sections (like body + arms + legs).
zero is offline  
Old 20 June 2016, 21:40   #27
Mrs Beanbag
Glastonbridge Software
Mrs Beanbag's Avatar
 
Join Date: Jan 2012
Location: Edinburgh/Scotland
Posts: 2,202
indeed, looking at that other thread where someone posted some graphics from a fighting game, (was it Final Fight?) it appeared the sprites were made out of 16x16 tiles. With sprites that large there are presumably a lot of blank areas that don't need blitting, consider a character doing a kick for instance, where the leg would have a lot of blank space above and below.
Mrs Beanbag is offline  
Old 22 June 2016, 15:16   #28
Stef_
 
Posts: n/a
Quote:
Originally Posted by majikeyric View Post
Thanks Stephane

I would want to give it a try but your link requires an account creation.
Oh sorry i fixed the link but indeed the one nogginthenog gave was the good one
I hope you were able to test it, should be ready for use on amiga normally

Quote:
... and then compress that using some custom LZ variant. Maybe a wordwise rather than bytewise variant of LZ.
In fact that is exactly what LZ4W does (W stands for "word"), i also tweaked a bit the compression scheme to really obtain the best decompression speed (again there is a trade-off on the compression ration). Still i'm satisfied with the result, at least for Megadrive i mainly use it on GFX data which you want to unpack live (as sprite data) as the compression level was not that bad (at least better than another fast packer i was using before) =)
 
Old 22 June 2016, 20:36   #29
Mrs Beanbag
Glastonbridge Software
Mrs Beanbag's Avatar
 
Join Date: Jan 2012
Location: Edinburgh/Scotland
Posts: 2,202
Quote:
Originally Posted by Stef_ View Post
In fact that is exactly what LZ4W does (W stands for "word"), i also tweaked a bit the compression scheme to really obtain the best decompression speed (again there is a trade-off on the compression ration).
LZ is very good, decompression is fairly straightforward and the ratio can be quite impressive with the right sort of data (and you can roll Run Length Encoding into it as well, by allowing the string length to exceed the offset). Fast compression, on the other hand, is a little more involved...

Btw you have given me ideas now about making a Megadrive version of Mr Beanbag! Imagine that...

...must finish Amiga version first...
Mrs Beanbag is offline  
Old 14 July 2016, 22:41   #30
Stef_
 
Posts: n/a
Good luck with your Mr Beanbag project, would be nice to see it on Megadrive as well
 
Old 30 November 2016, 16:11   #31
chb
Registered User

 
Join Date: Dec 2014
Location: germany
Posts: 48
Quote:
Originally Posted by zero View Post
Is there any sprite flipping going on? For example you quite often need the player sprite to turn around, in which case writing a flipping routine will reduce the amount of data.
Some little idea I got in another thread, not tested but might be interesting:

Another idea to save ram could be using real-time compression on animation frames. If you're amazingly clever, you might be able to bake the mirroring into the decompression algorithm at little cost, e.g in LZ77 or LZ4, you'd need to only flip the literals, but the matches are copied from the decompressed stream that is already flipped. You'd need to store the bytes in vertical order, though (8 pixel columns going from top to bottom, then start next column at the top - when decompressing flipped, write the columns from right to left).

I might have overlooked a serious issue with this. But would be interesting to see if it works, depending on the data it could be even faster than a simple byte-per-byte mirror in extreme cases, when there's a high number of matches that have to be simply copied...
chb is offline  
AdSense AdSense  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Amiga Real-Time 3D Graphics Jherek Carnelia Coders. Tutorials 12 27 October 2017 04:26
WTB: Amiga Real-Time 3d graphics Fridrik MarketPlace 0 27 September 2012 02:53
A1200 Real Time Clock Eclipse support.Hardware 4 22 March 2011 03:18
WinUAE time compression/speed up Neil support.WinUAE 12 11 July 2009 20:37
Reading the Real Time Clock girv Coders. General 5 04 September 2007 19:30

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 16:21.


Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Page generated in 0.14912 seconds with 12 queries