Image Manipulator help needed

For questions about using Classic.

Post » Mon Mar 21, 2011 10:57 pm

I've never had to use the image manipulator a lot before, certainly not for this purpose, so before I go spending an hour or two with trial and error, I thought I'd see if anyone has any thoughts/solutions first.

On this unexpected side-project I decided to work on this week, I want to be able to allow the game to be modded by simply replacing the bitmaps used.
I've seen plenty of discussions here on sprite-sheets, but I can't remember if anyone found a way of doing it.

What I want is to be able to read a 256x512 bitmap from disk and take the 32x32 tiles from this and place them into the angles of the sprite.

I'm probably going to have a crack at this later, before I go to bed, but any thoughts welcome.

Cheers,
Krush.
B
2
S
2
G
3
Posts: 406
Reputation: 2,062

Post » Mon Mar 21, 2011 11:26 pm

Load the tileset graphic into the image manipulator and run a loop that's using the crop action to cut it into 32x32 tiles. Either just apply math for the loop or use an array (256/32 x 512/32 x 1 size), then you could apply the correct crop coordinates from that easily. And respectively copy it back to the desired frame/angle of the sprite of course.
B
21
S
6
G
10
Posts: 1,024
Reputation: 7,445

Post » Tue Mar 22, 2011 1:33 am

There was something in the back of my mind that said that this wasn't as straight forward as it seems, which is why I made this thread, but it went very smoothly.

I found several old threads discussing this before I saw your reply, and even found one that I started (similar question for a totally different reason), and there was a lot of talk of how buggy the image manipulator is.

It seems that some of it has been sorted, as you no longer need to flip the cropped area.
I did have to have a separate sprite to hold the full image, as crop did indeed crop the image loaded, so instead of loading the main image again for each loop iteration, I just copied it over from the holding sprite.

Many thanks for the nudge in the right direction.
Both the level editor and the game now have fully moddable graphics. :)

Krush.
B
2
S
2
G
3
Posts: 406
Reputation: 2,062


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 4 guests