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....
 
2009-07-02 13:32
Devia

Registered: Oct 2004
Posts: 401
Quote: Using this, there remains the problem that the koala pics also have to be scaled down to fit into sprites..

You can stuff more sprites into one pic and use GFX Trans' Sprite Grabber function to save out individual sprite images.
2009-07-02 15:57
SIDWAVE
Account closed

Registered: Apr 2002
Posts: 2238
its ok.. i converted the bmp files to correct size/color with thumbs plus, and imported them to timanthes.

still not finished..
2009-07-02 17:37
Wile Coyote
Account closed

Registered: Mar 2004
Posts: 646
You could always convert your Koala images to Vidcom 64 images. Then load each image into Vidcom 64 and use the Vidcom 64 option of selecting any area of screen to convert to sprite(s).

Vidcom 64
Vidcom 64
2009-07-02 18:49
SIDWAVE
Account closed

Registered: Apr 2002
Posts: 2238
Uh :) i havent used Vidcom since 1988 haha
Anyhow, thanks to all for your help!

Seems Timanthes is the tool for this job, because it can load images that are 2x2 sprites, and convert them..
2009-07-02 20:36
Slammer

Registered: Feb 2004
Posts: 416
If you are using Kick Assembler it's rather easy to code a converter directly in the assembler source. Here is a little macro that converts a gif to a sprite. you can easily extend it to do 2x2 sprites or whatever format you like. I don't think it gets any simpler than this..


.pc = $3000 "Sprite Data"
spriteData:

	:LoadSpriteFromPicture("sprite1.gif")
	:LoadSpriteFromPicture("sprite2.gif")
	:LoadSpriteFromPicture("sprite3.gif")
// etc



.macro LoadSpriteFromPicture(filename) {
	.var picture = LoadPicture(filename, List().add($000000, $ffffff,$6c6c6c,$959595))
	.for (var y=0; y<21; y++)
		.for (var x=0; x<3; x++)
			.byte picture.getMulticolorByte(x,y) 
	.byte 0
}


2009-07-03 03:51
LOGAN
Account closed

Registered: Aug 2003
Posts: 71
Was also about to suggest kickass as kickassembler you can script so you are able to convert images to sprites, bitmaps, charsets and thats soooo cool :)
2009-07-03 08:59
WVL

Registered: Mar 2002
Posts: 902
Quote: If you are using Kick Assembler it's rather easy to code a converter directly in the assembler source. Here is a little macro that converts a gif to a sprite. you can easily extend it to do 2x2 sprites or whatever format you like. I don't think it gets any simpler than this..


.pc = $3000 "Sprite Data"
spriteData:

	:LoadSpriteFromPicture("sprite1.gif")
	:LoadSpriteFromPicture("sprite2.gif")
	:LoadSpriteFromPicture("sprite3.gif")
// etc



.macro LoadSpriteFromPicture(filename) {
	.var picture = LoadPicture(filename, List().add($000000, $ffffff,$6c6c6c,$959595))
	.for (var y=0; y<21; y++)
		.for (var x=0; x<3; x++)
			.byte picture.getMulticolorByte(x,y) 
	.byte 0
}




wat.

I never realized Kickass was *that* powerful.. /me drools
2009-07-03 11:43
Mace

Registered: May 2002
Posts: 1799
Holy crap.
What WVL says!
2009-07-03 13:09
Oswald

Registered: Apr 2002
Posts: 5094
Quote: Holy crap.
What WVL says!


what mace said
2013-01-21 20:11
Magnar

Registered: Aug 2009
Posts: 61
Quote: Was also about to suggest kickass as kickassembler you can script so you are able to convert images to sprites, bitmaps, charsets and thats soooo cool :)

I dont get it, how can you extend this code to work for say 2x3 spritebank setup per GIF picture?

I got a list of 13x GIF pictures in format 24x63 pixels each which fits the 2x3 sprite setup, but I have no clue how to modify that code in order to export the GIFs into that kind of template.

Anyone care to modify the code so it would work for my needs, and possible also better explain how to do that trick for more users here on csdb?
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
Mike
MWR/Visdom
ΛΛdZ
encore
WVL/Xenon
Guests online: 100
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 Logo Graphicians
1 t0m3000  (10)
2 Sander  (9.8)
3 Mermaid  (9.5)
4 Facet  (9.4)
5 Shine  (9.4)

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