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

Sending high scores to a server


In this recipe we are going to take a look at the very basics of implementing a feature that allows us to submit scores to a server that processes and stores the data we are sending. Additionally, we will be able to view the list of submitted scores using a web browser.

The server side of this project will be implemented using the Twisted framework (http://twistedmatrix.com). The libraries contained in Twisted make it very easy to implement servers and clients for all kinds of common and custom network protocols. For our purpose, we are going to implement a little custom web server that will accept POST requests for submitting data and will serve the static scoreboard page.

It is important to note that there are several other Python frameworks like Twisted available. Tornado (http://www.tornadoweb.org) and Diesel (http://dieselweb.org) are just two examples of network programming frameworks similar to Twisted. All of them have their upsides and downsides, but...