MisBuild: New Buttons and Resolution
by Craig Perko · in Torque Game Builder · 07/15/2006 (10:38 am) · 6 replies
I made a project. I built a project. I ran the built project. There are some bizarre errors. Presumably, these are bugs. Help!
First, it runs in a different resolution. When in the TGB editor, it runs in 800x600. When running after build, the *camera* remains at 800x600, but the display resolution changes to something flatter (presumably, 848x480), stretching the whole display horizontally. This interferes with the placement and relative size of the GUI elements (some buttons and an ML text field) as well as simply looking terrible.
Second, it adds some... buttons.
http://www.projectperko.com/images/level control.jpg
That's a screencap of the upper-left corner of the game. There are two round buttons overlayed on each other, labeled "level control".
The buttons appear to do NOTHING, although their graphic changes to a "plus" sign while I'm clicking on them. I don't know what they are: they don't appear in the TGB editor. This game only has one TGB-endorsed level: all of my levels are done by loading and unloading data in the code, rather than using the TGB level system.
I'm still a bit confused as to certain pieces of TGB - this is only the second of my projects I've tried to build. I don't really understand the level thing, or the wonkiness of the GUI system. But I can get along if I can kick the build utility into working.
Does anyone know what's going on?
Here's the build log, if you want a bit more info:
http://www.projectperko.com/buildLog.html
-Craig
First, it runs in a different resolution. When in the TGB editor, it runs in 800x600. When running after build, the *camera* remains at 800x600, but the display resolution changes to something flatter (presumably, 848x480), stretching the whole display horizontally. This interferes with the placement and relative size of the GUI elements (some buttons and an ML text field) as well as simply looking terrible.
Second, it adds some... buttons.
http://www.projectperko.com/images/level control.jpg
That's a screencap of the upper-left corner of the game. There are two round buttons overlayed on each other, labeled "level control".
The buttons appear to do NOTHING, although their graphic changes to a "plus" sign while I'm clicking on them. I don't know what they are: they don't appear in the TGB editor. This game only has one TGB-endorsed level: all of my levels are done by loading and unloading data in the code, rather than using the TGB level system.
I'm still a bit confused as to certain pieces of TGB - this is only the second of my projects I've tried to build. I don't really understand the level thing, or the wonkiness of the GUI system. But I can get along if I can kick the build utility into working.
Does anyone know what's going on?
Here's the build log, if you want a bit more info:
http://www.projectperko.com/buildLog.html
-Craig
About the author
#2
Last thing left to solve: how do I get the resolution correct?
-Craig
07/15/2006 (4:23 pm)
A-ha. That solves that half. It doesn't look anything like the level control button from the editor: kind of strange.Last thing left to solve: how do I get the resolution correct?
-Craig
#3
07/16/2006 (11:56 am)
When you run a built project for the first time, the engine auto-calculates the resolution to be the maximum windowed resolution supported by the current desktop. You can look for where it's doing that and override it, or just override it after it is already done.
#4
That is DEFINITELY a bug. First, this isn't even a resolution with the same ratio. That's obviously going to screw everything up visually. Second, because the UI components are measured in pixels rather than relative size, changing the size is going to misplace the UI components.
-Craig
07/16/2006 (12:03 pm)
How? Where is that done? I can't find it in main.cs, and everything else is compiled.That is DEFINITELY a bug. First, this isn't even a resolution with the same ratio. That's obviously going to screw everything up visually. Second, because the UI components are measured in pixels rather than relative size, changing the size is going to misplace the UI components.
-Craig
#5
07/16/2006 (4:44 pm)
It matches the ratio to the ratio of your monitor. You'll obviously have to look for the code that does it either in the uncomplied packages or the engine source. Alternatively, you can make changing the resolution the first thing your game does when it starts. You can also spoof the startup resolution by altering prefs.cs in the commons package.
#6
However, I still consider this to be a bug, not a feature.
-Craig
07/16/2006 (4:54 pm)
Okay, I'll look into those options. Thanks for your help!However, I still consider this to be a bug, not a feature.
-Craig
Torque Owner Ben R Vesco