So I now have Torque... and lots of questions...
by Merak Spielman · in General Discussion · 08/27/2009 (12:45 pm) · 19 replies
My buddy Chris Sullivan and I have finally gotten his license reactivated and gotten the latest version of TGEA. He's worked on several games in the past and is the better programmer, but has grown to hate it, so is letting me get into the guts while he focuses on production and design. Our third partner is going to work on modeling and art. That should be a fine trio to get a decent demo out in a year... :)
My current assignment is to dissect the engine as best I can and figure out what it's doing so I can start on the framework for our game.
I'm a novice programmer... I can read the code, but can't see what it's all doing in my head. I look through the source for the Stronghold game, for instance, and recognize functions, loops, new data types... any individual thing I can dissect, but I can't seem to grasp the guts of the thing.
I hear that learning TorqueScript is important, and hey I'm always game to learn something new. But as I browse through the project, I don't see any TorqueScript to mess around with! Where is it hidden?
It looks fairly easy to modify terrain and import models/textures. But then I'll have a static world full of objects just sitting around, not doing anything. The scripts are what tell things how to behave, yes? I see an orc running around the demo, and I see his path, but where's the script telling him to follow that particular path?
I feel like I'm on the verge of understanding this, but I need some hints and pointers (<-pun!).
I suppose you'll be able to help better if I give some specific questions... they aren't necessarily related to my end goal, but will help me know where to look to change certain categories of things.
Where would I find the information on how high my character can jump and how fast he moves? I thought I found it in player.cpp (the block with maxForwardSpeed = 10.0f;), but changing the numbers didn't do anything, even when I changed them to 1.0f.
Where would I find the camera location/angle? It should be a simple matter to project the camera to be looking over the character's shoulder, for instance, or to allow zoom in-out functionality, but I can't find it.
Where is the information for interpreting input devices? If I wanted to re-code different default controls, or add new controls attached to my own functions, where would I do it?
When the player runs over ammo, it knows to add ammo. There is obviously some sort of script attached to the ammo object so when it detects a collision with the player it runs the appropriate functions, makes the object vanish, and adds ammo to the player. Where is that script and how do I access it?
I appologize for these very basic questions. I feel like all I need is a bit of a nudge before I can take off and start doing something real with TGEA.
We're planning on starting up a devblog of our project in the next month or two so I'll definitely post that here for you guys to follow, if you want. We're under the delusion that we've hit on an MMO idea that's actually new. :P
My current assignment is to dissect the engine as best I can and figure out what it's doing so I can start on the framework for our game.
I'm a novice programmer... I can read the code, but can't see what it's all doing in my head. I look through the source for the Stronghold game, for instance, and recognize functions, loops, new data types... any individual thing I can dissect, but I can't seem to grasp the guts of the thing.
I hear that learning TorqueScript is important, and hey I'm always game to learn something new. But as I browse through the project, I don't see any TorqueScript to mess around with! Where is it hidden?
It looks fairly easy to modify terrain and import models/textures. But then I'll have a static world full of objects just sitting around, not doing anything. The scripts are what tell things how to behave, yes? I see an orc running around the demo, and I see his path, but where's the script telling him to follow that particular path?
I feel like I'm on the verge of understanding this, but I need some hints and pointers (<-pun!).
I suppose you'll be able to help better if I give some specific questions... they aren't necessarily related to my end goal, but will help me know where to look to change certain categories of things.
Where would I find the information on how high my character can jump and how fast he moves? I thought I found it in player.cpp (the block with maxForwardSpeed = 10.0f;), but changing the numbers didn't do anything, even when I changed them to 1.0f.
Where would I find the camera location/angle? It should be a simple matter to project the camera to be looking over the character's shoulder, for instance, or to allow zoom in-out functionality, but I can't find it.
Where is the information for interpreting input devices? If I wanted to re-code different default controls, or add new controls attached to my own functions, where would I do it?
When the player runs over ammo, it knows to add ammo. There is obviously some sort of script attached to the ammo object so when it detects a collision with the player it runs the appropriate functions, makes the object vanish, and adds ammo to the player. Where is that script and how do I access it?
I appologize for these very basic questions. I feel like all I need is a bit of a nudge before I can take off and start doing something real with TGEA.
We're planning on starting up a devblog of our project in the next month or two so I'll definitely post that here for you guys to follow, if you want. We're under the delusion that we've hit on an MMO idea that's actually new. :P
#2
My next question is simply... why do the scripts not show up in the Visual Studio Solution for the game? It seems like it would be easier to work with them if they showed up alongside all the source code.
I know I can just ADD them to the solution so all my project files at least appear to be right there together, but why isn't it set up that way by default?
08/27/2009 (1:38 pm)
OK, so that's where they're hiding. Thanks! I'll go screw them up and see what happens. :DMy next question is simply... why do the scripts not show up in the Visual Studio Solution for the game? It seems like it would be easier to work with them if they showed up alongside all the source code.
I know I can just ADD them to the solution so all my project files at least appear to be right there together, but why isn't it set up that way by default?
#3
http://www.garagegames.com/products/torsion
Download the demo you will be happy :)
08/27/2009 (2:00 pm)
Hey Merak, I usually don't like to promote software but I think you should check out torsion. I find it a lot better for working in script then using Visual Studio. http://www.garagegames.com/products/torsion
Download the demo you will be happy :)
#4
I manage just fine with a free text editor called Crimson Editor -- there are lots of alternatives. Anything with line numbers and that let's me change the background color to something other than white is good enough for me.
08/27/2009 (2:07 pm)
Using Visual Studio for script editing is a little bit excessive... although you gotta love the speed of it's "Find in files" :)I manage just fine with a free text editor called Crimson Editor -- there are lots of alternatives. Anything with line numbers and that let's me change the background color to something other than white is good enough for me.
#5
OK, I'm trying to trace the simple "maxForwardSpeed" variable through the project. Maybe I'll get a bit of insight from this.
It appears that when I edit the data in the script it propogates into the game without requiring any sort of recompile. That means somewhere in the program it's being told to read data from this script, but that the script itself is not part of the solution. OK.
I see that maxForwardSpeed is part of the struct PlayerData. (player.h)
It is defined as a F32 data type, which means a 32-bit float. (player.h)
It is assigned a value of 10.0f in the constructor for PlayerData. (player.cpp)
There is a static initPersisFields function in the struct PlayerData. This function calls something called AddField, which passes maxForwardSpeed as an argument to a function of the ConsoleObject class...
At this point I think I'm going to need to start drawing a flowchart...
This is helping. But it's starting to feel an awful lot like work. :P
08/27/2009 (2:27 pm)
I just like to work on everything in one place. Maybe when I'm more certain of what I'm doing I'll start using different apps for editing different files...OK, I'm trying to trace the simple "maxForwardSpeed" variable through the project. Maybe I'll get a bit of insight from this.
It appears that when I edit the data in the script it propogates into the game without requiring any sort of recompile. That means somewhere in the program it's being told to read data from this script, but that the script itself is not part of the solution. OK.
I see that maxForwardSpeed is part of the struct PlayerData. (player.h)
It is defined as a F32 data type, which means a 32-bit float. (player.h)
It is assigned a value of 10.0f in the constructor for PlayerData. (player.cpp)
There is a static initPersisFields function in the struct PlayerData. This function calls something called AddField, which passes maxForwardSpeed as an argument to a function of the ConsoleObject class...
At this point I think I'm going to need to start drawing a flowchart...
This is helping. But it's starting to feel an awful lot like work. :P
#6
08/27/2009 (2:35 pm)
Just a suggestion, but if you ever want to discuss source code you should log onto the site with the account that has the license.
#7
08/27/2009 (2:43 pm)
and post the discussion in the appropriate forums..
#8
Is it ok that our team has just one license?
08/27/2009 (3:04 pm)
ok, I'll do that. I'm new and don't know the protocol. Sorry.Is it ok that our team has just one license?
#9
08/27/2009 (3:12 pm)
This is the account with the license. I'll try to use it from now on. I suppose I can see why you have it set up this way, sorry it didn't occur to me.
#10
It is non transferable between people unless you pay the "Commercial" price tag for that ability (+then still having to buy the engine license aswell) :
I think this makes things hard for the little guys trying to get something made, but I can see why GG does it this way (more sales, protecting their IP, etc :D).
Because for example if you buy the engine, and then recruit a programmer, you need to buy them a copy too so that it is registered to their name, and well if they end up not working out. You are out the money for a license. This is tough for "hobbyists".
08/27/2009 (3:48 pm)
Only the owner of the license is allowed to have access to the source code. It is non transferable between people unless you pay the "Commercial" price tag for that ability (+then still having to buy the engine license aswell) :
I think this makes things hard for the little guys trying to get something made, but I can see why GG does it this way (more sales, protecting their IP, etc :D).
Because for example if you buy the engine, and then recruit a programmer, you need to buy them a copy too so that it is registered to their name, and well if they end up not working out. You are out the money for a license. This is tough for "hobbyists".
#11
08/27/2009 (3:50 pm)
The License is pretty specific, anyone that has access to the source code has to have a license.. so if your handling 100% of the source code then you only need one license. but if your artist buddy also has a copy of the source code( even if the artist doesnt use it) He needs one too.. Alot of folks use whats called a SVN where the Team leader can define access to certain folders.. so the artist would only have access to the exe folder and not the other source code.
#12
If he doesn't touch it, am I ok? I'm not really in a financial place where I can afford more licenses (heck, in reality, we're little more than 3 unemployed guys with a bright idea and a bunch of notes.
Our artist isn't using the engine... the plan is for him to do concept art and then modeling with Blender, so we can get our demo up.
I know most people would just fudge it and say Chris was doing the coding but I have a tendency to shoot myself in the foot with naive honesty... So now I have this fine pickle. :(
So in a nutshell, here's the question:
Chris, ex-programmer, holder of TGEA license brings me, Merak, on board. He wants to pass off the programming to me while staying on as producer/director/designer. Since there is only one person using the code, is it all right for us to hold only one license?
(it's really no small matter to me because we're hoping to publish this thing one day, in which case we have to have done everything 100% legit or we're screwed.)
08/27/2009 (4:21 pm)
Well crap. I want to stay legit, but I can't afford another license. Chris doesn't use his anymore, since he's gotten sick of programming, so he was bringing me on as programmer for this project.If he doesn't touch it, am I ok? I'm not really in a financial place where I can afford more licenses (heck, in reality, we're little more than 3 unemployed guys with a bright idea and a bunch of notes.
Our artist isn't using the engine... the plan is for him to do concept art and then modeling with Blender, so we can get our demo up.
I know most people would just fudge it and say Chris was doing the coding but I have a tendency to shoot myself in the foot with naive honesty... So now I have this fine pickle. :(
So in a nutshell, here's the question:
Chris, ex-programmer, holder of TGEA license brings me, Merak, on board. He wants to pass off the programming to me while staying on as producer/director/designer. Since there is only one person using the code, is it all right for us to hold only one license?
(it's really no small matter to me because we're hoping to publish this thing one day, in which case we have to have done everything 100% legit or we're screwed.)
#13
08/27/2009 (4:43 pm)
un fortunatly thats the bad news, that license is non transferable, its what keeps the cost as low it is. compared to other engines. Its why its 300 bucks vs 1500 for similar engines. Now i do know some folks that do what your doing.. but they do get a license. I have actually had to kick a person from my team becuase i gave them a 7 day notice after i found out they were not using their own license, and such. So, yah it sucks. But thats how the license is written. There are ways around it, but legal stuff is sticky.
#14
I agree that, overall, $300 isn't a whole lot. Not if you're serious about what you're doing. But there's not a lot of disposable income here...
I'll tell Chris he's back on programming for the time being.
08/27/2009 (4:53 pm)
Looks like I'm a victim of my own honesty then. Again. I'll see what I can do to save up for my own license.I agree that, overall, $300 isn't a whole lot. Not if you're serious about what you're doing. But there's not a lot of disposable income here...
I'll tell Chris he's back on programming for the time being.
#15
08/27/2009 (5:00 pm)
you can still script legit xD
#16
08/27/2009 (5:09 pm)
yes that you can still do legitly..
#17
08/27/2009 (5:37 pm)
i would recommend picking up one of the excellent texts located here http://www.garagegames.com/products/browse/books and spend a few minutes reading the EULA that comes with the engine that indicates what you can or cannot do with chris's license. I beleive you are permitted to access and use torque script as you please (the .cs files) but not the source (.cpp or .h files)
#18
Thanks for the info, guys. I'll get some practice in scripting while I figure out how to get the money saved up.
08/27/2009 (6:22 pm)
Well that's something at least. But I still want to program. I'm gonna have to find a way to save up. After all, if I actually figure out what I'm doing, and make a nice game, I want to be able to take credit for that and be an upstanding community member. Even if I did fudge it off Chris' license, what's the point of doing a lot of hard work in his name?Thanks for the info, guys. I'll get some practice in scripting while I figure out how to get the money saved up.
#19
08/27/2009 (6:26 pm)
You will go far our young Padawa...
Associate Michael Hall
Distracted...
There's a keybind toggle for both of these. See "../scripts/client/default.bind.cs", more specifically the functions toggleFirstPerson and toggleZoom. Your camera look angles/FOV/etc will be set in the player datablock. It's a one-line change in game.cs in order to start in 3rd person.
default.bind.cs
"../server/scripts/..." weapon.cs to give some class methods which fall back to item.cs which in turn are controlled from inventory.cs.