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

Using website and plugin interoperability


The Panda3D web plugin allows you to deeply integrate your games with the website they are embedded in. Using JavaScript in the website, code from outside of the plugin can access values and call functions implemented in Python. This also works in the opposite direction, as code running within the plugin may make calls to JavaScript or access the document tree defined by the website's markup.

This opens many possibilities for interesting mashups between games and web technology. Automatically setting a player's name within your game based on login data, showing toast notifications when achievements are unlocked or posting status updates and screenshots to social networking sites using their JavaScript APIs. These are just a few of the many interesting things you could do using this feature of the Panda3D web plugin. But always keep in mind the security issues involved, especially with accessing personal information or login information!

Getting ready...