Did platformer tutorial, trying to package game, get error ...
by Shane · in Torque Game Builder · 03/19/2007 (10:02 pm) · 8 replies
So I ran through the cool little platformer tutorial for the new torque game builder. Piece of cake, works in my level editor and runs fine (Under both PC and Mac). W00t, I think then I want to show off my first initial efforts to the dev team to get them pumped to say "look what we got, look what we can do". So there is this new packaging thingy. I open it up, click analyze, then build game. Shows a good log...sure enough the folder is there.
I goto that folder, run the game to test...little platformer ninja game (from the wiki tutorial) starts up, but my layer isnt there...the ninja falls right through the world. I look at the console output (or use the itlde on mac cause in mac doesnt seem to write out a console.log file.) and I see there are two errors I have no clue what it means:
Loading compiled script vbPlatformer/gameScripts/game.cs.
Loading compiled script vbPlatformer/gameScripts/player.cs.
Loading compiled script vbPlatformer/data/levels/Level1.t2d.
t2dTileLayer::setStaticTile() - t2dImageMapDatablock Datablock is invalid! (testTextureImageMap)
t2dTileMap::loadTileLayer() - Could not Read from Stream 'vbPlatformer/data/tilemaps/layer1.lyr' for Tile-Layer Load.
The layer1.lyr is what I named my layer according to the tutorial here:
http://tdn.garagegames.com/wiki/TGB/MiniPlatformerTutorial
I didn't do anything special, and I run this. Well the only thing I did was make the tile size 16 instead of 32 as per the tutorial (cause my cameras default start view made that look better, i later figured out how to change the camera zoom). In either case, once i package the game and run it...i get those above errors (both mac and pc) and yet it runs fine from the editor. I guess i just don't know exactly what the error is telling me, almost like it cant find this thing called testTextureImageMap (unless its created by default to my knowledge i never created one).
Thanks for any and all help...
Shane
p.s. to the dev team: Torque Game builder is awesome guys and it has come a long long way since 2d. I was in complete awe and fascination while running through the tutorial and I cannot wait to get a warm fuzzy for this flow of project to final deliverable and really then get to dig in on the game making.
I goto that folder, run the game to test...little platformer ninja game (from the wiki tutorial) starts up, but my layer isnt there...the ninja falls right through the world. I look at the console output (or use the itlde on mac cause in mac doesnt seem to write out a console.log file.) and I see there are two errors I have no clue what it means:
Loading compiled script vbPlatformer/gameScripts/game.cs.
Loading compiled script vbPlatformer/gameScripts/player.cs.
Loading compiled script vbPlatformer/data/levels/Level1.t2d.
t2dTileLayer::setStaticTile() - t2dImageMapDatablock Datablock is invalid! (testTextureImageMap)
t2dTileMap::loadTileLayer() - Could not Read from Stream 'vbPlatformer/data/tilemaps/layer1.lyr' for Tile-Layer Load.
The layer1.lyr is what I named my layer according to the tutorial here:
http://tdn.garagegames.com/wiki/TGB/MiniPlatformerTutorial
I didn't do anything special, and I run this. Well the only thing I did was make the tile size 16 instead of 32 as per the tutorial (cause my cameras default start view made that look better, i later figured out how to change the camera zoom). In either case, once i package the game and run it...i get those above errors (both mac and pc) and yet it runs fine from the editor. I guess i just don't know exactly what the error is telling me, almost like it cant find this thing called testTextureImageMap (unless its created by default to my knowledge i never created one).
Thanks for any and all help...
Shane
p.s. to the dev team: Torque Game builder is awesome guys and it has come a long long way since 2d. I was in complete awe and fascination while running through the tutorial and I cannot wait to get a warm fuzzy for this flow of project to final deliverable and really then get to dig in on the game making.
#2
that's about all I can think of right now. (brain dead at midnight)
03/20/2007 (12:05 am)
Make sure you're packaging in the same directory as the tgb/games directory. TGB cannot package if you tell it to create the package in - as an example - c:\ninja\platformer. So, in the box where you type in where you want to create the package, just type in a single name, like "ninjatest". It should create a directory like so tgb\games\ninjatest [ where tgb is where you installed tgb ]that's about all I can think of right now. (brain dead at midnight)
#3
going into that folder...sure enough its all there but running it my little ninja shows up an falls cause there is no tiles.....and then looking in my console text file thats printed out sure enough:
t2dTileLayer::setStaticTile() - t2dImageMapDatablock Datablock is invalid! (testTextureImageMap)
t2dTileMap::loadTileLayer() - Could not Read from Stream 'vbPlatformer/data/tilemaps/layer1.lyr' for Tile-Layer Load.
(I just realized its looking for it in vbPlatformer/data should be vbTest I would suspect...hmm in addition on the MacOS it just makes a .app file hmmmm
maybe the analyze is messing up...
I will double check that,anyone runinto this?
03/20/2007 (5:12 pm)
Well I just type in vbTest and it creates it in... ya tgb\games\vbTest... going into that folder...sure enough its all there but running it my little ninja shows up an falls cause there is no tiles.....and then looking in my console text file thats printed out sure enough:
t2dTileLayer::setStaticTile() - t2dImageMapDatablock Datablock is invalid! (testTextureImageMap)
t2dTileMap::loadTileLayer() - Could not Read from Stream 'vbPlatformer/data/tilemaps/layer1.lyr' for Tile-Layer Load.
(I just realized its looking for it in vbPlatformer/data should be vbTest I would suspect...hmm in addition on the MacOS it just makes a .app file hmmmm
maybe the analyze is messing up...
I will double check that,anyone runinto this?
#4
going into that folder...sure enough its all there but running it my little ninja shows up an falls cause there is no tiles.....and then looking in my console text file thats printed out sure enough:
t2dTileLayer::setStaticTile() - t2dImageMapDatablock Datablock is invalid! (testTextureImageMap)
t2dTileMap::loadTileLayer() - Could not Read from Stream 'vbPlatformer/data/tilemaps/layer1.lyr' for Tile-Layer Load.
(I just realized its looking for it in vbPlatformer/data should be vbTest I would suspect...hmm in addition on the MacOS it just makes a .app file hmmmm
maybe the analyze is messing up...
I will double check that,anyone runinto this?
03/20/2007 (6:28 pm)
Well I just type in vbTest and it creates it in... ya tgb\games\vbTest... going into that folder...sure enough its all there but running it my little ninja shows up an falls cause there is no tiles.....and then looking in my console text file thats printed out sure enough:
t2dTileLayer::setStaticTile() - t2dImageMapDatablock Datablock is invalid! (testTextureImageMap)
t2dTileMap::loadTileLayer() - Could not Read from Stream 'vbPlatformer/data/tilemaps/layer1.lyr' for Tile-Layer Load.
(I just realized its looking for it in vbPlatformer/data should be vbTest I would suspect...hmm in addition on the MacOS it just makes a .app file hmmmm
maybe the analyze is messing up...
I will double check that,anyone runinto this?
#5
That's another piece I can think of.
03/20/2007 (6:47 pm)
Check the extensions under the package->extensions menu option. I recall in the old TGB, I had to add an extension (can't recall exactly what extension it was). But worth a check. In your analyze process, read through what files it's included and omitted, if it omitted a needed file type, add it to the extensions list.That's another piece I can think of.
#6
03/20/2007 (6:52 pm)
If the vbPlatformer is incorrect, then I'd recommend you try what David said. Redo the layer or even do a search in all files you have created for the text vbPlatformer and then re-save the level.
#7
going into that folder...sure enough its all there but running it my little ninja shows up an falls cause there is no tiles.....and then looking in my console text file thats printed out sure enough:
t2dTileLayer::setStaticTile() - t2dImageMapDatablock Datablock is invalid! (testTextureImageMap)
t2dTileMap::loadTileLayer() - Could not Read from Stream 'vbPlatformer/data/tilemaps/layer1.lyr' for Tile-Layer Load.
(I just realized its looking for it in vbPlatformer/data should be vbTest I would suspect...hmm in addition on the MacOS it just makes a .app file hmmmm
maybe the analyze is messing up...
I will double check that,anyone runinto this?
03/20/2007 (7:32 pm)
Well I just type in vbTest and it creates it in... ya tgb\games\vbTest... going into that folder...sure enough its all there but running it my little ninja shows up an falls cause there is no tiles.....and then looking in my console text file thats printed out sure enough:
t2dTileLayer::setStaticTile() - t2dImageMapDatablock Datablock is invalid! (testTextureImageMap)
t2dTileMap::loadTileLayer() - Could not Read from Stream 'vbPlatformer/data/tilemaps/layer1.lyr' for Tile-Layer Load.
(I just realized its looking for it in vbPlatformer/data should be vbTest I would suspect...hmm in addition on the MacOS it just makes a .app file hmmmm
maybe the analyze is messing up...
I will double check that,anyone runinto this?
#8
Then it worked.
04/22/2007 (7:13 pm)
I had a similar problem when testing out the package utility, but what I did was create the same name as the project in a different directory, for example if my project was called 'foobar' then i created the package in package/foobarThen it worked.
Associate David Higgins
DPHCoders.com
if testImageMap was the name of the tiles you used, and you have since renamed it for any reason, it would fail ...
also -- if any other errors come before that, please do show them as well ...