The sizing confuses me, please explain
by Caleb Child · in Torque X 2D · 04/12/2010 (2:42 pm) · 16 replies
The sizing for everything within the Torque 2D world is honestly confusing me, it seems to work in some method contrary to how I understand it.
I can't get the world to react to a pixel-to-pixel size. Everything I plop in and try to size seems absurdly arbitrary, and relative to nothing.
I'm following the example as I work with the demo. I plop in the GG logo. I change the design resolution. I plop in a new logo and the new logo is a different size. That honestly makes no sense to me. What am I adjusting?
The project that I would like to build would have the world based off of a 64x64 block size world, optimized for 1920x1080 screen. I set the design resolution to that size, and when I plop in the logo the aspect ratio is changed. No matter what I do to that resolution the camera view looks exactly the same.
I tried adjusting the grid, but I don't understand what it is changing. I set it to 5x5 or 10x10 or whatever, and I see it get bigger and smaller, but I fail to understand by what degree.
What is the anchor here? What is the world relative to?
When I use a 3D editing program like Maya, the world is build in virtual units and I can tell everything to be a specific size or at a specific location. When I zoom in or change my resolution those units stay the same. When I use a 2D editing program like paintshop my canvas is built the same way but those units relate to the pixels of how the image is to be displayed, and once again if I zoom in or change my resolution that relation is not changed.
Now I understand that the engine needs to be able to provide the same basic view regardless of the resolution the player uses, but I would have assumed that the world would be set up to use a particular resolution as its default scheme and then uniformly scale everything to match the resolution set by the user.
What is going on here? What is the anchor that the world is set to?
I can't get the world to react to a pixel-to-pixel size. Everything I plop in and try to size seems absurdly arbitrary, and relative to nothing.
I'm following the example as I work with the demo. I plop in the GG logo. I change the design resolution. I plop in a new logo and the new logo is a different size. That honestly makes no sense to me. What am I adjusting?
The project that I would like to build would have the world based off of a 64x64 block size world, optimized for 1920x1080 screen. I set the design resolution to that size, and when I plop in the logo the aspect ratio is changed. No matter what I do to that resolution the camera view looks exactly the same.
I tried adjusting the grid, but I don't understand what it is changing. I set it to 5x5 or 10x10 or whatever, and I see it get bigger and smaller, but I fail to understand by what degree.
What is the anchor here? What is the world relative to?
When I use a 3D editing program like Maya, the world is build in virtual units and I can tell everything to be a specific size or at a specific location. When I zoom in or change my resolution those units stay the same. When I use a 2D editing program like paintshop my canvas is built the same way but those units relate to the pixels of how the image is to be displayed, and once again if I zoom in or change my resolution that relation is not changed.
Now I understand that the engine needs to be able to provide the same basic view regardless of the resolution the player uses, but I would have assumed that the world would be set up to use a particular resolution as its default scheme and then uniformly scale everything to match the resolution set by the user.
What is going on here? What is the anchor that the world is set to?
About the author
http://calebchild.boldlygoingnowhere.org/caleb/
#2
Now I'm just concerned about setting up the game to properly handle different resolutions/ratios, but I suppose I need to worry about getting the game to work first.
Thanks for the help!
04/12/2010 (7:27 pm)
That helps a lot. Now that I can see that the camera was set to 100x75 the grid makes more sense.Now I'm just concerned about setting up the game to properly handle different resolutions/ratios, but I suppose I need to worry about getting the game to work first.
Thanks for the help!
#3
That will lock the xbox to 128x720 and you will not have to worry about resolutions at all.
04/12/2010 (10:34 pm)
If you are building for the xbox just put this in your torqueSettings.xml<XboxGraphicsManagerSettings>
<PreferMultiSampling>false</PreferMultiSampling>
<UseDisplaySizeForBackbuffer>false</UseDisplaySizeForBackbuffer>
<PreferredBackBufferHeight>720</PreferredBackBufferHeight>
<PreferredBackBufferWidth>1280</PreferredBackBufferWidth>
</XboxGraphicsManagerSettings>That will lock the xbox to 128x720 and you will not have to worry about resolutions at all.
#4
To be honest though, what I was planning on doing (when I get there) is have a few dynamic changes base don the aspect ratio. Like the HUD would be on the sides of a 16:9 setting but on the top and bottom on a 4:3 screen. And if I really knew what I was doing, I'd have the 4:3 screen crop off a little bit of the sides but dynamically shift the camera to the front of the player so the only thing they lose is seeing more of what's behind them. Or maybe force the view of the world to always show within a 14:9 camera and then just show a little more beyond that depending upon their true aspect ratio. I'd have to create more of the game to figure out what it is that would work best.
What are those multisampling and BackBuffer things anyway?
04/12/2010 (11:28 pm)
What does it do when you play the game on a 4:3 screen? Black bar or stretch?To be honest though, what I was planning on doing (when I get there) is have a few dynamic changes base don the aspect ratio. Like the HUD would be on the sides of a 16:9 setting but on the top and bottom on a 4:3 screen. And if I really knew what I was doing, I'd have the 4:3 screen crop off a little bit of the sides but dynamically shift the camera to the front of the player so the only thing they lose is seeing more of what's behind them. Or maybe force the view of the world to always show within a 14:9 camera and then just show a little more beyond that depending upon their true aspect ratio. I'd have to create more of the game to figure out what it is that would work best.
What are those multisampling and BackBuffer things anyway?
#5
04/13/2010 (6:35 am)
16:9 on 4:3 is automatically letterboxed on xbox
#6
If you play the game on a 4:3 screen, the end result depends on how you have set up your camera. In the Torque X Builder, you have a couple camera options: fixed width and fixed height. If you specify fixed width, the game will be letterboxed (you may have to set up the letterbox, though. There should be a tutorial for that if I remember correctly.) If you choose fixed height, the edges will be cropped.
04/13/2010 (9:00 am)
The backbuffer thing will set your game to render in 720p. It is NOT recommended to use 1080p for your game as Torque X does not render 1080p content correctly on the XBox360, which will cause your game to crash (especially apparent if you use tile maps.)If you play the game on a 4:3 screen, the end result depends on how you have set up your camera. In the Torque X Builder, you have a couple camera options: fixed width and fixed height. If you specify fixed width, the game will be letterboxed (you may have to set up the letterbox, though. There should be a tutorial for that if I remember correctly.) If you choose fixed height, the edges will be cropped.
#7
The multisampling is for anti alias. I never turn that on. hmm maybe should give it a try one day.
04/13/2010 (12:20 pm)
backbuffer = true will set your game to use the resolution the xbox is set to, 1080, 720, 480. And I would not suggest 1080, I did it and paid the price! you need to deal with 3 resolutions in the UI. 1080 works for the games pretty much, there are some caveats that I got around. I was thinking of modifying my engine so that 1080/720 would do 720 and 480 would do 480. I don't know how many people use 480 but it would be a cool geek thing to do.The multisampling is for anti alias. I never turn that on. hmm maybe should give it a try one day.
#8
Wait, for real?
What the hell man! That's freaking absurd, is someone going to fix that? That's the resolution I'm gonna run everything at! Half the reason I'm getting a 1920x1080 monitor is so that I can test/optimize the XNA games I wanna start making for all resolutions.
Let me re-iterate the backbuffer to make sure I understand it correctly.
Basically, that would be the actual resolution the game itself will render at, and then if the console is set to a different resolution then the system's hardware will resize the game's final image to fit that resolution.
And about 480: that is NOT the only 4:3 image that the Xbox does! I actually run my Xbox at 1280x1024 and it drives me freaking crazy every time I try another shoddy Indie game that gives me a freaking squished image because they utterly fail to realize that the Xbox can output to computer monitors.
04/13/2010 (12:45 pm)
Quote:It is NOT recommended to use 1080p for your game as Torque X does not render 1080p content correctly on the XBox360, which will cause your game to crash (especially apparent if you use tile maps.)
Wait, for real?
What the hell man! That's freaking absurd, is someone going to fix that? That's the resolution I'm gonna run everything at! Half the reason I'm getting a 1920x1080 monitor is so that I can test/optimize the XNA games I wanna start making for all resolutions.
Let me re-iterate the backbuffer to make sure I understand it correctly.
Basically, that would be the actual resolution the game itself will render at, and then if the console is set to a different resolution then the system's hardware will resize the game's final image to fit that resolution.
And about 480: that is NOT the only 4:3 image that the Xbox does! I actually run my Xbox at 1280x1024 and it drives me freaking crazy every time I try another shoddy Indie game that gives me a freaking squished image because they utterly fail to realize that the Xbox can output to computer monitors.
#9
Edit: 1280x1024 is NOT 4:3 aspect ratio by the way - another reason you may be getting problems.
04/13/2010 (1:06 pm)
xbox will automatically letter box 16:9 and 720p is what the xna team recommends most indie games should use. If you are getting issues on your computer monitor then you probably need to check out your xbox settings. I run all my xbox games on a computer monitor and have never had any problems unless it's when I was playing with the xbox display settings.Edit: 1280x1024 is NOT 4:3 aspect ratio by the way - another reason you may be getting problems.
#10
Why would XNA itself have a problem running 1080p? I understand them recommending a 720p resolution to most of the indies simply for the fact that since the larger portion of them either don't quite know what they are doing or simply miss a lot of details, so the middle-ground resolution would be optimum for such people.
But for situations like this where we are using a commercial engine? And I would put my game through some dedicated testing to ensure my product looks proper on all settings before I release it. I find it absurd that someone with such dedication could render the game at 1080p, particularly when he is using a commercial engine.
04/13/2010 (3:48 pm)
I could look up the specific games that I had problems with when I get the change if you are interested, but that hardly seems to be the point.Why would XNA itself have a problem running 1080p? I understand them recommending a 720p resolution to most of the indies simply for the fact that since the larger portion of them either don't quite know what they are doing or simply miss a lot of details, so the middle-ground resolution would be optimum for such people.
But for situations like this where we are using a commercial engine? And I would put my game through some dedicated testing to ensure my product looks proper on all settings before I release it. I find it absurd that someone with such dedication could render the game at 1080p, particularly when he is using a commercial engine.
#11
msdn.microsoft.com/en-us/library/bb464139.aspx
04/13/2010 (4:11 pm)
I don't remember the precise reason why torque x doesn't *completely* work in 1080p off-the-shelf (iirc it mostly works), but Predicated Tiling might be part of it if there are crashes involved. Also I believe the gui requires extra work - but it sounds like you won't mind working on that.msdn.microsoft.com/en-us/library/bb464139.aspx
#12
I made a game at 1080 and after getting around the issues with particles, it ran great. you can do it, if you want. Go and try it out before worrying, however be prepared to deal with the issues.
04/13/2010 (4:32 pm)
XNA in general has issues with 1080, as Duncan pointed out it has to do with predicate tiling, do not get me started on it. I have had quite an argument on the forum that the 1080 checkbox does not mean we use a 1080 backbuffer. Overall almost every xbox game uses 720p, it is a problem in the xbox overall not having enough memory to really do the 1080.I made a game at 1080 and after getting around the issues with particles, it ran great. you can do it, if you want. Go and try it out before worrying, however be prepared to deal with the issues.
#13
This is freaking bunk. I'm so upset right now.
I'm going to go return that widescreen monitor, since apparently I have no reason to keep it.
04/13/2010 (6:56 pm)
I thought Xbox always bragged about how they had more games that actually ran in 1080p than the PS3 did. But oh no, a 2D game can't output that size? And it has an even harder time with it when you use tiling, which actually reduces the amount of memory you're using?This is freaking bunk. I'm so upset right now.
I'm going to go return that widescreen monitor, since apparently I have no reason to keep it.
#14
04/14/2010 (8:36 am)
Stick it on your PC, or do you already have two widescreens? I have two on my PC it's great!
#15
The idea was that the second monitor would connect to my PC, 360, and PS3. (VGA, DVI, and HDMI inputs can be cycled between.) But I was on the fence about dropping the cash for it, since I already have access to a 1080p TV in the family room, and the only thing this monitor would let me do is play my PS3 when the main TV is being used.
I was on the fence about getting it, but then I thought: Hey, I'm going to be starting to work on some XNA games, right? Well if I have that widescreen monitor I can easily test the game on all resolutions in both 16:9 and 4:3 by just switching between them right there!
But if I can't actually run XNA games in 1080p, then what would I need that new monitor for? My current monitor already handles the highest resolution I would actually get the games to run at. Money is a bit too tight to spend that cash just to stretch out my desktop.
04/14/2010 (1:34 pm)
It was on my PC.The idea was that the second monitor would connect to my PC, 360, and PS3. (VGA, DVI, and HDMI inputs can be cycled between.) But I was on the fence about dropping the cash for it, since I already have access to a 1080p TV in the family room, and the only thing this monitor would let me do is play my PS3 when the main TV is being used.
I was on the fence about getting it, but then I thought: Hey, I'm going to be starting to work on some XNA games, right? Well if I have that widescreen monitor I can easily test the game on all resolutions in both 16:9 and 4:3 by just switching between them right there!
But if I can't actually run XNA games in 1080p, then what would I need that new monitor for? My current monitor already handles the highest resolution I would actually get the games to run at. Money is a bit too tight to spend that cash just to stretch out my desktop.
#16
Like I said you can do 1080, just set usebackbuffer to true, I did it on my last game and it was really a pain for the gui, the crash bug with the particles however I overcame. I believe I posted about it. Overall I found it really not worth the effort. Apparently neither does Bungie, they said they would rather have the game run well than tick off a bullet point.
04/14/2010 (10:17 pm)
I am with you, I would like a monitor so I can debug on the xbox on my desk, but for now there are other things way more important in my life.Like I said you can do 1080, just set usebackbuffer to true, I did it on my last game and it was really a pain for the gui, the crash bug with the particles however I overcame. I believe I posted about it. Overall I found it really not worth the effort. Apparently neither does Bungie, they said they would rather have the game run well than tick off a bullet point.
Torque 3D Owner Henry Shilling
Smokin Skull
I target the xbox so all my games are 1280x720. First things first select preferences under the edit menu. Sonce I use 1280x720 I set the Design Resolution to 1280 720.
Secondly press the edit button before you place anything in your level. The top item should be camera. I set the width to 128 and height to 72. that way 1 = 10 pixels. As you will learn the values do not really matter as long as they have the correct aspect. I guess you could set width to 1280 and height to 720. I do not think it will make much difference.
Another major difference is 0/0 is the center of the screen. The center of the the camera view. Except for the gui, then 0/0 is top/left.
That should get you started.