Game Development Community

Game with Torque from scratch in C++

by Erik Gustavsson · in Torque Game Engine · 09/21/2003 (8:13 am) · 6 replies

Hi!
I have been looking for some tutorial on how to make the most basic code using Torque. What headers to use? I posted in the getting started area on the forums and noone answers. Are everyone scripting their entire games or what? I'm definetly never gonna do that, since I need all the speed I can get.

Thanks

#1
09/21/2003 (9:52 am)
I dont think scripting specific parts of the game is a bad thing. Look at Half-Life or Quake. Those both use a scripting engine to some extent, and they run fine.

Now, if you're thinking that everyone is going to simply create a Mod of the initial download, that's not 100% true. I'm working with a few of the scripts from the original download, and adding on from there.

I have the GUI representation, the Key Binds, and the initial server connection scripts (make the server stuff).
#2
09/21/2003 (10:16 am)
The trick is to use scripting for the parts of the engine that need flexibility and native code (ie, C++) for the parts that need efficiency.

Case in point: you render a triangle maybe a quarter million times a second. This would be foolish to script. However, it would be reasonable to script the movement of an object made of these triangles, because that only needs to be updated thirty times a second or so.

As a rule of thumb, script is 10-100x slower than C++. However, if you're only spending 10% of your time executing script, this isn't a big deal.
#3
09/22/2003 (3:55 am)
Well... WHat should I do then? Modify the demo source?
#4
09/22/2003 (9:36 am)
Yes. There is no "basic starting point" for Torque. You can rip things out and replace them as you see fit.
#5
09/29/2003 (2:05 pm)
Generally, what Ben said is how I'm tackling my Torque project. I would like to get to the point of replacing all script, as I'm not sure if GG wants me releasing a game that's based mostly upon their included Realm Wars script. But for now, to get things up and going for fast prototyping and to test core engine changes, I use scripting.

Scripting is great because you can test on the fly; A lot of the times you can just reinitial stuff without having to exit the game engine at all. Though when testing core player functionality, I haven't figured out yet how to cleanly reload that. :)
#6
09/30/2003 (6:53 am)
@David: Just a quick aside - GG doesn't care. :) RW's scripts are already accessible to anyone who wants them.