Importing a large png
by Scott Jaworski · in Torque Game Builder · 08/16/2006 (1:59 pm) · 5 replies
Not sure how to search for this, so I'll just put it in a new thread.
I'm importing a large png with all my tiles in one file; the image is 484 pixels across by 1980 pixels tall. The tiles need to be 120 across by 110 tall. When I do the import and choose the cell width and height, it lets me make the width the 120, but when i type in 110 in the cell height and press enter, it changes it to 123 and it's reflected in the preview on the right. Nothing I can do will let me change the height to 110. Any ideas? I can produce screenshots if need be.
BTW, BIG fan of the new build and release; it's been awhile since i've used the tools and I'm liking what i see of the new stuff so far! Glad you put out great starter documentation this time :)
I'm importing a large png with all my tiles in one file; the image is 484 pixels across by 1980 pixels tall. The tiles need to be 120 across by 110 tall. When I do the import and choose the cell width and height, it lets me make the width the 120, but when i type in 110 in the cell height and press enter, it changes it to 123 and it's reflected in the preview on the right. Nothing I can do will let me change the height to 110. Any ideas? I can produce screenshots if need be.
BTW, BIG fan of the new build and release; it's been awhile since i've used the tools and I'm liking what i see of the new stuff so far! Glad you put out great starter documentation this time :)
#3
Why oh why didn't I pick a match 3 game :)
-Andrew
08/16/2006 (6:27 pm)
Why is it I always end up on these threads? Why oh why didn't I pick a match 3 game :)
-Andrew
#4
Changing the cell count didn't do anything, as it just changed it back to whatever number of cells were 123 high. It didn't seem to mind the extra 4 pixels in the width (i was originally creating 120 wide images, with a 1 pixel seperator; realized i didn't need the border and just didn't change the tilemap size), but I'm still going to go back today and make an 8x8 or 8x9 map and see what that gets me. I still found it odd that it changed it to 123, which has no bearing or relevance... it was cutting graphics in strange places and does not divide evenly into 1980 - my height.
Thanks again for the quick feedback - that's why I love this place. I'll report back what i find today. The optimization article was a good read, btw.
08/17/2006 (4:17 am)
And give up on all of THIS fun?? Never! Changing the cell count didn't do anything, as it just changed it back to whatever number of cells were 123 high. It didn't seem to mind the extra 4 pixels in the width (i was originally creating 120 wide images, with a 1 pixel seperator; realized i didn't need the border and just didn't change the tilemap size), but I'm still going to go back today and make an 8x8 or 8x9 map and see what that gets me. I still found it odd that it changed it to 123, which has no bearing or relevance... it was cutting graphics in strange places and does not divide evenly into 1980 - my height.
Thanks again for the quick feedback - that's why I love this place. I'll report back what i find today. The optimization article was a good read, btw.
#5
08/17/2006 (9:22 am)
Doing the <1k x <1k image map seemed to have worked. Thanks for the head's up! I'm on a new computer, so I don't know why it didn't like the funky format, except that I'm developing on a laptop - the widescreen resolution might have something to do with it... anyways... onto the next challenge!
Torque Owner Andrew Douglas
1. try entering a cell count Y value instead of entering the pixels as it'll automatically calculate the pixels for you.
2. save what you've got and close out of the editor... then open the managed\datablocks.cs file in a text editor and try entering the values manually.
3. change the size of your images to be a bit more video card friendly. Some cards don't support textures that are 2048 in size. I'd say your best bet is reorganize your cells so that it's 8 cells wide by 9 cells high instead of 4 x 18. It'll fit into a 1k x 1k texture then which most but not all video cards support.
A lot of the image mistakes I made are here as well as a link to find out what video cards support what: tdn.garagegames.com/wiki/2D_Art_Tips:_Learn_From_My_Mistakes ... I hope it helps.
-Andrew