Why does this happen?
by MrSpaceGame · in Torque Game Builder · 10/01/2012 (8:05 pm) · 0 replies
Sometimes when you change the camera size on a Torque2D Level, the screen just stays black and no assets are rendered, destroying the whole level and you have to do it again.
It looks okay in the editor, but as soon as I start the game, the level is black and only text is drawn.
This happened to me numerous times.
My question is, if anyone knows what triggers this behaviour in Torque and if there is a way to repair that level.
Thanks for sharing!
It looks okay in the editor, but as soon as I start the game, the level is black and only text is drawn.
This happened to me numerous times.
My question is, if anyone knows what triggers this behaviour in Torque and if there is a way to repair that level.
Thanks for sharing!
%levelContent = new t2dSceneGraph() {
canSaveDynamicFields = "1";
UseLayerSorting = "1";
layerSortMode0 = "Normal";
layerSortMode1 = "Normal";
layerSortMode2 = "Normal";
layerSortMode3 = "Normal";
layerSortMode4 = "Normal";
layerSortMode5 = "Normal";
layerSortMode6 = "Normal";
layerSortMode7 = "Normal";
layerSortMode8 = "Normal";
layerSortMode9 = "Normal";
layerSortMode10 = "Normal";
layerSortMode11 = "Normal";
layerSortMode12 = "Normal";
layerSortMode13 = "Normal";
layerSortMode14 = "Normal";
layerSortMode15 = "Normal";
layerSortMode16 = "Normal";
layerSortMode17 = "Normal";
layerSortMode18 = "Normal";
layerSortMode19 = "Normal";
layerSortMode20 = "Normal";
layerSortMode21 = "Normal";
layerSortMode22 = "Normal";
layerSortMode23 = "Normal";
layerSortMode24 = "Normal";
layerSortMode25 = "Normal";
layerSortMode26 = "Normal";
layerSortMode27 = "Normal";
layerSortMode28 = "Normal";
layerSortMode29 = "Normal";
layerSortMode30 = "Normal";
layerSortMode31 = "Normal";
DebugRendering = "0";
cameraPosition = "0.000000 0.000000";
cameraSize = "1280.000 720.000";
new t2dStaticSprite() {
imageMap = "BackgroundSparkly";
frame = "0";
sourceRect = "0 0 0 0";
canSaveDynamicFields = "1";
size = "1280.000 720.000";
Layer = "31";
WorldLimitMin = "-1280.000 -720.000";
WorldLimitMax = "1280.000 720.000";
CollisionPhysicsSend = "0";
CollisionPhysicsReceive = "0";
Immovable = "1";
AutoMassInertia = "0";
Mass = "9216";
Inertia = "2";
mountID = "2";
};
new t2dSceneObject(gSpawnController) {
canSaveDynamicFields = "1";
class = "SpawnController";
Position = "-594.482 -405.880";
size = "65.000 68.240";
CollisionPhysicsSend = "0";
CollisionPhysicsReceive = "0";
BlendingEnabled = "0";
AutoMassInertia = "0";
Mass = "163.84";
Inertia = "447392";
amount = "10";
baseAmount = "10";
mountID = "3";
spawned = "0";
spawnSpeed = "900";
wave = "1";
};
new t2dSceneObject(gScoreController) {
canSaveDynamicFields = "1";
class = "ScoreController";
Position = "-517.608 -406.353";
size = "65.217 67.295";
CollisionPhysicsSend = "0";
CollisionPhysicsReceive = "0";
BlendingEnabled = "0";
AutoMassInertia = "0";
Mass = "163.84";
Inertia = "447392";
mountID = "4";
multiplier = "1";
score = "0";
};
new t2dTextObject(gUITextSpawned) {
canSaveDynamicFields = "1";
Position = "510.554 -334.544";
size = "141.375 36.000";
text = "Spawned:";
font = "Arial";
wordWrap = "0";
hideOverflow = "1";
textAlign = "Right";
lineHeight = "36";
aspectRatio = "1";
lineSpacing = "0";
characterSpacing = "0";
autoSize = "1";
fontSizes = "96";
textColor = "1 1 1 1";
bilinearFilter = "0";
snapToInteger = "0";
noUnicode = "0";
hideOverlap = "0";
mountID = "5";
};
new t2dTextObject(gUITextWave) {
canSaveDynamicFields = "1";
Position = "536.125 -302.000";
size = "92.250 36.000";
text = "Wave:";
font = "Arial";
wordWrap = "0";
hideOverflow = "1";
textAlign = "Right";
lineHeight = "36";
aspectRatio = "1";
lineSpacing = "0";
characterSpacing = "0";
autoSize = "1";
fontSizes = "96";
textColor = "1 1 1 1";
bilinearFilter = "0";
snapToInteger = "0";
noUnicode = "0";
hideOverlap = "0";
mountID = "6";
};
new t2dTextObject(gUITextAmount) {
canSaveDynamicFields = "1";
Position = "522.625 -265.725";
size = "119.250 36.000";
text = "Amount:";
font = "Arial";
wordWrap = "0";
hideOverflow = "1";
textAlign = "Right";
lineHeight = "36";
aspectRatio = "1";
lineSpacing = "0";
characterSpacing = "0";
autoSize = "1";
fontSizes = "96";
textColor = "1 1 1 1";
bilinearFilter = "0";
snapToInteger = "0";
noUnicode = "0";
hideOverlap = "0";
mountID = "7";
};
new t2dTextObject(gGameOver) {
canSaveDynamicFields = "1";
Visible = "0";
Position = "12.117 1.000";
size = "421.667 92.000";
text = "Game Over";
font = "Arial";
wordWrap = "0";
hideOverflow = "1";
textAlign = "Left";
lineHeight = "92";
aspectRatio = "1";
lineSpacing = "0";
characterSpacing = "0";
autoSize = "1";
fontSizes = "96";
textColor = "1 1 1 1";
bilinearFilter = "0";
snapToInteger = "0";
noUnicode = "0";
hideOverlap = "0";
mountID = "8";
};
new t2dStaticSprite() {
imageMap = "PlanetRedAura2ImageMap";
frame = "0";
sourceRect = "0 0 0 0";
canSaveDynamicFields = "1";
Position = "489.500 360.500";
size = "1069.000 1069.000";
AutoRotation = "1";
Layer = "28";
mountID = "9";
};
new t2dTextObject(gUIHealth) {
canSaveDynamicFields = "1";
Position = "-576.259 324.000";
size = "89.667 32.000";
text = "Health:";
font = "Arial";
wordWrap = "0";
hideOverflow = "1";
textAlign = "Left";
lineHeight = "32";
aspectRatio = "1";
lineSpacing = "0";
characterSpacing = "0";
autoSize = "1";
fontSizes = "96";
textColor = "1 1 1 1";
bilinearFilter = "0";
snapToInteger = "0";
noUnicode = "0";
hideOverlap = "0";
mountID = "10";
};
new t2dTextObject(gScoreGUI) {
canSaveDynamicFields = "1";
Position = "-603.000 -344.000";
size = "74.000 32.000";
text = "Score";
font = "Arial";
wordWrap = "0";
hideOverflow = "1";
textAlign = "Left";
lineHeight = "32";
aspectRatio = "1";
lineSpacing = "0";
characterSpacing = "0";
autoSize = "1";
fontSizes = "96";
textColor = "1 1 1 1";
bilinearFilter = "0";
snapToInteger = "0";
noUnicode = "0";
hideOverlap = "0";
mountID = "11";
};
new t2dTextObject(gMultiGUI) {
canSaveDynamicFields = "1";
Position = "-630.667 -311.000";
size = "18.667 32.000";
text = "X";
font = "Arial";
wordWrap = "0";
hideOverflow = "1";
textAlign = "Left";
lineHeight = "32";
aspectRatio = "1";
lineSpacing = "0";
characterSpacing = "0";
autoSize = "1";
fontSizes = "96";
textColor = "1 1 1 1";
bilinearFilter = "0";
snapToInteger = "0";
noUnicode = "0";
hideOverlap = "0";
mountID = "12";
};
new t2dStaticSprite(gPlanet) {
imageMap = "PlanetsImageMap";
frame = "0";
sourceRect = "0 0 0 0";
canSaveDynamicFields = "1";
Position = "-372.000 -143.000";
size = "196.000 196.000";
Layer = "29";
mountID = "13";
};
new t2dParticleEffect() {
effectFile = "~/data/particles/Starfield.eff";
useEffectCollisions = "0";
effectMode = "INFINITE";
effectTime = "0";
canSaveDynamicFields = "1";
Position = "81.784 0.000";
size = "1226.431 720.000";
Layer = "28";
CollisionPhysicsSend = "0";
CollisionPhysicsReceive = "0";
CollisionMaxIterations = "1";
mountID = "14";
};
new t2dStaticSprite(pShip) {
imageMap = "starshipImageMap";
frame = "0";
sourceRect = "0 0 0 0";
canSaveDynamicFields = "1";
class = "PlayerShip";
Position = "-554.274 -173.000";
size = "96.000 96.000";
Rotation = "90";
Layer = "3";
WorldLimitMode = "CLAMP";
WorldLimitMin = "-632.428 -361.138";
WorldLimitMax = "613.408 360.000";
CollisionActiveSend = "1";
CollisionActiveReceive = "1";
CollisionPhysicsSend = "0";
CollisionPhysicsReceive = "0";
CollisionCallback = "1";
CollisionPolyList = "-0.039 -0.756 0.049 -0.756 0.344 0.589 -0.285 0.589";
LinkPoints = "0.226 0.648 -0.226 0.638 0.609 -0.010 0.363 -0.255 -0.383 -0.275 -0.648 -0.010";
dropChance = "4";
health = "100";
hSpeed = "300";
isDead = "false";
laserSpeed = "800";
mountID = "15";
vSpeed = "300";
};
};