TDN Platformer Tutorial
by Adam Larson · in Torque Game Builder · 10/11/2005 (8:49 pm) · 55 replies
For those of you waiting for the 1.02 version of the platformer tutorials, here is an update.
I added 1.02 compatibility to the first article of the platformer tutorial on TDN. The first article was the only real show stopper for use with the current T2D version, so only minor tweaks should be necessary to get the rest of the code working. I'll add the specifics in the coming days.
Also, I am a horrible artist, so if there's anyone out there that wants to help out by providing some art, let me know. Since these tutorials are mainly code based, it's not imperative that I get good art. But, it would give a much better initial impression of the tutorials if they looked good. Specifically, I need a tile set for the sample levels and a character with run, jump, and dieing animations.
Any comments, suggestions, or critiques on the tutorials are welcome and encouraged. My goal is to reach a feature and quality level fit for a starter kit and I can't get there without feedback.
I added 1.02 compatibility to the first article of the platformer tutorial on TDN. The first article was the only real show stopper for use with the current T2D version, so only minor tweaks should be necessary to get the rest of the code working. I'll add the specifics in the coming days.
Also, I am a horrible artist, so if there's anyone out there that wants to help out by providing some art, let me know. Since these tutorials are mainly code based, it's not imperative that I get good art. But, it would give a much better initial impression of the tutorials if they looked good. Specifically, I need a tile set for the sample levels and a character with run, jump, and dieing animations.
Any comments, suggestions, or critiques on the tutorials are welcome and encouraged. My goal is to reach a feature and quality level fit for a starter kit and I can't get there without feedback.
About the author
#42
Thanks for the help. Okay, now when it runs the player shows up in the middle of the screen, however there's no level. I put an echo statement into both the createCamera and createLevel functions. It creates the camera perfectly, but no level.
***Edit***
Okay, instead of having the schedule for the create level i just said regular createLevel and left createCamera scheduled. It works almost perfect now, except for some jumping and falling bits.
Thanks alot for your help.
11/05/2005 (7:01 am)
@AdamThanks for the help. Okay, now when it runs the player shows up in the middle of the screen, however there's no level. I put an echo statement into both the createCamera and createLevel functions. It creates the camera perfectly, but no level.
***Edit***
Okay, instead of having the schedule for the create level i just said regular createLevel and left createCamera scheduled. It works almost perfect now, except for some jumping and falling bits.
Thanks alot for your help.
#44
T2D/client/player.cs (16): Unknown command setCollisionResponse.
I just purchased/downloaded the installer yesterday, so I'm guessing it should really be the fx...2D style instead of t2d... style?
Maybe this tut corresponds with HEAD, not the latest installer? It would probably be good if it was stated clearly which version the tut works on at the top of each tut. In any event a noob has no chance of getting anywhere with these issues.
11/05/2005 (7:54 pm)
I still can't seem to get this tutorial to work. It seems the datablock names have changed. t2dImageMapDatablock don't exists and should be fxImageMapDatablock2D? I tried changing the names of stuff but now get this error and others:T2D/client/player.cs (16): Unknown command setCollisionResponse.
I just purchased/downloaded the installer yesterday, so I'm guessing it should really be the fx...2D style instead of t2d... style?
Maybe this tut corresponds with HEAD, not the latest installer? It would probably be good if it was stated clearly which version the tut works on at the top of each tut. In any event a noob has no chance of getting anywhere with these issues.
#45
Also, I have a link a couple of posts up for a download of the code working in the current T2D release.
11/05/2005 (8:07 pm)
You're right about the fx..2D stuff. The setCollisionResponse problem is only available in the newest (unreleased) version of T2D. I'm sorry for all of the confusion that this is causing, I really shouldn't have posted any of this stuff until the new T2D is released. I actually had a warning in the second tutorial talking about the version stuff. It's gone because I was going to move it to the first tutorial (overview) but never did. I'll do that now.Also, I have a link a couple of posts up for a download of the code working in the current T2D release.
#46
11/05/2005 (8:16 pm)
Now that I look at the history of the article I see what happend and think I understand better. Prior to the Oct 30 change, you did have explanation of 1.02 vs HEAD. Since the installer is still 1.02 that info still seems relevant. Now I realize I need to CVS HEAD or try to make progress with the previous article in the history.
#47
11/05/2005 (8:21 pm)
Adam it's all great stuff. I'm glad it's up there now. I just got tripped up a bit on which version and assumed wrong. Having it stated in the overview will clear it up nice. Thanks for such a good job.
#48
11/15/2005 (10:11 am)
So.... I can't actually get the tutorial to work until the new version of T2D is released?
#49
11/15/2005 (8:28 pm)
Hey Adam thanks for the tutorial! Regardless of version the framework really has helped me learn a ton!
#50
11/29/2005 (3:54 pm)
What is the setCollisionResponse replacement then???
#51
You can download the alpha version from your product-downloads and find it in the documentation there. The call though, allows you to specify what autonomous response you want T2D to make (if any). You can use the modes that were previously only used for the "world-limit" such as sticky, clamp (default), bounce, rigid, kill and custom.
Hope this helps,
- Melv.
11/30/2005 (12:11 am)
Steve,You can download the alpha version from your product-downloads and find it in the documentation there. The call though, allows you to specify what autonomous response you want T2D to make (if any). You can use the modes that were previously only used for the "world-limit" such as sticky, clamp (default), bounce, rigid, kill and custom.
Hope this helps,
- Melv.
#52
Thanks!!
11/30/2005 (1:05 pm)
I appreciate the reply, but it has not helped me any. How do you get the same effect that setCollisionResponse created? Like If my object hits something, have it CLAMP or BOUNCE? Do you do this instead on the OnCollision call? If so, how would I go about applying the "CLAMP" effect?Thanks!!
#53
You're talking about "setCollisionResponse()" in the past tense but this is the new call that allows you to specify what collision response you'd like as detailed in the documentation that comes with the alpha. As I say, If you look in the documentation, you will see it.
If you're asking what the algorithm is for these reponses then you can easily locate it in the code in the "t2dPhysics::resolveXXXXXCollision" where XXXXX is Clamp/Bounce etc.
- Melv.
12/01/2005 (2:23 am)
I'm confused by what you mean exactly. Reading your post again, you seem to be asking about a replacement for the new "setCollisionResponse()" call?You're talking about "setCollisionResponse()" in the past tense but this is the new call that allows you to specify what collision response you'd like as detailed in the documentation that comes with the alpha. As I say, If you look in the documentation, you will see it.
If you're asking what the algorithm is for these reponses then you can easily locate it in the code in the "t2dPhysics::resolveXXXXXCollision" where XXXXX is Clamp/Bounce etc.
- Melv.
#54
12/01/2005 (12:25 pm)
Ahhh!! I reversed them in my mind. I've been using the Wiki tutorials with the old version and I thought I had the new version and the tutorial was out of date, and that in the new version the SetCollisionResponse was removed. My fault :) Thanks for clearing that up!!!
Torque Owner Adam Larson