Runtime Images with Torque X?
by Tim Finch · in Torque X 2D · 03/06/2007 (8:30 am) · 8 replies
Hi,
I am looking into using XNA and Torque X for a project. I am new to both, so apologies for my ignorance.
What I will need to be able to do is display an image on my game that has not been loaded into the content pipeline - the player will have the option of using an image of their own choice.
The image will have no function in the game other than to be displayed in the corner (like a screen logo). XNA has a method:
Texture2D.FromFile
which would allow me to do this - since it looks for an image on the file system, rather than one pre-loaded into the pipeline.
My problem is I do not know if I can use this method in conjunction with Torque X? I am guessing that it is possible, but am reluctant to buy Torque without making sure first.
Any advice would be much appreciated.
Many thanks,
Qweeg
I am looking into using XNA and Torque X for a project. I am new to both, so apologies for my ignorance.
What I will need to be able to do is display an image on my game that has not been loaded into the content pipeline - the player will have the option of using an image of their own choice.
The image will have no function in the game other than to be displayed in the corner (like a screen logo). XNA has a method:
Texture2D.FromFile
which would allow me to do this - since it looks for an image on the file system, rather than one pre-loaded into the pipeline.
My problem is I do not know if I can use this method in conjunction with Torque X? I am guessing that it is possible, but am reluctant to buy Torque without making sure first.
Any advice would be much appreciated.
Many thanks,
Qweeg
About the author
#2
03/06/2007 (3:09 pm)
Nothing for nothing but if you look at the team blog for xna, they make mention that torquex and the editors will be free to subscribers of the creators club.Quote:GarageGames Torque X Engine. Members of the XNA Creators Club will receive a license to the Torque X Engine, including the Torque Game Builder toolset for Torque X, as a free membership benefit.blogs.msdn.com/xna/
#3
03/06/2007 (8:52 pm)
Well if you go to the TorqueX download page then you would see that you can download TorqueX without the need of a single cent.
#4
03/08/2007 (5:05 am)
Thanks guys. Have downloaded and installed it now - and it all looks pretty exciting. Also managed to use an image that had not been previously loaded into torque x, using the "Texture2D.FromFile" method :)
#5
03/14/2007 (8:31 am)
I would make sure you load the texture onto a T2Dsceneobject so it plays well with TX and utalizes the full ability of TX.
#6
Thanks for the tip.
03/14/2007 (8:54 am)
Thanks Jonathon, having played about with it a bit I coming round to that way of thinking seems like things will work a lot smoother using the T2DSceneObjects.Thanks for the tip.
#7
05/09/2007 (12:22 am)
I'm having trouble loading a Texture2D.FromFile and converting it into a Material to be used with TorqueX, can anyone help with this?
#8
I never found a way to do this. This thread also talks about the same kind of thing:
www.garagegames.com/mg/forums/result.thread.php?qt=59013
I also raised this on the XNA forum - forums.xna.com/4/717/ShowThread.aspx#717 (the post by crimsonshortone)
I think because Texture2D.FromFile is only supported for PCs and not for XBox it has kinda been overlooked. The thing is I can think of numerous reason why you would want to load images from a file at runtime (even on an xbox). For example the Eye Toy on the Playstations uses photos taken by the eye toy for player profiles - if you wanted to make a game like this you may need it.
For myself I need to be able to allow people to customise the game with their own images for my project - so I need to be able to load images from a file rather than the content pipeline.
If you do find out how to do this please please let me know - without this functionality I can't see me using Torque, which is a shame.
05/09/2007 (2:13 am)
Hiya,I never found a way to do this. This thread also talks about the same kind of thing:
www.garagegames.com/mg/forums/result.thread.php?qt=59013
I also raised this on the XNA forum - forums.xna.com/4/717/ShowThread.aspx#717 (the post by crimsonshortone)
I think because Texture2D.FromFile is only supported for PCs and not for XBox it has kinda been overlooked. The thing is I can think of numerous reason why you would want to load images from a file at runtime (even on an xbox). For example the Eye Toy on the Playstations uses photos taken by the eye toy for player profiles - if you wanted to make a game like this you may need it.
For myself I need to be able to allow people to customise the game with their own images for my project - so I need to be able to load images from a file rather than the content pipeline.
If you do find out how to do this please please let me know - without this functionality I can't see me using Torque, which is a shame.
Torque Owner Luke Larson
Secondly, anything that you can do in XNA is plausible, it's only code after all. TorqueX is merely a set of libraries that will greatly aid in the making of a game.
So the short answer is yes TorqueX can do anything and everything that XNA does and I would highly advise using it because it can only get better:)