Torque 2D Getting Started Video Series
by Michael Perry · in Torque 2D Beginner · 02/12/2013 (10:14 am) · 39 replies
Hey everyone. In an effort help newcomers out, I quickly whipped together a simple getting started video series for Torque 2D. It's mostly unscripted, with zero post-production. In other words, they are rough videos, but hopefully the content is useful to everyone:
Part 1
Part 2
Part 3
Part 4
Part 5
Part 6
Part 7
If you find simple mistakes or have constructive feedback on the videos in general, please feel to reply directly to this thread with your comments. If you have a more complex reply or a problem that is code specific, create a new thread detailing the problem. Then reply to this thread with a link to your post.
Part 1
Part 2
Part 3
Part 4
Part 5
Part 6
Part 7
If you find simple mistakes or have constructive feedback on the videos in general, please feel to reply directly to this thread with your comments. If you have a more complex reply or a problem that is code specific, create a new thread detailing the problem. Then reply to this thread with a link to your post.
About the author
Programmer.
#2
02/12/2013 (10:41 am)
A good suggestion. I'll make that change in a bit. Thanks Simon.
#3
02/12/2013 (10:46 am)
Thank you for this getting started series.
#4
02/12/2013 (10:51 am)
@Bolohan - You are most welcome =)
#5
02/12/2013 (3:11 pm)
Just finished all 7 videos. great job. convinced me to do all my prototyping in the sandbox.
#6
02/13/2013 (3:44 am)
Thanks
#7
1. What could I have done to improve the video tutorials themselves? Louder microphone? Quieter typing? Better resolution?
2. What other video tutorials would you want to see?
02/13/2013 (5:24 am)
Glad you guys are enjoying the videos. Now that you have had a chance to view them, I have two questions.1. What could I have done to improve the video tutorials themselves? Louder microphone? Quieter typing? Better resolution?
2. What other video tutorials would you want to see?
#8
02/13/2013 (5:33 am)
Also, all video tutorials should be listed on our wiki: Torque 2D Wiki: Video Tutorials. Once the wiki is open for public editing, I highly encourage other video creators to place their links there so others can find them.
#9
02/14/2013 (12:36 am)
Can you make tutotrial how to create a basic project?.
#10
In terms of improvements, the keyboard + mouse sounds should be reduced.
Also you could make a playlist in Youtube, so that the videos play in order. That's just me being fussy..
Will complete watching them and share further feedback.
02/14/2013 (2:43 am)
@Michael - Posted links to the tutorials in a few locations to spread the word. In terms of improvements, the keyboard + mouse sounds should be reduced.
Also you could make a playlist in Youtube, so that the videos play in order. That's just me being fussy..
Will complete watching them and share further feedback.
#11
02/16/2013 (8:23 pm)
Ok, I do have a request for future videos and their production: Would it be possible to zoom in the size of your window recording to focus on the text editors when you show those parts? I ask because even in 720p it is hard to have Youtube open in one window and read the contents while simultaneously trying to duplicate what I see happening in Notepad++ in a separate window if you use only one monitor. Having to pause and go to full screen and then shrink it back down and type slows me down a lot.
#12
main.cs
mitchScript.cs
module.taml
soccer.asset.taml
The directory where the assets are located is GitHubTorque2D Clone 0217modulesMitchToy1assetsimages
The football image loads if it is in the ToyAssets folder, but if I copy it into the MitchToy folder's assets folder it just says it couldn't render in place of the image and this shows up in the log:
02/17/2013 (5:27 am)
I'm going to double-post to try to get some help with tutorial 6. Everything went smoothly until I reached the point where I tried to move the football asset into my MitchToy module (I named everything Mitch consistently, it's the only thing I did differently). Here are some documents that I hope provide a clue as to why it's not working:main.cs
function MitchToy::create(%this)
{
exec("./scripts/mitchScript.cs");
MitchToy.mySpriteSize = 5;
addNumericOption("Sprite size", 1, 1000, 1, "setMySpriteSize", MitchToy.mySpriteSize, true, "Determines the size of Mitch's sprite");
MitchToy.reset();
}
function MitchToy::destroy(%this)
{
echo("@@@ MitchToy::destroy function called");
}
function MitchToy::reset(%this)
{
SandboxScene.clear();
SandboxScene.setGravity(0, 0);
%size = MitchToy.mySpriteSize SPC MitchToy.mySpriteSize;
// Create a sprite
%position = "0, 0";
%sprite = buildMitchSprite(%position, %size);
// Add to Scene
SandboxScene.add(%sprite);
}
function MitchToy::setMySpriteSize(%this, %value)
{
MitchToy.mySpriteSize = %value;
}mitchScript.cs
function buildMitchSprite(%position, %size)
{
%sprite = new Sprite();
%sprite.Position = %position;
%sprite.Size = %size;
%sprite.Image = "MitchToy:soccer";
%sprite.setBodyType("static");
return %sprite;
}module.taml
<ModuleDefinition ModuleId="MitchToy" VersionId="1" Description="Mitch Toy" Dependencies="ToyAssets=1" Type="toy" ToyCategoryIndex="5" ScriptFile="main.cs" CreateFunction="create" DestroyFunction="destroy"> <DeclareAssets Path="assets" Extension="asset.taml" Recurse="true"/> </ModuleDefinition>
soccer.asset.taml
<ImageAsset
AssetName="Soccer"
ImageFile="soccer.png" />The directory where the assets are located is GitHubTorque2D Clone 0217modulesMitchToy1assetsimages
The football image loads if it is in the ToyAssets folder, but if I copy it into the MitchToy folder's assets folder it just says it couldn't render in place of the image and this shows up in the log:
Quote:Asset Manager: Failed to acquire asset Id 'MitchToy:soccer' as it does not exist.It does the same thing if I leave it as "football" and just change the folder with copy-pasted files.
#13
To:
Note the uppercase 'S'. See if that makes it show up. Second, adding a 't' to my name is known to send me into fits of rage and insanity. Let's avoid that in the future =)
02/17/2013 (5:58 am)
First, change:%sprite.Image = "MitchToy:soccer";
To:
%sprite.Image = "MitchToy:soccer";
Note the uppercase 'S'. See if that makes it show up. Second, adding a 't' to my name is known to send me into fits of rage and insanity. Let's avoid that in the future =)
#14
Sorry about the name misspell ;)
02/17/2013 (6:57 pm)
I might be insane, but those two lines look identical to me. :/Sorry about the name misspell ;)
#15
In your soccer.asset.taml file you have:
and in your variable you wrote:
The case matters.
-Donavan Jones
02/17/2013 (7:57 pm)
Hi Chase Webb,In your soccer.asset.taml file you have:
AssetName="Soccer"
and in your variable you wrote:
%sprite.Image = "MitchToy.socccer";
The case matters.
-Donavan Jones
#16
I would suggest starting another thread and posting a good link to your repo. In the meantime you can go into the root "main.cs" of the Sandbox and turn on the information echo for the asset system, even the module system if you like. That shows all the activity of both those systems. You should be able to find whether your asset is being detected correctly or not (seems like it isn't) but you'll see where the asset system is searching etc.
02/18/2013 (2:53 am)
Not wanting to derail this post but Asset-Ids are not case sensitive or at least they should not be anywhere in the engine as it would provide very little utility. Like TorqueScript its case-insensitive.I would suggest starting another thread and posting a good link to your repo. In the meantime you can go into the root "main.cs" of the Sandbox and turn on the information echo for the asset system, even the module system if you like. That shows all the activity of both those systems. You should be able to find whether your asset is being detected correctly or not (seems like it isn't) but you'll see where the asset system is searching etc.
#17
1. Melv was right about the capitalization. My mind was hung up on an old case-sensitive bug we were experiencing on iOS late last year.
2. Look at your module.taml file. You have <DeclareAssets, instead of <DeclaredAssets. To for the 'd' at the end of Declared.
02/18/2013 (4:19 am)
Ah. Two new things:1. Melv was right about the capitalization. My mind was hung up on an old case-sensitive bug we were experiencing on iOS late last year.
2. Look at your module.taml file. You have <DeclareAssets, instead of <DeclaredAssets. To for the 'd' at the end of Declared.
#18
Anyway, whether the case was the problem or not, I changed it so "soccer" was lowercase in both locations, and still it won't render, with the log giving the same error as always.
How would I turn on the information echo for the asset system? I'm assuming this is some kind of advanced logging that would help me track down my problem?
Here is a copy of my Torque2D clone: https://dl.dropbox.com/u/18965446/Webbstre%20Torque2D%20Clone%20Tutorial%206.zip
One a related note, when you are all fooling around with the engine do you typically put up your work in an online repository? I'm just doing tutorials right now, but when I begin developing my game I definitely don't want the code public. I've got everything backed up into dropbox at the moment.
02/18/2013 (4:54 am)
I wasn't sure whether or not it would be better to seek help within this thread or if I should make a new thread. While it's 99.9999% likely it's my own mistake somewhere, if the problem was that something was missing from the tutorial then I thought it might be more useful here. :/ In the future I'll just make new threads (once this issue is solved).Anyway, whether the case was the problem or not, I changed it so "soccer" was lowercase in both locations, and still it won't render, with the log giving the same error as always.
How would I turn on the information echo for the asset system? I'm assuming this is some kind of advanced logging that would help me track down my problem?
Here is a copy of my Torque2D clone: https://dl.dropbox.com/u/18965446/Webbstre%20Torque2D%20Clone%20Tutorial%206.zip
One a related note, when you are all fooling around with the engine do you typically put up your work in an online repository? I'm just doing tutorials right now, but when I begin developing my game I definitely don't want the code public. I've got everything backed up into dropbox at the moment.
#19
How you share code and files is up to you. A lot of people create GitHub forks for public sharing, so many people can evaluate the code. If you have a project that is private, but you want to get support, posting on GG.com is likely the best route to go.
@Chase - Check my last reply to see what I discovered about your project. The module.taml file you are using has a mistake.
02/18/2013 (5:08 am)
@Chase and All - From now on, if you have a more complex reply or a problem that is code specific, create a new thread detailing the problem. Then reply to this thread with a link to your post.How you share code and files is up to you. A lot of people create GitHub forks for public sharing, so many people can evaluate the code. If you have a project that is private, but you want to get support, posting on GG.com is likely the best route to go.
@Chase - Check my last reply to see what I discovered about your project. The module.taml file you are using has a mistake.
#20
02/18/2013 (7:04 am)
Thanks a lot for these beginner videos. I'll watch them carefully.
Associate Simon Love
Might I suggest appending more precise titles to the videos?
As in "Torque 2D - Getting Started : Setting up Xcode" and so on?
For instance, what if you publish a "Setting up Visual C++" later on, it would be hard to figure out if it's called 'Part 8' when the Xcode example is Part 1.