Game Development Community

General coding guide

by J. Alan Atherton · in Torque Game Engine · 03/19/2003 (2:39 pm) · 1 replies

Alright, I'm starting to get the hang of this engine, but the c code is still a little overwhelming. I just don't know where to look for things I need to change. As a mock situation, let's say I'm trying to make Marble Blast. Where do I need to change the code to get some things working?

Specifically, where do I modify the force applied to the marble as gravity? (i.e. getting one of those gravity-modifiers will switch gravity to a different direction)

Where does the mouse/keyboard input get applied to the marble? Meaning, when I push the 'w' key, where does it say to change the velocity along the forward vector?

Where do I remove the networking code? (since Marble Blast apparently has no multiplayer)

Where do I remove the terrain code?

I'm sure I could eventually figure all this stuff out picking through the code on my own, but a kickstart sure would be nice. I'm not asking for example code... that I can write, I'm just asking for a file/function name.

Thanks...
- J. Alan Atherton

#1
03/19/2003 (2:49 pm)
the Marble is simply a control object.
so here we have something like a player class derived from ShapeBase no doubt.

this object is controlled by a GameConnection instance.

whether or not there is multiplayer is irrelevant to the netcode.
it was Not removed. there is no need.

the engine process' input for the GameConnection this object is the one that does all the work.
if it is single player it just does it backdoor style and doesnt use the NIC,
otherwise it provides it's information to the server

the GameConnection creates the move list
this list is used on the controlled object.
the controlled object defines how it reacts to the movelist
(velocity n stuff)

Edit :
terrain , they prolly just deleted from the mission
and Im not sure if the editor crash bug from lack of terrain is fixed or not. not to big of deal to fix if it isnt.