Jump to content
IGNORED

Lynx Sprite Packing Tool


Cupcakus

Recommended Posts

Hey All,

 

I picked up a Lynx at California Extreme, and because I'm completely nuts, I can't truly enjoy a new game console, until I've written code for it, and I understand how it works.

 

Long story short, I was having trouble getting my head wrapped around how the sprite data has to be set up for packed sprites, so I wrote a tool to convert 16 color bitmaps into Lynx packed sprite data. Tools like this may already exist, but in any case, I thought I'd share the tool and it's source in case anyone else wants a head start, or wants to make the tool more useful. It could be better, IE: by changing the draw direction in the data it may be possible to get better compression, but I'm not figuring out the algorithm to do that :-). Depending on how many repeating pixels you have in your sprite, you can get a lot of space savings by packing your sprites up with this tool.

 

I used VC++ 2008, but it's all std c, so you should be able to compile it for Linux or Mac by removing the precompiled header nonsense.

lynxspr_exe.zip

lynxspr_src.zip

Edited by Cupcakus
Link to comment
Share on other sites

Hey All,

 

I picked up a Lynx at California Extreme, and because I'm completely nuts, I can't truly enjoy a new game console, until I've written code for it, and I understand how it works.

 

Long story short, I was having trouble getting my head wrapped around how the sprite data has to be set up for packed sprites, so I wrote a tool to convert 16 color bitmaps into Lynx packed sprite data. Tools like this may already exist, but in any case, I thought I'd share the tool and it's source in case anyone else wants a head start, or wants to make the tool more useful. It could be better, IE: by changing the draw direction in the data it may be possible to get better compression, but I'm not figuring out the algorithm to do that :-). Depending on how many repeating pixels you have in your sprite, you can get a lot of space savings by packing your sprites up with this tool.

 

I used VC++ 2008, but it's all std c, so you should be able to compile it for Linux or Mac by removing the precompiled header nonsense.

 

there already exists sprpck in the bll package

i attached it

sprpck.zip

Link to comment
Share on other sites

Yah I figured this tool already existed, I was curious to see if both tools produced the same size packed sprite or if there was a difference. However the sprpck you attached only has a cygwin.dll in it :-)

 

I would only give to all lynx developers the sprpck in this way

 

Everyone can use what he/she wants.

 

And thanks to post also the source - very interesting

Link to comment
Share on other sites

  • 4 weeks later...

Nice alternative to sprpck as this is sometimes a bit unstable and the code not really readable.

 

Can you please add a Makefile for the linux people with the following content:

 


all: lynxspr

lynxspr: lynxspr.cpp targetver.h stdafx.h  stdafx.cpp 

 

and wrap the #include "tchar.h" into a #if __WINDOWS(or how this is defined) / #endif as this is not needed&existing on linux.

 

Thanks.

Link to comment
Share on other sites

Yah I figured this tool already existed, I was curious to see if both tools produced the same size packed sprite or if there was a difference. However the sprpck you attached only has a cygwin.dll in it :-)

 

So, how big is the difference?

Did you make some extensive tests?

Which one has the better packing rate in your case?

Link to comment
Share on other sites

  • 2 weeks later...

I'm not sure if this was the latest and greatest version of sprpck (1.98), but 8 months ago I cleaned it up so that it would build and run on Linux: http://bitbucket.org/wookie/sprpck

 

Well 1.98 was the latest version (which also compiled with linux without problems afaik). At least i am using it all the time. you can find it in karri's repo in the folder newcc65.

Link to comment
Share on other sites

  • 1 month later...

Yah I figured this tool already existed, I was curious to see if both tools produced the same size packed sprite or if there was a difference. However the sprpck you attached only has a cygwin.dll in it :-)

 

So, how big is the difference?

Did you make some extensive tests?

Which one has the better packing rate in your case?

 

The results were exactly the same, which is encouraging I guess.

Link to comment
Share on other sites

Yah I figured this tool already existed, I was curious to see if both tools produced the same size packed sprite or if there was a difference. However the sprpck you attached only has a cygwin.dll in it :-)

 

So, how big is the difference?

Did you make some extensive tests?

Which one has the better packing rate in your case?

 

The results were exactly the same, which is encouraging I guess.

 

Interessting, in my case the "old" sprpck had a better performance. means better pack rate.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...