TX Platformer Demo Not Working Properly
by Anthony Ross · in Torque X 2D · 07/11/2009 (4:40 am) · 10 replies
I tried the basic tutorial with the demo kit (the one where you make two platforms and put in a character)
It just did not work there seemed to be no communication between TX2D Builder and Visual Studio.
Level File was not introduced to C# content as the node generator crashed.
Tried putting the level file manually and C# seemed to run and then return to idle without the game actually starting.
Tried same tutorial with the plain starter kit and it seemed to work fine.
Problem is that the plain kit does not have the same components/functionality as the demo kit.
Anyone know what is going on here?
Using XNA3, TX2D 3, Platformer Kit 3.
I got this kit to speed things up and now I've wasted a couple of days scratching my head.
It just did not work there seemed to be no communication between TX2D Builder and Visual Studio.
Level File was not introduced to C# content as the node generator crashed.
Tried putting the level file manually and C# seemed to run and then return to idle without the game actually starting.
Tried same tutorial with the plain starter kit and it seemed to work fine.
Problem is that the plain kit does not have the same components/functionality as the demo kit.
Anyone know what is going on here?
Using XNA3, TX2D 3, Platformer Kit 3.
I got this kit to speed things up and now I've wasted a couple of days scratching my head.
#2
First of all, I've encountered a glitch with VS Express in general where if a file extension is capitalized (i.e. '.PNG' instead of '.png') it will not work properly with VS Studio. This is a particular problem because MS Paint automatically saves files in capitalized extensions.
And, just in case: I've had a lot of problems with ContentNodeGenerator. For everyone's (and google's) future reference:
If TX2D tells you that ContentNodeGenerator is missing from a certain directory (I don't have the error written down, it only appeared in Windows 7 and I'm on XP now) then simply create the directory it asks for and copy/paste ContentNodeGenerator to that directory. Seems to work.
If TX2D crashes (and/or ContentNodeGenerator crashes) when saving or quitting or various other things, check and see if your Game.txproj and your Game.csproj are named the same thing in \[Project]\Game\(i.e. they're both named "Game"). If so, I found the easiest fix is to rename Game.csproj to something like "CS Game.csproj".
Then, obviously, your solution in VS Express will be screwed up. Simply click on the Game.CS (should say something like missing resource), look in its properties, and browse to the new filename. This is why the .csproj is easier to change- I actually haven't been able to change where VS nor TX2D look for the .txproj file.
Hopefully this all makes sense, please feel free to post if you have questions and I'll do my best. And maybe someone at GG will be SOO impressed that a user is answering questions they'll start browsing this part of the forum again.
07/12/2009 (11:03 pm)
Just so you know, you're not alone. I actually got very disenchanted with all of TX2D just because of problems with the damn PSK, and was close to calling it quits. Luckily, today I finally decided to just scrap the PSK, and am working through the Torque X book with no problems like the ones we both have encountered.First of all, I've encountered a glitch with VS Express in general where if a file extension is capitalized (i.e. '.PNG' instead of '.png') it will not work properly with VS Studio. This is a particular problem because MS Paint automatically saves files in capitalized extensions.
And, just in case: I've had a lot of problems with ContentNodeGenerator. For everyone's (and google's) future reference:
If TX2D tells you that ContentNodeGenerator is missing from a certain directory (I don't have the error written down, it only appeared in Windows 7 and I'm on XP now) then simply create the directory it asks for and copy/paste ContentNodeGenerator to that directory. Seems to work.
If TX2D crashes (and/or ContentNodeGenerator crashes) when saving or quitting or various other things, check and see if your Game.txproj and your Game.csproj are named the same thing in \[Project]\Game\(i.e. they're both named "Game"). If so, I found the easiest fix is to rename Game.csproj to something like "CS Game.csproj".
Then, obviously, your solution in VS Express will be screwed up. Simply click on the Game.CS (should say something like missing resource), look in its properties, and browse to the new filename. This is why the .csproj is easier to change- I actually haven't been able to change where VS nor TX2D look for the .txproj file.
Hopefully this all makes sense, please feel free to post if you have questions and I'll do my best. And maybe someone at GG will be SOO impressed that a user is answering questions they'll start browsing this part of the forum again.
#3
The filename change seems to have stopped the node generator crashing.
C# still isn't noticing the new files (level and graphic) that have been put in the directories by the game builder. (In the plain starter kit they appeared in the solution explorer without any outside help) Is there a setting somewhere that deals with this issue? Is it a C# issue or a Torque issue?
Any further pointers would be appreciated......
07/13/2009 (2:28 am)
Thanks so much for that!The filename change seems to have stopped the node generator crashing.
C# still isn't noticing the new files (level and graphic) that have been put in the directories by the game builder. (In the plain starter kit they appeared in the solution explorer without any outside help) Is there a setting somewhere that deals with this issue? Is it a C# issue or a Torque issue?
Any further pointers would be appreciated......
#4
07/13/2009 (6:54 am)
I believe it's actually an issue with the PSK demo, because as you noticed everything else seems to update just fine. I'm not sure about a fix, but I'll tinker with it tonight- I encourage you to do the same, I doubt I'm any better with VS/TX than you are, I just happen to know how to fix those 2 errors.
#5
In Visual Studio, right click your project then..
add file >> existing file(click the drop down to show all)
You'll then need to right click on the newly shown files in your project and select properties. Then set that they compile or they're content type, and to copy them on newer.
I think this is really crappy in VS way to handle the filesystem, but maybe that's because I'm an Eclipse guy.
07/13/2009 (8:18 am)
When adding in new data content, levels/images/etc. You need to import them into Visual Studio for your project to display them. In Visual Studio, right click your project then..
add file >> existing file(click the drop down to show all)
You'll then need to right click on the newly shown files in your project and select properties. Then set that they compile or they're content type, and to copy them on newer.
I think this is really crappy in VS way to handle the filesystem, but maybe that's because I'm an Eclipse guy.
#6
I'm really suprised GG isn't fixing it or even acknowledging it(at least as far as I have seen). I'm sure they've got their hands full with TX3D but TX2D needs a little love as well.
07/13/2009 (1:58 pm)
You normally shouldn't have to import stuff in to VS when you add it to TXB. For the first half of my game that I've been working on TXB makes VS update the files if you add a new resource. That's what contentnodegenerator does. It seems a lot of people are having this problem. When you change either the game.txproj or the game.csproj it stops the contentnodegenerator from crashing, but it messes up the whole process of TXB updating VS's resources.I'm really suprised GG isn't fixing it or even acknowledging it(at least as far as I have seen). I'm sure they've got their hands full with TX3D but TX2D needs a little love as well.
#7
To fix PSK:
Since the XACT project will expect the sounds to be in their respective folders, that structure has to be maintained. So...
***EDIT*** The Platformer Starter Kit does not have this problem since it has no sounds.
07/14/2009 (10:03 am)
The contentnodegenerator problem is caused by having WAV files in the data folder (specifically the sound folder). With the files there, cng tries to do something with them, but does not know how to process WAVs, causing the crash. In this thread I put a more detailed description of how to handle WAVs and imported txscenes so as to avoid this in general.To fix PSK:
Since the XACT project will expect the sounds to be in their respective folders, that structure has to be maintained. So...
- In the Solution Explorer, click the Content project within the Game project (NOT the game project itself; they are separate projects). This is the item that is probably labeled Content (data).
- From the VS Project menu at the top, select Show All Files. This command works as a toggle.
- In the Solution Explorer, find the four ghosted folders inside the sound folder. Select all four, right click and select Include In Project.
- Click Show All Files from the Project menu again to hide any other ghosts.
- Again in the Solution Explorer, expand all four folders inside the sound folder.
- Select all sound files. Tip: You can click the top one, shift click the bottom-most one, then control-click the folders in between so only files are selected. This highlights all, as long as all folders are expanded.
- Right-click one of the highlighted files and select Properties
- In the Properties window, select the following two items:
- Build Action -> None
- Copy to Output Directory -> Do not copy
- Build the solution.
***EDIT*** The Platformer Starter Kit does not have this problem since it has no sounds.
#8
Thanks so much for all the responses.
Demo is now working properly..... excellent!
Thanks again!
07/16/2009 (3:49 am)
WOW!Thanks so much for all the responses.
Demo is now working properly..... excellent!
Thanks again!
#9
07/16/2009 (10:50 pm)
Awesome! Thanks Scott. I hope GG is paying you for all your help with these forums.
#10
04/03/2010 (8:26 am)
Thanks Scott.
Torque Owner Anthony Ross
The ability to easily add game resources in the builder and have them added to the C# project automatically is going to be missing however.
Can anyone help me fix this.