Updated Shooter Game Tutorial for TGB 1.7.3
by Seth Willits · in Torque Game Builder · 05/17/2008 (12:13 am) · 22 replies
Good grief. Took me all day today and several hours yesterday.
tdn.garagegames.com/wiki/TGB/BasicTutorial1
tdn.garagegames.com/wiki/TGB/BasicTutorial1
About the author
http://www.sethwillits.com/
#2
05/17/2008 (7:10 am)
Awesome, Seth! Brings back some good Early Adopter memories.
#3
05/17/2008 (7:19 am)
Looks good.
#4
I've added a link to this on the tutorials page.
05/17/2008 (9:22 am)
Thanks for taking the time to update the tutorial. I was planning on updating the shooter tutorial myself to match the new behavior shooter demo but this is a fine substitute. :)I've added a link to this on the tutorials page.
#5
05/18/2008 (5:43 pm)
Thanks for doing this! Is there also a PDF version or other handy format somewhere?
#6
05/18/2008 (5:46 pm)
No, the tutorial only exists on the wiki.
#7
05/21/2008 (11:13 pm)
There was a tiny little typo bug that I corrected (IIRC in lesson 4)... It was "Eenemy" instead of "Enemy". Great tutorial by the way. Anyone adding paths to the tutorial soon?
#8
I did have one question, I followed the tutorial and everything seems to be working fine.
I did notice that when I hit the spacebar to fire the missle the player ship goes up some.
Has anyone else see this and know how to fix it?
06/06/2008 (3:01 pm)
Thanks for updating the tutorial. I am trying to get back into this stuff and this helps.I did have one question, I followed the tutorial and everything seems to be working fine.
I did notice that when I hit the spacebar to fire the missle the player ship goes up some.
Has anyone else see this and know how to fix it?
#9
06/06/2008 (3:03 pm)
I haven't seen that, and it doesn't make any sense either. I suppose your code could accidently be moving the ship. You could start commenting code out and figure out which lines trigger it.
#10
If you can't find some simple bug where you're actually changing the position of the ship, check your collision setup. That sort of thing can happen if you're spawning something that will collide but not react on top of another object. The missile comes in and the collision system resolves the collision by moving the player and missile away from each other.
06/06/2008 (9:20 pm)
@TravisIf you can't find some simple bug where you're actually changing the position of the ship, check your collision setup. That sort of thing can happen if you're spawning something that will collide but not react on top of another object. The missile comes in and the collision system resolves the collision by moving the player and missile away from each other.
#11
06/07/2008 (9:41 am)
Thanks for the feedback. I figured out I had left the physics receive and send checked on. Thanks again!
#12
06/26/2008 (7:17 am)
Great tutorial, thanks for keeping it up to date Seth. The space shooter tutorial was my first real introduction to scripting.
#13
On another note: It would be useful if all of the tutorials noted for which version they were made as I have found multiple copies of this tutorial some obviously from earlier versions. (I think it's great the posts call me a student it makes me feel young and carefree again)
01/11/2009 (11:06 am)
One small point the reference to the demo code, in the "tutorial notes" section, points to the resources only. Anyone know where the code can be found for the full game? I have used this on TGB 1.7.4 without problem and adapted it for use with my students. Thanks!On another note: It would be useful if all of the tutorials noted for which version they were made as I have found multiple copies of this tutorial some obviously from earlier versions. (I think it's great the posts call me a student it makes me feel young and carefree again)
#14
01/11/2009 (12:08 pm)
So pleased! I've found the demo. Silly me! the links in the tutorial are just switched round. The demo is for 1.7.2 so I'll update it. Saved writing it from scratch. I do hate repeating work.
#15
On a side note, Davey Jackson and Michael Blenden have encouraged me to make video tutorials to help instructors and students with learning TGB. Keep tabs on my .plans to look for updates.
01/11/2009 (1:16 pm)
@Andrew - Who doesn't hate repeating work? Unfortunately, I have to repeat tutorials multiple times per engine release to make sure they still work. Much like I'm doing for Torque 3D, I am going to rewrite TGB's documentation and tutorials from scratch and only use the most up to date existing tutorials.On a side note, Davey Jackson and Michael Blenden have encouraged me to make video tutorials to help instructors and students with learning TGB. Keep tabs on my .plans to look for updates.
#16
01/14/2009 (11:35 am)
@Michael - I would be happy to be part of a team checking and updating tutorials for new engine releases. I have to do this anyway for those that I use with my students. Ref your side note: how do I see .plans? This new site is difficult to navigate. I had to email GG to find this thread as the link and searching did not work.
#17
01/14/2009 (11:42 am)
@Michael - sorry to bother you again but I've just tried the link at the top of the page to the tutorial and of course it doesn't work. Is there anywhere to report broken links etc.? I've read a number of the blog comments and it would be nice if the GG team responded to some of this particularly with what they propose to do and when. Apart from Games my primary area of expertise is in HCI and this site currently breaks a few basic rules. I assume that this is a work in progress.
#18
I am taking your tutorial as a lesson to make games and I really wanted to know...how do you put your score in your game? do you use the behaviors = scorePoints.cs + displayScore.cs or do you code in the scripts folder....because with the spawn style in your game it´s impossible to use the bahavior = scorePoints.cs the line :
function ScorePointsBehavior::onRemoveFromScene(%this, %scenegraph)
{
%counter = %this.counter.getBehavior("DisplayScoreBehavior");
if (!isObject(%counter))
return;
$currentScore = $currentScore + %this.pointValue;
%counter.updateScore();
}
with 5 ships + 10 points each one...at the very start of the level I get 50 points and shooting others I don´t more than this...as if at the very start it´s counting 50 points and not more!
could you give me a little help here...I know how to code in C but there are some functions for me in TGB that i´ve never seen before! and the documentation really sucks!
07/29/2009 (8:45 pm)
Hi my friend !Thaks for your wonderfull tutorial! REALLY!!!I am taking your tutorial as a lesson to make games and I really wanted to know...how do you put your score in your game? do you use the behaviors = scorePoints.cs + displayScore.cs or do you code in the scripts folder....because with the spawn style in your game it´s impossible to use the bahavior = scorePoints.cs the line :
function ScorePointsBehavior::onRemoveFromScene(%this, %scenegraph)
{
%counter = %this.counter.getBehavior("DisplayScoreBehavior");
if (!isObject(%counter))
return;
$currentScore = $currentScore + %this.pointValue;
%counter.updateScore();
}
with 5 ships + 10 points each one...at the very start of the level I get 50 points and shooting others I don´t more than this...as if at the very start it´s counting 50 points and not more!
could you give me a little help here...I know how to code in C but there are some functions for me in TGB that i´ve never seen before! and the documentation really sucks!
#19
I was trying to use the asteroid tutorial but not very lucky here!
I apreciate your online tutorial!
07/29/2009 (8:49 pm)
if it not be too much to ask....how do you make the ship invincible for a short time after exploding?I was trying to use the asteroid tutorial but not very lucky here!
I apreciate your online tutorial!
#20
at the same time you would schedule a function that sets the variable back so you can be hurt again.
07/30/2009 (12:42 am)
you would set a variable on it that tells you that it is invincible. while that is set, you just ignore all damage caused to it.at the same time you would schedule a function that sets the variable back so you can be hurt again.
Torque 3D Owner Kenneth Holst
Default Studio Name