Game Development Community

Newbie intro

by Markus Wahlgren · in Torque Game Builder · 09/07/2005 (7:30 am) · 9 replies

Hi guys!
First post on the board so here we go...

Stats: Markus from Stockholm, Sweden, 28 y.o. Webmaster and web marketer.

I got Torque2D a copuple of days ago, and I have completed the Basic tutorial, and it's working, except the sky isn't full but I read about that in a post.

I am a complete newbie when it comes to programming so expect to see some n00b posts from me in the future. First I was overwhelmed by the coding, I thought it was more WYSIWYG editor style, like GameMaker. Anyway I have some great ideas for games and I intend to learn this, even if it's a steep learning curve in the beginning.

I added one thing to the tutorial space scroller, and that is the ability for the ship to rotate. Not very useful at this stage but I felt very proud when I figured it out :)
And oh, I turned the ship into a frog that I made in Acrylic.

A couple of questions:
I have an idea that uses similar gameplay to Zuma and the likes, but it's not a copycat version of it.

Anyway, using the space scroller tutorial example - how would I get the missiles to fire in the same direction as the ship is tilted?

This is the code I made for the ship to turn:

function playerRound()
{
//Set the player moving Round
$player.setAngularVelocity(180);
}
function playerRounda()
{
//Set the player moving Round back by Markus
$player.setAngularVelocity(-180);
}
function playerRoundStop()
{
if ($player.getAngularVelocity()>0)
$player.setAngularVelocity(0);
function playerRoundaStop()
{
if ($player.getAngularVelocity()<0)
$player.setAngularVelocity(0);


I will have more dificult questions later on, no doubt. Like if I want the frog/ship to fire balls that add up in a pile on a specific place?

I also have almost no idea about tiles, and how to make a map but I'll check the tut's before asking.

BTW Is it common to give away your game ideas here? Or do you guys keep them for yourself?



Thanks guys, these forums are great.

#1
09/07/2005 (8:13 am)
Hi, I just joined up two days ago and finished the tutorial as well. Everything seemed to work except the tile map only filled 60% of the screen. Where did you see a post about this? Zuma was one of my favorite games and I have wanted to develop something like this. Looking into it, though, I found that there are quite a few Zuma clones out there. See Atlantis, Luxor (really good), and Tumblebugs at gamehouse.com for examples. Atlantis and Luxor seem to be something that T2D could do - Tumblebugs seems to be a 3D implementation that requires more work. All of those games have some pretty good graphics....

Anyway, time to get a .plan started!

Steve
#2
09/07/2005 (9:19 am)
Hi Steve,

Glad to hear from more newbies here, maybe we can help eachother out.

The tile map issue is a known "bug" as it was designed for an earlier version of T2D than the one we have, see these posts:

http://www.garagegames.com/mg/forums/result.thread.php?qt=31537
and
http://www.garagegames.com/mg/forums/result.thread.php?qt=30677


Yes, I have seen and tried the Zuma clones, but I will not make a clone. There are similarities however. I want the player to be spinning around and shooting balls, just like zuma, that's to start with. But then the game play is different.

Talk to you later

Markus
#3
09/07/2005 (2:48 pm)
If you want to shoot the missile in the same direction then first you'll need to find the direction.

%direction = $player.getRotation();

Then you'll need to make a differnt call to set the missile's velocity.

%projectile.setLinearVelocityPolar(%direction,10);

Try that out and have fun!

-Peter
#4
09/07/2005 (4:01 pm)
@Peter: very eloquently put.
#5
09/07/2005 (6:18 pm)
Another beginner here, so don't mind me if I'm talking out of my rear end... I'm a little curious why you assign the $player.getRotation() to a variable first. Wouldn't it work doing this:

%projectile.setLinearVelocityPolar( "$player.getRotation(), 10" );
#6
09/07/2005 (6:28 pm)
Nothing the matter with that at all, it's simply a matter of style. Of course, I'm assuming that you put the quotes in for emphasis...they actually don't belong there. Should look like:

%projectile.setLinearVelocityPolar( $player.getRotation(), 10 );
#7
09/07/2005 (7:50 pm)
N/m, there was a question here, but nothing I couldn't figger out during a shower.
#8
09/08/2005 (10:24 pm)
Thanks for helping me getting started. I tried the code and it works. Only thing it's start position is firing straight up instead of straight forward from it's cannon. I have tried a lot to get it right but I'm stuck on this simple thing....
#9
09/09/2005 (11:17 am)
Try sticking this between my two lines of code.

%direction += 90;

If its shooting behind you then change the + to a -. Hope that helps.

-Peter