Game Development Community

T2D Image DataBlock Tool *Version 1.2 Updated 7-25-05

by Chris Newman · in Torque Game Builder · 03/20/2005 (8:17 pm) · 40 replies

Update: New version 1.2 uploaded 7-25-04
www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=7484

After using Torque 2D for a bit, I thought that it was getting repetitive typing all those datablocks for images. So I started work on a small tool to take care of this task for me. The datablock name is the same name as the image but with "ImageMap" after it.

version 1.2
I updated the image preview function, it now uses a T2D Sprite. I used to use a guiBitmapControl. This allows you to see the image size in the menu bar and it now scales the images right. No more stretching an image to 200 x 200.

version 1.1
You can now start a new project and save the images.
If you add any new images to your image dir , you can now load all the new pics, since your last save, with a click of a button. Just click "Find New Images"
*Note : This feature only works with scriptfiles created with version 1.0 and above.

I just added in support for jpg and bmp images
and fixed 2 lil bugs, one with loading your script file and the other when you clicked on "load all new images



chazcross.phase9studios.com/files/torque/t2d/imagedatablockeditor/Image1.jpg

chazcross.phase9studios.com/files/torque/t2d/imagedatablockeditor/imagedatablocktoolload.jpg

To use it:
Open the dir that you have all your images in.
Select an image, the edit its properties on the right.
Click "save image info"
repeat for each image (except for the full type because it is the default)
Press "save to script" button
choose where you want to save the script file
add the script file to your game using the exec() function
enjoy your time from not typing all these datablocks out. :)




www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=7484

Just unzip this to your main T2D dir.

Let me know of any bugs and feature requests.
Im open to suggestions on how to improve this tool further.
All the script code is included.
Ill be working on a better looking GUI in the near future.
Page«First 1 2 Next»
#21
03/24/2005 (8:33 pm)
Ok i just switched it over to use script objects.
Its a bit cleaner that way, i like it.
Did 2 test runs, looks like its fine.

@Melv
Can you point me in the right direction?
#22
03/26/2005 (5:16 am)
Quote:Dudes! Don't let the fact that we are creating a "container" for TDN stop you from making CONTENT with which to fill it up. Please continue:)

I'm glad that there going to move the tech stuff off site. It's getting a little cluttered around here!
#23
03/28/2005 (8:33 pm)
New Version 1.0 Out.
#24
03/28/2005 (8:43 pm)
Very nice. I'll definitely be using this in the future. Thanks a bunch Chris.
#25
03/28/2005 (9:13 pm)
Looks cool! I'll use it.

@Chris: You misspelled "Existing" in the welcome dialog. ;)
#26
03/29/2005 (1:37 am)
Woot!! Thanks Chris! :D
#27
03/29/2005 (3:15 am)
@Jason
lol, ill fix that

@Josh
Thanks :)

*edit
Minor spelling mistake fixed
#28
03/29/2005 (8:33 am)
Its looking good ! great tool :)
#29
03/29/2005 (6:30 pm)
Thanks King Bob.
Know of any ideas on how i could improve the gui?
Im still lacking in the visuals area.
#30
03/30/2005 (7:33 pm)
Once again, new version out. I think its resource ready now.
#31
03/30/2005 (7:36 pm)
Feature request:
Telling the size of the original pic would be pretty usefull. ;P

Great job BTW.
#32
03/30/2005 (7:52 pm)
K, ill work on that

Thanks.

BTW i think i may have uploaded the wrong version, please re-download.
I changed the name back to ImageDatablockTool not 1_1

Make sure on the welcome screen it says 1.1
#33
05/09/2005 (4:59 pm)
I have another request:

If you have the time, could you make a tutorial on how you made this and explain exactly what each line of code does?

It seems like a huge request and I completely understand if you don't have the time or just don't want to. But it would greatly help me on my current project (and possibly others).
#34
05/09/2005 (5:30 pm)
Right now time is very slim.
But yes ill do that when im finished with the TGE project im working on.
Ill have the docs for this, the update i have planned and sometime soon after the Animation Editor.

If you have any question about what i did in the scripts, email me and i can get to that very quickly.
#35
05/09/2005 (5:38 pm)
I might take you up on that offer sometime, although right now most of my questions would contain the phrase, "What does this line of code do?"

If there's something I just can't figure out, I'll drop you a line.

I would also just like to thank you for providing the code to the imagedatablocktool. Just having that will greatly help me.
#36
06/27/2005 (5:01 pm)
My game's folder doesnt show up in the directory list.
#37
07/07/2005 (6:21 pm)
@Joe
Sorry, ive been away for a while.
To resolve this issue, be sure to set up your game to run as the default mod so that when you run T2D.exe your game runs. Main.cs is the file you need to edit.
#38
07/24/2005 (9:16 pm)
Updated to version 1.2

Work is now starting on the Animation Datablock Editor.
#39
07/25/2005 (6:25 pm)
Any one get the update?
Any bugs?
#40
07/25/2005 (8:03 pm)
I have this thread bookmarked because i plan on taking a look at it, but i havent yet. (I am still busy writing my C# implementation of T2D)

When I get done with this, i do plan on giving it a try though.. dont give up :)
Page«First 1 2 Next»