Book Image

Panda3D 1.7 Game Developer's Cookbook

Book Image

Panda3D 1.7 Game Developer's Cookbook

Overview of this book

Table of Contents (20 chapters)
Panda3D 1.7 Game Developer's Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Reading input data from a network


In this recipe you will learn how to remotely control an actor by sending commands over a network. This is a very common usage scenario in AI simulations, for example. In many of these simulations one central server program is used for visualizing the current simulation state. Each of the simulated entities is processed on a dedicated computer that connects to the server to send commands for altering the state of the simulation.

The following instructions will teach you how to build such a setup using Panda3D. The client part of this application will send text strings to the server side. The server will then interpret these strings as movement commands for an actor placed in a simple scene.

Getting ready

To be able to complete this recipe, you need to set up a new project according to the steps presented in the Chapter 1 article Setting up the game structure. Additionally, you need the FollowCam class from the recipe Making the camera smoothly follow an object...