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 5 Game Play

3 Game Play Two key components of game play: Goals –tasks are provided to allow player to achieve goals Dramatic Tension –obstacles that player must overcome to achieve goals

4 Game Play Lab 2: "emaga5" Changes are applied to emaga4 to create emaga5 Changes add game play features Changes require modest reorganization of modules

5 Game Play control/main –Loads preset variables –Initiates server and client initialization –Activates the client package

6 Game Play control/client/client –Launches the server locally –Initiates client connection activity –Invokes the client menu –Stub routines

7 Game Play control/server/server –Creates the server instance –Starts the game running –Handles game-related messages from clients –Creates player avatars –Handles client connections

8 Game Play control/client/interfaces/playerinterface –Displays the view of the 3D world –Contains HUD controls –Draws the on-screen cross-hair

9 Game Play control/client/misc/screen –Contains control code for various GUI screens –Playerscreen & loadscreen –Provides handlers that operate when the screens are displayed and hidden

10 Game Play control/client/misc/presetkeys –Key bindings for user inputs –PlayerKeyMap is used for player in- game movement and control inputs –GlobalActionMap is used for all other inputs (in menus, option screens, etc)

11 Game Play server/players/player –Defines the player object completely through its datablock –Encompasses datablock methods that describe player object behaviors –Defines class methods

12 Game Play control/server/weapons/weapon –Contains helper methods for generic weapon object behaviors –Hooks into the inventory system

13 Game Play control/server/weapons/crossbow –Similar to player datablock module –Defines crossbow weapon properties, methods, and related objects –Defines crossbow particle objects –Defines crossbow state machine

14 Game Play control/server/misc/item –Contains general code used to pick up and create in-game items like powerups –Contains datablock definitions of specific items

15 Game Play Testing emaga5 –Explore game world –Collect coins –Avoid computer-controlled opponents –Kill opponents with crossbow –Crossbow needs ammo –Use first-aid kits to restore health –Energy is depleted when in motion

16 Summary Creating games with Torque means manipulating objects using many built-in script functions Namespaces define the context for variables, providing flexibility in variable naming schemes Datablocks are key script objects—defined on the server, their contents are sent once per session

17 Summary Control script modules are used to control the progress and gameplay aspects of a game Client control modules handle user interface and player input functions Server control modules usually handle most gameplay features In multiplayer games, server control modules must handle all gameplay features in order to help prevent cheating Player, weapon, and vehicle module are key gameplay modules


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

Similar presentations


Ads by Google