Power of 2 and units in TGB
by Abhinav Chokhavatia · in Torque Game Builder · 08/11/2008 (8:07 am) · 2 replies
Hi,
We have recently started working on the assets for our game. We are creating all assets in the power of 2 i.e. 64 X 64 or 256 X 128 , 512 X 512,256 X 256 etc.
I have come across numerous posts in the various forums stating that it is OK to have the art and the animation in custom size ( not in the power of 2) Say 172 X 144.
I was wondering will having the art and animation assets in custom size save space in the long run.
Also does anyone have an idea regarding the units in TGB. Apparently 256 X 256 in Photoshop is not exactly 256 X 256 in TGB. Has anyone come across a solution or a technique for this.
Any help would be greatly appreciated.
Warm Regards,
Abhinav
We have recently started working on the assets for our game. We are creating all assets in the power of 2 i.e. 64 X 64 or 256 X 128 , 512 X 512,256 X 256 etc.
I have come across numerous posts in the various forums stating that it is OK to have the art and the animation in custom size ( not in the power of 2) Say 172 X 144.
I was wondering will having the art and animation assets in custom size save space in the long run.
Also does anyone have an idea regarding the units in TGB. Apparently 256 X 256 in Photoshop is not exactly 256 X 256 in TGB. Has anyone come across a solution or a technique for this.
Any help would be greatly appreciated.
Warm Regards,
Abhinav
About the author
#2
The difference is that when images are pasted together it wants the sprite sheets to be powers of two, if your images are already powers of two it might not line up if TGB adds a pixel separation between images. That means your 256x256 images side-by-side will be 256x513.
In the end, though, is it worth spending hours getting your images pixel-accurate or should your time be spent on other value-added tasks?
08/14/2008 (5:59 pm)
TGB will automatically package images together into sprite sheets that are powers of 2 in size. So, you don't have to do all of the legwork.The difference is that when images are pasted together it wants the sprite sheets to be powers of two, if your images are already powers of two it might not line up if TGB adds a pixel separation between images. That means your 256x256 images side-by-side will be 256x513.
In the end, though, is it worth spending hours getting your images pixel-accurate or should your time be spent on other value-added tasks?
Torque Owner Markus Goering