Scroller Loop Question (solved)
by rennie moffat · in Torque Game Builder · 07/06/2011 (8:52 am) · 14 replies
Hi there,
I have just decided to use a scroller for the first time and I have an issue. One, the scroller, a pattern on an imageMap, loops down. Fine, however, the pattern only repeats itself when it has completed a full loop. In that, there is a lot of empty space between loops. This is not good.
What I am trying to achieve is a road, that my player runs down, but what I get is a road that looks like it is moving fine, then nothing but a huge white wall. Then the road reappears. What is the correct way to do this?
I have just decided to use a scroller for the first time and I have an issue. One, the scroller, a pattern on an imageMap, loops down. Fine, however, the pattern only repeats itself when it has completed a full loop. In that, there is a lot of empty space between loops. This is not good.
What I am trying to achieve is a road, that my player runs down, but what I get is a road that looks like it is moving fine, then nothing but a huge white wall. Then the road reappears. What is the correct way to do this?
About the author
My thanks to Garage Games and the Garage Games Community combined with owned determination I got one game up, Temple Racer and I am looking to build more interesting, fun games for the mass market of the iOS app store.
#2
07/06/2011 (4:18 pm)
It is. That is not the issue.
#3
07/06/2011 (5:25 pm)
can you post the datablock and t2dScroller code?
#4
imageMap = "endRoundScreen3ImageMap";
scrollY = "-45";
scrollPositionY = "-0.687381";
mUseSourceRect = "0";
sourceRect = "0 0 0 0";
canSaveDynamicFields = "1";
Position = "6.809 -4.918";
size = "512.000 512.000";
Layer = "8";
CollisionMaxIterations = "3";
mountID = "2";
};
07/06/2011 (6:49 pm)
new t2dScroller() {imageMap = "endRoundScreen3ImageMap";
scrollY = "-45";
scrollPositionY = "-0.687381";
mUseSourceRect = "0";
sourceRect = "0 0 0 0";
canSaveDynamicFields = "1";
Position = "6.809 -4.918";
size = "512.000 512.000";
Layer = "8";
CollisionMaxIterations = "3";
mountID = "2";
};
#5
07/06/2011 (7:06 pm)
And the datablock? Is the image itself 512 x 512?
#6
??
new t2dImageMapDatablock(endRoundScreen3ImageMap) {
imageName = "~/data/images/endRoundScreen3.png";
imageMode = "FULL";
frameCount = "-1";
filterMode = "SMOOTH";
filterPad = "1";
preferPerf = "1";
cellRowOrder = "1";
cellOffsetX = "0";
cellOffsetY = "0";
cellStrideX = "0";
cellStrideY = "0";
cellCountX = "-1";
cellCountY = "-1";
cellWidth = "0";
cellHeight = "0";
preload = "1";
allowUnload = "0";
compressPVR = "0";
optimised = "0";
force16bit = "0";
};
07/06/2011 (7:37 pm)
This datablock does not show size. ??
new t2dImageMapDatablock(endRoundScreen3ImageMap) {
imageName = "~/data/images/endRoundScreen3.png";
imageMode = "FULL";
frameCount = "-1";
filterMode = "SMOOTH";
filterPad = "1";
preferPerf = "1";
cellRowOrder = "1";
cellOffsetX = "0";
cellOffsetY = "0";
cellStrideX = "0";
cellStrideY = "0";
cellCountX = "-1";
cellCountY = "-1";
cellWidth = "0";
cellHeight = "0";
preload = "1";
allowUnload = "0";
compressPVR = "0";
optimised = "0";
force16bit = "0";
};
#7
07/06/2011 (7:38 pm)
I mean the image file itself... :| Is the image FILE that size?
#9
The image you're loading in for that datablock...
"endRoundScreen3.png"... has dimensions... in pixels.
It is so many wide, and so many tall... etc.
07/06/2011 (7:41 pm)
Really? The image you're loading in for that datablock...
"endRoundScreen3.png"... has dimensions... in pixels.
It is so many wide, and so many tall... etc.
#10
07/06/2011 (7:44 pm)
hrm... perhaps I don't know what's going on then...
#11
07/06/2011 (8:58 pm)
have you used a scroller before?
#12
07/07/2011 (12:25 am)
Rennie, white wall is definitely wrong texture size. First try to set filterPad to "0", you do not really need it to be enabled for scroller, then if it does not help make sure your image is really PoT-sized. Just to make it clear - there is no "import at 512x512", either image itself has proper sizes, or it does not.
#13
I checked the filter pad and turned it off. In the editor now, I am getting the desired results. However, in the runned game, I am not. I am getting the same as before.
Regarding the image size... I am not sure what you mean. My image, in the image folder is 512x512. So, I create image, it is in my datablocks, natively as 512x512. I pull it into the editor, not adjusting the size, it is 512x512.
???
07/07/2011 (6:14 am)
Hi Rpahut, I checked the filter pad and turned it off. In the editor now, I am getting the desired results. However, in the runned game, I am not. I am getting the same as before.
Regarding the image size... I am not sure what you mean. My image, in the image folder is 512x512. So, I create image, it is in my datablocks, natively as 512x512. I pull it into the editor, not adjusting the size, it is 512x512.
???
#14
thanks.
::)(
07/07/2011 (8:53 am)
ok, the trick seems to be checking off all of the boxes, (or one, not sure which) of the imageMap. So when you open up an image to set if it is full, or celled, preloaded etc, just remove all checks from the boxes.thanks.
::)(
Torque 3D Owner Tim Scheiman
Ghost Ship Studios