Game Development Community

Image Builder could be smarter

by Vern Jensen · in Torque Game Builder · 06/20/2006 (7:27 pm) · 2 replies

I've discovered that the Image Builder isn't terribly "smart" when I'm trying to load images laid out differently than the tutorials have theirs. I have an image that's 210 pixels wide by 150 pixels tall. It has 3 frames laid out horizontally, so each is 70 pixels wide and 150 pixels tall.

I select my image and change Image Mode to "CELL". By default, the cells are split up into a 2x2 grid. I don't want that. I want 3x1, so I put 3 in the "Cell Count X" field. Apparently Torque doesn't like this! It changes my "3" to a "2" when I click in another field.

So that's problem #1. Torque should be smart enough to know that when I change the Cell Count X (and it SHOULD let me change this to 3!), that it should automatically update the Cell Width field accordingly. (i.e. set cell width equal to the total width divided by the new Cell Count X.)

Fortunately, I can do this manually. By entering 70 into Cell Width, Torque will then allow me to enter "3" into the Cell Count X. Kinda klunky, but it works.

Now I enter "1" into Cell Count Y to replace the "-1" that was there previously. Now my image is wrong, because Cell Height is still showing 75, instead of 150. When I enter "1" into Cell Count Y, my Cell Height should update automatically to be 150 -- the entire size of the image divided by 1.

-Vern

#1
06/20/2006 (10:06 pm)
Fyi, the torquescript source for the tools comes with TGB. You can make any changes you like to better suit your workflow.

Check out the fie games\tools\imageEditor\scripts\editorSettings.ed.cs

I think the changes you would want to make are in the function ImageEditor::reCreateImage(%this)
#2
06/27/2006 (12:35 pm)
I ran into the same issue, and although I still think it should be fixed, this tip might save you some time:

Leave the number of cells values at -1, and only change the pixel values. The editor will automatically determine the number of cells to use in each direction.