Game Development Community

Included Tutorial problem

by Scott Radel · in Torque Game Builder · 05/17/2005 (9:59 pm) · 4 replies

I just purchased T2D and have gone through the basic tutorial. It was pretty easy scripting as I have already worked with Fastgraph and some Direct X. But I did have one problem. The background only covers about 60% of the screen. It scrolls correctly, but does not reach the top and the bottom. Ships show up in these areas but no particle affects. I played with settings, I can move the screen up, down and resize the clouds, but cant figure out how to stretch the sky to cover the whole background. Has any one else see this issue. or did i just miss something?
thanks
Scott

Here is the create tile map function

function CreateTileMap()
{
// Create tile-map.
%scrollerMap = new fxTileMap2D() { scenegraph = t2dSceneGraph; };

// Load saved tile-map file.
%scrollerMap.loadTileMap("~/client/maps/scroller.map");

// Load tile layer from tile-map
%skyLayer = %scrollerMap.getTileLayer( 0 );

// Generate Scrolling Sky, re-size to fill the whole screen
%skyLayer.setPosition( "0 -10" );
%skyLayer.setTileSize( "25 25" );
%skyLayer.setWrap( true, false );
%skyLayer.setAutoPan( "10 0" );
}

#1
05/18/2005 (1:32 am)
Didn't have the problem because I just worked with the code that was in the shooter demo app so I could have land and stuff.

The fact that it is only wraping one way is probably a good reason why.
try settings setwrap(true, true) to see what happens.

EDIT:

I don't have t2d in front of me but if I am not mistaken, it is set to show up like it is for you because that is how the .map was designed. Meaning the clouds where only one layer and covered by terrain. So maybe that wasn't taken into consideration when the demo tutorial was made.
#2
05/18/2005 (8:30 am)
I had the same problem. Played around with it for a while and finally just moved on. Without access to the TGE documentation and very little in the way of T2D docs, it's pretty tough to work out solutions for this kind of thing.
#3
05/18/2005 (9:39 am)
Maybe later I'll get time to play with this and work up a solution, but for now I would suggest looking at the spacescroller folder included, has the code for the demo scroller game :)
#4
05/18/2005 (1:41 pm)
Thanks for the help