Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
You are not logged in - nap
CSDb User Forums


Forums > C64 Coding > Converting to sprites
2009-07-02 04:33
SIDWAVE
Account closed

Registered: Apr 2002
Posts: 2238
Converting to sprites

Ok, so i have run into a problem.. hehe

I have 52 bmp pics, which are each the size of 2x2 C64 sprites.

So there's room for them all in 1 VIC bank..
Now problem is to convert them..

I tried Gang-Ed, but it only imports bmp as hires/mcol bitmap/char, and blows up the small image to fullscreen!

So i saved all the frames as a koala pr pic.. hahaha

Now i am stuck with 52 koala pics, that need to be transformed into 4 sprites each, bwahaha..

This is really silly..

What i really need is:

1) convert the 48x48 pixel bmp to 4 colors
2) convert this to 4 sprites

Is there an editor, where i can load bmp/gif into a sprite editor ? they have correct size, just need to be fixed to 4 cols.. which i can do with a batchconvert in thumbs plus (reduce nr of colors)

??

Thanks for any help!
 
... 56 posts hidden. Click here to view all posts....
 
2013-01-23 12:29
Radiant

Registered: Sep 2004
Posts: 639
I'm with Groepaz. Personally I code my converters and generators in Python and incorporate them into my build system - also helps keeping the business logic in the assembler separate from any compile time dependencies; and thus also prevents any expensive conversion/generation tasks from running except when really needed.
2013-01-23 12:39
chatGPZ

Registered: Dec 2001
Posts: 11386
i have actually moved quite some converter shit from being done inline using kickass to using external tools during the process of making artphosis - because with external tools it is *much* faster. using the scripting for importing simple generic binaries (that have no tricky special format) is simply using the wrong tool for the job, imho.

that said, kickass is seriously lacking INCBIN =P
2013-01-23 13:08
Cruzer

Registered: Dec 2001
Posts: 1048
"ever heard of makefiles? /o\"
Yes, but not really used. I have called external tools from shell scripts/batch files if that counts.
2013-01-23 13:15
chatGPZ

Registered: Dec 2001
Posts: 11386
sorry, no - it is a common misconception that .bat (or shell scripts) files are even remotely similar to what makefiles can do (proper dependancies, only build what needs to be build because of changes) :) i seriously recommend anyone to look at it, because it WILL make your codinglife easier :)
2013-01-23 16:06
ChristopherJam

Registered: Aug 2004
Posts: 1409
Hey @radiantx - nice to see a fellow Python user. And yes, it's sooo much more appropriate for coding image converters etc than trying to hack around with an assembler macro system, especially with the help of Numpy & PIL.

I agree with the people promoting proper use of Makefiles above, too. Some of the datafiles can take way too long to regenerate every time, but you also don't want to forget a step.
2013-01-23 16:37
Burglar

Registered: Dec 2004
Posts: 1101
I was thinking about writing a Makefile howto for codebase... Seems its needed for some people ;)

@radiantx, the language in which you write your tools is not that important. if a python script does the trick for you, great!
Personally I use perl for some things and kickass for others.

I just prefer to use kickass for gfx conversion, as it already has getSinglecolorByte and getMulticolorByte.
2013-01-23 18:28
MagerValp

Registered: Dec 2001
Posts: 1078
ChristopherJam: there's a pure python png reader class out there so you don't have any external dependencies. I've then added a class to handle layers of tiled graphics with color restrictions, that spits out bitmap data. Works like a charm.
2013-01-23 18:48
Cruzer

Registered: Dec 2001
Posts: 1048
@Burglar: Yes please, maybe I can finally be 1337 then :)
2013-01-23 19:30
Slammer

Registered: Feb 2004
Posts: 416
An alternative to makefiles is ANT, which is kind of advanced makefiles. It is good for platform independent development and can do advanced stuff like zip and ftp. The drawback is the xml-syntax.

If you are new to, or unsure of, the concept of making the execution of a program dependant on the change in another file, then start with makefiles (Simpler and easier to learn). If you need to make bigger and more advanced or platform independent build tools, then ANT is the way to go.

Traditionally makefiles is a C/C++ tool, while ANT is a Java tool, so if you use one of these languages, you might want to chose the matching 'build-language' since your standard tools probably already supports it.
2013-01-23 20:00
Burglar

Registered: Dec 2004
Posts: 1101
I added the final version of the source to codebase64. Feel free to improve ;)

Previous - 1 | 2 | 3 | 4 | 5 | 6 | 7 - Next
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
csabanw
icon/The Silents, Sp..
Peacemaker/CENSOR/Hi..
MWR/Visdom
deetsay
Mike
MCM/ONSLAUGHT
Guests online: 93
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.6)
5 Edge of Disgrace  (9.6)
6 What Is The Matrix 2  (9.6)
7 The Demo Coder  (9.6)
8 Uncensored  (9.6)
9 Comaland 100%  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 No Listen  (9.6)
2 Layers  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.6)
6 Dawnfall V1.1  (9.5)
7 Rainbow Connection  (9.5)
8 Onscreen 5k  (9.5)
9 Morph  (9.5)
10 Libertongo  (9.5)
Top Groups
1 Performers  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Censor Design  (9.3)
5 Triad  (9.3)
Top Musicians
1 Rob Hubbard  (9.7)
2 Mutetus  (9.7)
3 Jeroen Tel  (9.7)
4 Linus  (9.6)
5 Stinsen  (9.6)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.064 sec.