Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Panda3D 1.7 Game Developer's Cookbook
  • Table Of Contents Toc
Panda3D 1.7 Game Developer's Cookbook

Panda3D 1.7 Game Developer's Cookbook

close
close
Panda3D 1.7 Game Developer's Cookbook

Panda3D 1.7 Game Developer's Cookbook

Overview of this book

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

Implementing performance critical code in C++


While in direct comparison, compiled C++ code performs better than the same code ported to Python, it would be wrong to generally state that the use of the Python interpreter in Panda3D is detrimental to the performance of your game. This would be wrong and utter nonsense, as Python just acts as a simpler interface to the engine's core libraries. Most of a game's code that uses the Python interface of Panda3D consists of calls to the engine's APIs, which are implemented in C++ and simply forwarded by the Python runtime.

While this architecture generally delivers quite acceptable performance, there might be an occasion or two where, after thoroughly profiling and optimizing your Python code, you still might not have reached the performance goals you set for that piece of code. Only if you are sure about there not being any gains possible to achieve anymore should you start thinking about writing a C++ implementation of your code.

This recipe will...

Visually different images
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Panda3D 1.7 Game Developer's Cookbook
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon