Game Development Community

Need help understanding file structure and functionality.

by Thales Kruger Rizzotto · in Torque 3D Beginner · 05/08/2016 (7:39 pm) · 3 replies

All right, i read a lot of the Torque 3D documentation, and by that i mean really A LOT, however i still can't get my mind around it, i mean, how does this engine even works, there's no explanation anywhere, do i really have to open every C++ file and read everything there to understand how things work and relate to each other?

What files do what? Where is the actual function that makes the player move forward?

Can someone shine a light on this?

About the author

Recent Threads


#1
05/09/2016 (5:55 am)
1) There are more active users on the forums at http://forums.torque3d.org/

2) The "actual function that makes the player move forward" is (I believe) in MoveManager. Do you need to change it? Or are you just looking for it as a learning exercise? The way to start looking for these things is to realize that many global script variables are defined on the engine side (as is mentioned in the documentation). For instance, $mvForwardAction is defined in moveManager.cpp - you take the script global name ($mvForwardAction) and stript the "$" off to get the engine-side variable name, then search in Visual Studio (ctrl-shift-f by default to search entire solution). If it pops up then it's an engine-side script global variable and is probably defined near its point of intended use.

3) I have added auto-generated source documentation on my site (www.roostertailgames.com) - just look in the sidebar on the right for "Torque 3D Source Reference" and you'll see links for versions 3.7 and 3.8.
#2
05/09/2016 (1:36 pm)
Thanks, i realized that most stuff is in the engine side, and i actually need to change most stuff, like the player movement.
But then, i edited the source code, how do i compile the source?
#3
05/09/2016 (4:09 pm)
You use a compiler. I'd recommend Visual Studio (C++) 2013 Express. Create a project. Change to that project's folder. Run GenerateProjects.bat. Then, look in your project's buildFiles/VisualStudio 2012 folder for your .sln file.

If you're not familiar with compiling source you might want to think carefully about fiddling with the engine-side stuff....