3D Game Programming All in One- P10

3D Game Programming All in One- P10: During the past several years while working on the Tubettiland “Online Campaign” software and more recently while working on the Tubettiworld game, I figure I’ve received more than a hundred queries from people of all ages about how to get started making games. There were queries from 40-year-olds and 13-year-olds and every age in between. Most e-mails were from guys I would estimate to be in their late teens or early 20s. | Server Control Modules 177 client this the avatar will have a pointer to its owner s GameConnection object spawnPoint where to put it Update the camera to start with the player 100 Give the client control of the player player player function GameConnection OnDeath this sourceObject sourceClient damageType damLoc Switch the client over to the death cam and unhook the player object. if IsObject IsObject Death 0 if damageType Suicide sourceClient this else good hit Server commands function ServerCmdToggleCamera client co if co co toggleCameraFly else co Team LRN 178 Chapter 5 Game Play observerFly co function ServerCmdDropPlayerAtCamera client if Server DevMode IsObject EditorGui 0 0 0 function ServerCmdDropCameraAtPlayer client 0 0 0 function ServerCmdUse client data .use data stubs function ClearCenterPrintAll function ClearBottomPrintAll The first function in this module OnServerCreated is pretty straightforward. When called it loads all the specific game play modules we need. After that comes StartGame which is where we put stuff that is needed every time a new game starts. In this case if we have prescribed game duration then we start the game timer using the Schedule function. Schedule is an extremely important function so we ll spend a little bit of time on it here. The usage syntax is event Schedule time reference command The function will schedule an event that

Không thể tạo bản xem trước, hãy bấm tải xuống
TÀI LIỆU MỚI ĐĂNG
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.