3D Game Programming All in One (Course Technology PTR Game Development Series)
The common code base includes a ton of functions and methods. We have only touched on about half of them here. I aimed to show you the most important modules and their contents, and I think that's been accomplished nicely. For your browsing pleasure, Table 7.2 contains a reference to find all the functions in all common code modules.
| Module | Function |
|---|---|
| common/main.cs | InitCommon InitBaseClient InitBaseServer DisplayHelp ParseArgs OnStart OnExit |
| common/client/actionMap.cs | ActionMap::copyBind ActionMap::blockBind |
| common/client/audio.cs | OpenALInit OpenALShutdown |
| common/client/canvas.cs | InitCanvas ResetCanvas |
| common/client/cursor.cs | CursorOff CursorOn GuiCanvas::checkCursor GuiCanvas::setContent GuiCanvas::pushDialog GuiCanvas::popDialog GuiCanvas::popLayer |
| common/client/help.cs | HelpDlg::onWake HelpFileList::onSelect GetHelp ContextHelp GuiControl::getHelpPage GuiMLTextCtrl::onURL |
| common/client/message.cs | ClientCmdChatMessage ClientCmdServerMessage AddMessageCallback DefaultMessageCallback |
| common/client/messageBox.cs | MessageCallback MBSetText MessageBoxOK MessageBoxOKDlg::onSleep MessageBoxOKCancel MessageBoxOKCancelDlg::onSleep MessageBoxYesNo MessageBoxYesNoDlg::onSleep MessagePopup CloseMessagePopup |
| common/client/metrics.cs | FpsMetricsCallback TerrainMetricsCallback VideoMetricsCallback InteriorMetricsCallback TextureMetricsCallback WaterMetricsCallback TimeMetricsCallback VehicleMetricsCallback AudioMetricsCallback DebugMetricsCallback Metrics |
| common/client/mission.cs | ClientCmdMissionStart ClientCmdMissionEnd |
| common/client/missionDownload.cs | ClientCmdMissionStartPhase1 OnDataBlockObjectReceived ClientCmdMissionStartPhase2 OnGhostAlwaysStarted OnGhostAlwaysObjectReceived ClientCmdMissionStartPhase3 UpdateLightingProgress SceneLightingComplete |
| common/client/recordings.cs | RecordingsDlg::onWake StartSelectedDemo StartDemoRecord StopDemoRecord DemoPlaybackComplete |
| common/client/screenshot.cs | FormatImageNumber RecordMovie MovieGrabScreen StopMovie DoScreenShot |
| common/server/audio.cs | ServerPlay2D ServerPlay3D |
| common/server/clientConnection.cs | GameConnection::onConnectRequest GameConnection::onConnect GameConnection::setPlayerName IsNameUnique GameConnection::onDrop GameConnection::startMission GameConnection::endMission GameConnection::syncClock GameConnection::incScore |
| common/server/commands.cs | ServerCmdSAD ServerCmdSADSetPassword ServerCmdTeamMessageSent ServerCmdMessageSent |
| common/server/game.cs | OnServerCreated OnServerDestroyed OnMissionLoaded OnMissionEnded OnMissionReset GameConnection::onClientEnterGame GameConnection::onClientLeaveGame CreateGame DestroyGame StartGame EndGame |
| common/server/kickban.cs | Kick Ban |
| common/server/message.cs | MessageClient MessageTeam MessageTeamExcept MessageAll MessageAllExcept GameConnection::spamMessageTimeout GameConnection::spamReset SpamAlert ChatMessageClient ChatMessageTeam ChatMessageAll |
| common/server/missionDownload.cs | GameConnection::loadMission ServerCmdMissionStartPhase1Ack GameConnection::onDataBlocksDone ServerCmdMissionStartPhase2Ack GameConnection::clientWantsGhostAlwaysRetry GameConnection::onGhostAlwaysFailed GameConnection::onGhostAlwaysObjectsReceived ServerCmdMissionStartPhase3Ack |
| common/server/missionInfo.cs | ClearLoadInfo BuildLoadInfo DumpLoadInfo SendLoadInfoToClient LoadMission LoadMissionStage2 EndMission ResetMission |
| common/server/missionLoad.cs | LoadMission LoadMissionStage2 EndMission ResetMission |
| common/server/server.cs | PortInit CreateServer DestroyServer ResetServerDefaults AddToServerGuidList RemoveFromServerGuidList OnServerInfoQuery |
| common/ui/ConsoleDlg.gui | ConsoleEntry::eval ToggleConsole |
| common/ui/GuiEditorGui.gui | GuiEditorStartCreate GuiEditorCreate GuiEditorSaveGui GuiEditorSaveGuiCallback GuiEdit GuiEditorOpen GuiEditorContentList::onSelect GuiEditorClassPopup::onSelect GuiEditorTreeView::onSelect GuiEditorInspectApply GuiEditor::onSelect GuiEditorDeleteSelected Inspect InspectApply InspectTreeView::onSelect Tree GuiInspector::toggleDynamicGroupScript GuiInspector::toggleGroupScript GuiInspector::setAllGroupStateScript GuiInspector::addDynamicField InspectAddFieldDlg::doAction |
| common/ui/LoadFileDlg.gui | FillFileList GetLoadFilename |
| common/ui/SaveFileDlg.gui | GetSaveFilename DoSACallback SA_directoryList::onSelect SA_filelist::onSelect |
One last thing to remember about the common code: As chock-full of useful and important functionality as it is, you don't need to use it to create a game with Torque. You'd be nuts to throw it away, in my humble opinion. Nonetheless, you could create your own script code base from the bottom up. One thing I hope this chapter has shown you is that a huge pile of work has already been done for you. You just need to build on it.
Категории