Scroller.map not loading correctly in my Tutorial prog
by Michael Austin · in Torque Game Builder · 07/06/2005 (3:25 pm) · 25 replies
I have followed the tutorial, and cannot get the cloud tilemap to look right. There is a small space at the top, and about 1/3 of the space at the bottom is white. Also, when I try to open scroller.map in the editor, I get an error about it being unable to load the map. the graphics are all displayed, they just don't stretch to the screen as the tutorial says they should.
Here is the console output (if it is relevant... Since the demo specifically ignores some of the graphics in the tilemap, I would expect such and output):
fxTileLayer2D:: setStaticTile() - fxImageMapDatablock2d - datablock is invalid (filename - that is not loaded) *expected error*
fxTileMape2D::loadTileMap() - could nt read from stream 'T2d/client/maps/scroller.map' for tile map load
I get this error, despite seeing the scrolling background, just misproportioned.
here is the relevant torquescript code as I have entered it. Please excuse the bad formatting indentationion, as I am getting used to ultraedit's options for the first time:
/**
* This function will load all datablocks that are pertinent to this project.
*/
function LoadResources()
{
//load playerShip
datablock fxImageMapDatablock2d(playershipImageMap)
{
mode = full;
textureName = "~/client/images/playerShip";
};
//load enemymissile
datablock fxImageMapDatablock2d(enemymissileImageMap)
{
mode = full;
textureName = "~/client/images/enemyMissile";
};
//load enemyship
datablock fxImageMapDatablock2d(enemyship1ImageMap)
{
mode = full;
textureName = "~/client/images/enemyship1";
};
//load playermissile
datablock fxImageMapDatablock2D(playermissileImageMap)
{
mode = full;
textureName = "~/client/images/playerMissile";
};
//resources for the scrolling background - tilemap
//sky
datablock fxImageMapDatablock2D(bgBlankSkyImageMap)
{
mode = full;
textureName = "~/client/images/bg_blank_sky";
};
//cloud1
datablock fxImageMapDatablock2D(bgCloud1ImageMap)
{
mode = full;
textureName = "~/client/images/bg_cloud_1";
};
//cloud2
datablock fxImageMapDatablock2D(bgCloud2ImageMap)
{
mode = full;
textureName = "~/client/images/bg_cloud_2";
};
//cloud3a
datablock fxImageMapDatablock2D(bgCloud3aImageMap)
{
mode = full;
textureName = "~/client/images/bg_cloud_3a";
};
//cloud3b
datablock fxImageMapDatablock2D(bgCloud3bImageMap)
{
mode = full;
textureName = "~/client/images/bg_cloud_3b";
};
//mountains to test getting around error - remove
datablock fxImageMapDatablock2D(bgMountains01ImageMap)
{
mode = full;
textureName = "~/client/images/bg_Mountains_01";
};
//ditto - remove
datablock fxImageMapDatablock2D(bgMountains02ImageMap)
{
mode = full;
textureName = "~/client/images/bg_Mountains_02";
};
//ditto - remove
datablock fxImageMapDatablock2D(bgMountains03ImageMap)
{
mode = full;
textureName = "~/client/images/bg_Mountains_03";
};
}
//create, load, and generally display the sky tilemap background
function CreateTileMap()
{
//create tile-map
%scrollerMap = new fxTileMap2D() { scenegraph = t2dSceneGraph; };
// Load Tile-Map.
%scrollerMap.loadTileMap("~/client/maps/scroller.map");
// Reference Layers.
%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");
}
If I have missed reporting any useful information, please let me know. I have not seen any bugs such as this reported as of yet, so I assume I have made a mistake.
The error returned from the tilemap editor is simply a "cannot load" message. I can load a tilemap that I have created and saved on my own.
Mike
Here is the console output (if it is relevant... Since the demo specifically ignores some of the graphics in the tilemap, I would expect such and output):
fxTileLayer2D:: setStaticTile() - fxImageMapDatablock2d - datablock is invalid (filename - that is not loaded) *expected error*
fxTileMape2D::loadTileMap() - could nt read from stream 'T2d/client/maps/scroller.map' for tile map load
I get this error, despite seeing the scrolling background, just misproportioned.
here is the relevant torquescript code as I have entered it. Please excuse the bad formatting indentationion, as I am getting used to ultraedit's options for the first time:
/**
* This function will load all datablocks that are pertinent to this project.
*/
function LoadResources()
{
//load playerShip
datablock fxImageMapDatablock2d(playershipImageMap)
{
mode = full;
textureName = "~/client/images/playerShip";
};
//load enemymissile
datablock fxImageMapDatablock2d(enemymissileImageMap)
{
mode = full;
textureName = "~/client/images/enemyMissile";
};
//load enemyship
datablock fxImageMapDatablock2d(enemyship1ImageMap)
{
mode = full;
textureName = "~/client/images/enemyship1";
};
//load playermissile
datablock fxImageMapDatablock2D(playermissileImageMap)
{
mode = full;
textureName = "~/client/images/playerMissile";
};
//resources for the scrolling background - tilemap
//sky
datablock fxImageMapDatablock2D(bgBlankSkyImageMap)
{
mode = full;
textureName = "~/client/images/bg_blank_sky";
};
//cloud1
datablock fxImageMapDatablock2D(bgCloud1ImageMap)
{
mode = full;
textureName = "~/client/images/bg_cloud_1";
};
//cloud2
datablock fxImageMapDatablock2D(bgCloud2ImageMap)
{
mode = full;
textureName = "~/client/images/bg_cloud_2";
};
//cloud3a
datablock fxImageMapDatablock2D(bgCloud3aImageMap)
{
mode = full;
textureName = "~/client/images/bg_cloud_3a";
};
//cloud3b
datablock fxImageMapDatablock2D(bgCloud3bImageMap)
{
mode = full;
textureName = "~/client/images/bg_cloud_3b";
};
//mountains to test getting around error - remove
datablock fxImageMapDatablock2D(bgMountains01ImageMap)
{
mode = full;
textureName = "~/client/images/bg_Mountains_01";
};
//ditto - remove
datablock fxImageMapDatablock2D(bgMountains02ImageMap)
{
mode = full;
textureName = "~/client/images/bg_Mountains_02";
};
//ditto - remove
datablock fxImageMapDatablock2D(bgMountains03ImageMap)
{
mode = full;
textureName = "~/client/images/bg_Mountains_03";
};
}
//create, load, and generally display the sky tilemap background
function CreateTileMap()
{
//create tile-map
%scrollerMap = new fxTileMap2D() { scenegraph = t2dSceneGraph; };
// Load Tile-Map.
%scrollerMap.loadTileMap("~/client/maps/scroller.map");
// Reference Layers.
%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");
}
If I have missed reporting any useful information, please let me know. I have not seen any bugs such as this reported as of yet, so I assume I have made a mistake.
The error returned from the tilemap editor is simply a "cannot load" message. I can load a tilemap that I have created and saved on my own.
Mike
About the author
#2
On another note, thus far I am loving the flexibility by the system T2D provides. $100 is cheap for this kind of help/tools. 3 hours of a tutorial, and 3 days of reading documentation and I have no doubts that it's well worth it. Even my wife is convinced! She doesn't understand a word that I'm saying, but If I'm this excited and blabby, it must be great!
07/06/2005 (4:23 pm)
I had actually suspected as much... However, The pictures in the tuturial guide clearly showed it working properly, so from that I felt I had to blame my poor brain :) I've found more often than not one blames an external entity when the culprit is poor understanding.On another note, thus far I am loving the flexibility by the system T2D provides. $100 is cheap for this kind of help/tools. 3 hours of a tutorial, and 3 days of reading documentation and I have no doubts that it's well worth it. Even my wife is convinced! She doesn't understand a word that I'm saying, but If I'm this excited and blabby, it must be great!
#3
You can get rid of the white strip along the top by editing mainScreenGui.gui. Change
07/07/2005 (12:19 am)
I first did the tutorial with the previous version of T2D, and the scroll map filled the screen as advertised. But with the current version (1.0.2), I have the same problem as everyone else. The scroller.map file has not changed, however.You can get rid of the white strip along the top by editing mainScreenGui.gui. Change
new fxSceneWindow2D(sceneWindow2D) {
profile = "GuiContentProfile";
horizSizing = "width";
vertSizing = "height";
position = "0 22";
extent = "640 458";tonew fxSceneWindow2D(sceneWindow2D) {
profile = "GuiContentProfile";
horizSizing = "width";
vertSizing = "height";
position = "0 0";
extent = "640 480";You can further modify the extent to fill the screen, but that distorts the aspect ratio and probably has nothing to do with the true problem.
#4
07/16/2005 (4:53 pm)
I have the same problem... I'm doing a GID (and learning T2D at the same time) and this has stopped me :\
#5
@Jason: "unfortunatly, i spent about 30 min trying to load the scroll map in the tile editor, but it looks like the tile editor is too buggy and i cant get it loaded.". It would be helpful if you could you elaborate on the bug(s) that stop you loading a tile-map, thanks.
- Melv.
07/17/2005 (2:22 am)
Although this comes a little late for you guys, there is a new "skytutorial.map" file in the next release that is developed for the tutorial and contains a single sky-layer only.@Jason: "unfortunatly, i spent about 30 min trying to load the scroll map in the tile editor, but it looks like the tile editor is too buggy and i cant get it loaded.". It would be helpful if you could you elaborate on the bug(s) that stop you loading a tile-map, thanks.
- Melv.
#6
Any idea on a date... or could you maybe host the .map for people to download while we wait for the next T2D release ?
Thanks
Joseph
07/17/2005 (2:10 pm)
Melv, good to hear... Any idea on a date... or could you maybe host the .map for people to download while we wait for the next T2D release ?
Thanks
Joseph
#7
07/17/2005 (4:40 pm)
@Melv: I havent read any (or looked for) docs regarding tile-map, so It's probably just "user error". When I get to the point where I am really using tilemaps and I still cant figure it out, i'll post a followup thread.
#8
09/01/2005 (8:30 am)
Yeah, a download for the skytutorial.map would be sweet or perhaps even just the specs for the file so we can modify the original one in the TileEditor...
#9
As a biginner , please show me more tutorials about tile-map editor and the file format of *.map .
09/07/2005 (1:19 am)
We wish we can get an offical map file as possible as quick.As a biginner , please show me more tutorials about tile-map editor and the file format of *.map .
#10
09/12/2005 (8:39 pm)
Just putting my weight behind getting the .map file updated too. I had forgotten everything I had done in the tutorials while not working with T2D, I was quite mad at myself for not figuring out why it was not working when I seemed to remember that it worked the first time I did the tutorial. At least I know it is not me now :-p
#11
09/13/2005 (5:27 pm)
Quick question: has anyone been able to find a way to view the spacescroller map just to look at the tilelayers? I've searched the forum with little success - lots of people having the same problem but I can't seem to find any posted solutions. Any help would be groovy. I've got the impression at this point that the tileeditor is a sorta steep learning curve and I'm curious how the spacescroller background is assembled.
#12
@Andrew: i cant get it loaded either, but honestly i only spent about 30 min dinking around with it before moving on to other stuff.
09/13/2005 (6:43 pm)
@Jonothan: someone mentioned that the first version of t2d the tilemap was working properly, but in the current version (1.0.2) it is not. so that may be why it worked for you the first time :)@Andrew: i cant get it loaded either, but honestly i only spent about 30 min dinking around with it before moving on to other stuff.
#13
09/15/2005 (10:58 am)
I am curious, has anyone submitted this into the bugs section?
#14
09/18/2005 (12:51 pm)
Just bought T2D, started the demo, and had the same problem. I'm glad I checked this forum... i was going nuts trying to find where I went wrong. :)
#15
problem...
I have done all tutorial, played with the effects
but I can't figure out how to OPEN even the
map files that come with the examples.
Whenever I launch the TileEditor (I put the
maps in Torque2D\SDK\example\tileeditor\client\maps)
but it can't load them. Until now I only have been able to
view a empty black screen with *nice* blue lines.
Please... somebody has been able to edit this maps already?
09/27/2005 (4:48 pm)
I just purchased T2D and I'm having the same problem...
I have done all tutorial, played with the effects
but I can't figure out how to OPEN even the
map files that come with the examples.
Whenever I launch the TileEditor (I put the
maps in Torque2D\SDK\example\tileeditor\client\maps)
but it can't load them. Until now I only have been able to
view a empty black screen with *nice* blue lines.
Please... somebody has been able to edit this maps already?
#16
09/28/2005 (5:54 am)
I don't think you can with the current version. I ran into exactly the same problem. Somewhere on this forum there is someone explaining that it will be fixed in a new release (but I don't remember anyone mentioning a release date).
#17
- Tilemap saving and loading system (in the features page)
they were lying... THIS is a total misinformation
I was counting with this feature, I want to do a
platform game right now...
somebody please save me *_*
09/28/2005 (8:59 am)
If this is true, when they says - Tilemap saving and loading system (in the features page)
they were lying... THIS is a total misinformation
I was counting with this feature, I want to do a
platform game right now...
somebody please save me *_*
#18
I don't know what kinds of problems you're having with T2D, but I've managed to do quick-and-dirty platform games, so there's nothing really stopping you.
--
Hans
09/28/2005 (9:17 am)
I've created, saved, loaded, edited and re-saved dozens of tilemaps. No one's lying or misinforming you.I don't know what kinds of problems you're having with T2D, but I've managed to do quick-and-dirty platform games, so there's nothing really stopping you.
--
Hans
#19
demo, I'm total new to T2D and don't know much about this.
right now I've done a map but I can load the scrollmap
even if I copy the tile images in:
Torque2D\SDK\example\tileeditor\client\images
Torque2D\SDK\example\T2D\client\images
What is your version of T2D? I'm testing with 1.0.2
If you could tell me the steps to modify the scrollmap
I'm relly going to appreciate that.
09/28/2005 (10:44 am)
Well, seems the problem is with the paths of the actualdemo, I'm total new to T2D and don't know much about this.
right now I've done a map but I can load the scrollmap
even if I copy the tile images in:
Torque2D\SDK\example\tileeditor\client\images
Torque2D\SDK\example\T2D\client\images
What is your version of T2D? I'm testing with 1.0.2
If you could tell me the steps to modify the scrollmap
I'm relly going to appreciate that.
#20
Like I said in that other thread, the actual tilemap is in "Torque2D/SDK/example/spacescroller/client/maps", it's named scroller.map.
Copy that into "Torque2D/SDK/example/tileeditor/client/maps". Then start the spacescroller, go into the tileeditor and load it.
If that doesn't work, let me know what happens.
Oh, and dude, no one's lied to you or misinformed you. You're still learning T2D, so don't be so quick to pass judgement.
--
Hans
09/28/2005 (10:53 am)
I'd like it if we kept all of this in one thread.Like I said in that other thread, the actual tilemap is in "Torque2D/SDK/example/spacescroller/client/maps", it's named scroller.map.
Copy that into "Torque2D/SDK/example/tileeditor/client/maps". Then start the spacescroller, go into the tileeditor and load it.
If that doesn't work, let me know what happens.
Oh, and dude, no one's lied to you or misinformed you. You're still learning T2D, so don't be so quick to pass judgement.
--
Hans
Torque Owner Jason Swearingen
I belive it's a "problem" with the scroll map, not your code.
it's not actually a problem really, it's just if you run the spaceshooter demo, you'll see that the sky only takes the top of the screen (the bottom is ground) so they made the scroll map only big enough for the spaceshooter demo.
That's why when following the tutorial, you copy the scroll map from spaceshooter, and that's why it looks wrong.
Unfortunatly, i spent about 30 min trying to load the scroll map in the tile editor, but it looks like the tile editor is too buggy and i cant get it loaded.
I havent tried making my own tile map from scratch yet, but again: This is a bug in the tutorial, not your code
-Jason