Game Development Community

Already having problems.

by Jason Hutchins · in Torque 2D Beginner · 11/21/2016 (10:02 pm) · 8 replies

Here we go. This is how things usually go whenever I attempt to learn a programming
language or software that's new and challenging for me.
I've always wanted to make games & also have this inexplicable hunger to program
(which is quickly subdued for reasons exactly like what I am complaining about here
today). But although I'm far from stupid, my brain just
does not seem to function in this super-logical way. I'm a musician (right-brained to
the max), and although I do plan on collaborating in that capacity with someone who
really is a programmer, I am occasionally overwhelmed with an
intense desire to really learn coding for myself, specifically as it applies to game
development. Got some ideas, y'know? Just some 2d pixelated RPG w/ roguelike elements
and an elaborately developed environment full of varied cultures with their own
histories and mythologies...something you can really sink your teeth into.

Anyway, I thought with Torque I'd hit on something, so I looked into it & decided to
download & see if I could learn it. But god damn if the first, and I mean the very
FIRST trivial, inconsequential thing I try to do doesn't meet with frustration.
I more or less randomly chose the "Animated Sprites" tutorial from the Interface
Tutorials>Feature section. And the first thing you do after naming & creating the
project is drag and drop the two images directly from the HTML tutorial page into the
editor. That's what's supposed to happen. It does not. I can grab the image, drag it,
and a little plus sign even appears as I'm hovering over the workspace, but when I
release it it vanishes. I keep trying & trying and the stupid thing can't be dragged
into it. Now there's only one step involved so far, and it has gone awry. This is
why I wouldn't pay for it - the very first simple thing I try to do fails.

I apologize, it's hard to keep a good attitude at times. I could've told you this
would happen. Seems like in general nothing works the way it's supposed to anymore.
Anyway, what could the solution be? I'm curious, and haven't quite given up on
the whole thing YET.

How hard is the scripting language to learn. It's based on C++, is it as difficult as
C++? If so, I'm wasting my time because that kind of language is just beyond me. I
can almost wrap my head around JavaScript or VB if I really work at it - do I have a
prayer here?

About the author


#1
11/22/2016 (9:47 am)
Quote:This is how things usually go whenever I attempt to learn a programming
language or software that's new and challenging for me.
You are not alone. Most developers go through this, so don't be hard on yourself. Happened to me as recently as this past April, despite having years of development experience. Picking up new tech is not easy.

Quote:I more or less randomly chose the "Animated Sprites" tutorial from the Interface
Tutorials>Feature section.
So you are using this tutorial: Animated Sprites

So you are using the old Torque Game Builder version? The bad news is that version of Torque 2D was discontinued, so the software will have bugs. I remember the drag and drop feature for image assets did break just before the engine was decommissioned. Something at the platform level needed updating.

Quote:How hard is the scripting language to learn.
Easier than some, harder than others. It all depends on your past experience and how you learn languages. I think TorqueScript, while it has some quirks, is fairly easy to learn. What makes it difficult is this website is the only place you are going to get TorqueScript specific info and help. It's a proprietary language.

Now, for the curveball. As I mentioned before, Torque Game Builder was deprecated. No one is actively developing it. Instead, the new Torque 2D MIT became the primary 2D engine. That engine is hosted on GitHub.

In many ways, Torque 2D MIT is a superior engine. The only thing TGB had over it was a set of editors. T2D MIT is almost entirely code driven. A few folks have created some editors for it, but nothing on the level of TGB. I would pick T2D MIT over TGB any day, but some folks need editors.

I'll still be happy to answer any questions you have about TGB, T2D, or coding in general.
#2
11/22/2016 (2:21 pm)
Torque Game Builder was deprecated...

Hi thanks for answering. While acknowledge that I may not be using, or attempting to use I should say, the absolute most current program version, this is the one that they're letting me download & use for free so I'm kinna stuck with it I think. And I'm certainly not too good for deprecated software since I'm a mere beginner. Hell, I've yet to even make any headway on the issue in my earlier post.
The answer you gave seemed to me to indicate that if I was going to continue to use this version, I'd need to find another way to get the 2 images into the editor since this version has problems accommodating drag & drop operations. I put both images into the directory that is created in step one, expecting to simply open them from inside the application. But uh, nope. There's no "import" function in any of the menus. Nor is there even a simple general "Open" that I could use to open a box & then navigate to them. This would have to be a very common action in a multimedia application such as this. Yet here we are.
My God, you have got to be kidding me! Please, for the love of Pete's sake, there has to be a way to get these 2 image files into the program so I can do the tutorial.

I am almost certain this Torque thing is not worth pursuing. But there's something about it I like, I really want to give it a fair shot.
If you know the secret, would you please share it with me. I swear this is driving me crazy.

Gratefully,

Jason

#3
11/22/2016 (2:35 pm)
Quote: they're letting me download & use for free

1. Who is "they"?
2. Torque 2D MIT is free

Quote:There's no import function in the menus
Half right. Look at this tutorial.

There is an import image button.
#4
11/22/2016 (2:39 pm)
Ah I figured it out, it was "Create a New ImageMap" under "Project". Awesome, thanks anyway.
#5
11/22/2016 (4:17 pm)
Glad you figured it out. I'm still curious about the whole "they're letting me download & use for free." Sounds rather ominous.
#6
11/24/2016 (4:52 pm)
Garagegames, Inc. That's the version they let people download. Or the one I stumbled upon anyway. Say, while I have your attention again, I'm really liking Torque, but I'm up against a wall again here. I'm on the Fish tutorial now, and can't get it to swim across the screen using a class. and I'm halted at the part where you link the graphic to FishClass. When I do this via code below and by putting the word "FishClass" in the Class box under "Scripting" (then save both of course), the fish doesn't move when I run it. But it will if I go directly to XVelocity under "Physics" and enter a number there. What did I do wrong?
I noticed that in the tutorial, where it says, "You should see:

//---------------------------------------------------------------------------------------------
// Torque 2D
// Copyright (C) GarageGames.com, Inc.
//---------------------------------------------------------------------------------------------

//---------------------------------------------------------------------------------------------
// startGame
// All game logic should be set up here. This will be called by the Scene Editor when you
// select "Run Game" or by the startup process of your game to load the first scene.
//---------------------------------------------------------------------------------------------
function startGame(%level)
{
   // Set The GUI.
   Canvas.setContent(mainScreenGui);
   Canvas.setCursor(DefaultCursor);
   
   moveMap.push();
   
   if( isFile( %level ) || isFile( %level @ ".dso"))
      sceneWindow2D.loadLevel(%level);
}

//---------------------------------------------------------------------------------------------
// endGame
// Game cleanup should be done here.
//---------------------------------------------------------------------------------------------
function endGame()
{
   sceneWindow2D.endLevel();
   moveMap.pop();
}
...INSTEAD of that, there is a line above MoveMap.push() that says
new ActionMap(moveMap);

...and also at the end of the endGame function instead of moveMap.pop(); mine says moveMap.delete();
--why does my program source differ from the tutorial thta came with it?

I'm liking Torque. I think it's perfect for me. Do you it's as good a tool for RPGs as it is for platformers though?

Thanks,
Jason
#7
11/24/2016 (5:03 pm)
just realized the code I posted wouldn't make the fish go, but just so you know, I am actually putting in the code the tutorial says to
#8
11/25/2016 (10:08 am)
@Jason - I edited your post to use the code tags (edit your post to see how I used them). It makes it easier to decipher your code.

Quote:Do you it's as good a tool for RPGs as it is for platformers though?
I've used it to make several things over the years, all kinds of genres.

Quote:why does my program source differ from the tutorial thta came with it?
It was probably outdated when the code you are using was modified in an update.

Quote:When I do this via code below and by putting the word "FishClass" in the Class box under "Scripting" (then save both of course), the fish doesn't move when I run it. But it will if I go directly to XVelocity under "Physics" and enter a number there.
I'm not sure without seeing your console log or knowing if you have done all the previous steps. Which fish tutorial are you using? There are a couple of different ones.