Presentation is loading. Please wait.

Presentation is loading. Please wait.

3D Game Programming All in One By Kenneth C. Finney.

Similar presentations


Presentation on theme: "3D Game Programming All in One By Kenneth C. Finney."— Presentation transcript:

1 3D Game Programming All in One By Kenneth C. Finney

2 Chapter 4 Game Programming

3 Game Programming Torque Script –Strings Tagged and standard types Formatting codes –Objects Methods and properties –Namespaces Local, global, object, & arbitrary –Datablocks Static data sent from server to clients

4 Game Programming Game Structure –root main module in game root folder –Common code folder Code that will not change much between project –Control code folder Define the game Control game play Manage game resources

5 Game Programming scripts common control data game root

6 Game Programming Server vs. Client design issues –Server-side: authentication game play decisions & scoring resources –Client-side: interfaces setup navigation

7 Game Programming common Functionality –Authentication –Messaging –In-game editors –Debugger –Lighting –Help –User interfaces

8 Game Programming Lab 1: "emaga4" –Build a bare bones simulation –Launch a server –Connect client locally (part of same system process) –Load a mission –Spawn player avatar –Provide minimal player movement

9 Game Programming root main module –Generic initialization –Command line parsing –Help package –Invokes packages and add-ons

10 Game Programming control main –Load control packages & modules –Control initialization

11 Game Programming control/initialize –Initialize server –Initialize client

12 Game Programming control/client –Create key bindings –Define 3D view callback –Define 3D view interface –Create avatar motion hooks –Stub routines to handle unused calls from common code

13 Game Programming control/server –Contains code to run when server starts –Handles client connection to server –Creates client's player avatars –A couple of stub routines

14 Game Programming control/player –Contains definition of player datablock –Defines player creation/destruction methods

15 Summary Strings are enclosed in double-quotes ("), tagged strings are in single-quotes(') Tagged strings reduce network loads, transmit once, then use a reference number Torque Script supports objects with properties and methods, using the dot operator Namespaces help manage variable names and usage Datablocks are used to carry data for game objects from the server to clients

16 Summary Organize your game scripts in ways that make sense to you and your team Splitting the control scripts and the common code is a good idea, build on that For multiplayer games, put cheat-sensitive code on the server, all else on the client


Download ppt "3D Game Programming All in One By Kenneth C. Finney."

Similar presentations


Ads by Google