Just bought the SDK..What now??
by Pao Hang · in Torque Game Engine · 04/09/2003 (3:31 pm) · 2 replies
Ok, I just bought the SDK yesterday. After looking over it, I am still not understnading how to build a game for it. Perhaps someone can enlighten me. I understand building the models and bringing them into the engine thru a mod.
1.)Are all games that are built for the TGE only mods? Unless I go into the engine code and modify it there. Right?
2.)As with RW, is that game a mod of the demoEngine?
3.)Can I do all network coding thru scripts?
Thanks in advance.
Pao Hang
1.)Are all games that are built for the TGE only mods? Unless I go into the engine code and modify it there. Right?
2.)As with RW, is that game a mod of the demoEngine?
3.)Can I do all network coding thru scripts?
Thanks in advance.
Pao Hang
About the author
Torque Owner Jared Schnelle
1) If you choose to only change things in script, then in effect you are creating a mod. I personally use the scripts provided to learn the syntax of the script commands, and to get an idea of what certian things are used for. I highly suggest learning the C++ side of it. (See number 3).
2) Realm Wars has engine changes. For example, hand to hand combat code was added in C++. It may have been possible to create some sort of hand to hand combat in script, but it'd be slower, and not a very good coding decision.
3) In regards to networking, you can do commandToServer and commandToClient from the script, to achieve some of your networking needs, and this is 100% ok if you only use script; however, if you choose to change the engine code, you'll want to change network settings in the code. Run a search for
GameConnection::writePacket
GameConnection::readPacket
ShapeBase::packUpdate
ShapeBase::unpackUpdate
ShapeBase::writePacketData
ShapeBase::readPacketData
These are some of the primary network commands in the C++ engine.
The first set transmits from client to server, and from server to client.
The second set transmits from server to client, but only for objects you are not controlling
The third set transmits from server to client, but for only the object you are controlling.
So, if there are 15 vehicles in a game, and you're controlling one of those, you'd perform 14 unpackUpdates and 1 readPacketData on your client machine.
Hope this clarifies some :)