We'll be using one of the very convenient features of Notepad++, Find and Replace, to fix some of the file paths in our files.

  1. Create a new folder on the C: drive and name it SuicideJockeys.
  2. Copy the most up-to-date versions of all of our Python files into the new folder.
  3. Remove the underscores and numbers from the ends of the files that have them.
  4. Close any and all open files in Notepad++. Then open, all of the files in the SuicideJockeys folder in Notepad++.
  5. Press Ctrl+F on the keyboard to open the Find window. Select the Replace tab. In the box labeled Find what: type ../Models, and in the box labeled Replace with: type Models. Then, click the Replace All in All Opened Documents button. This will change all of the paths for loading models in all of the files.
    Time for action - packing a Panda3D game
  6. Repeat step 5 to change all the paths to the Fonts, Images, and Sound folders.
  7. Go through the open files one-by-one and remove all underscores and numbers from the import lines, because we removed them from our files.
  8. In WorldClass.py remove the line that imports DirectStart.
  9. Save and close all of the open files.
  10. Notepad++ should open a new blank document once all the files are closed. If not, create a new blank document.
  11. Type this code into the new document, which will serve as the launcher for our game:
    import direct.directbase.DirectStart
    from WorldClass import *
    w = World()
    run()
    
  12. Save the new file in the SuicideJockeys folder with the name main.py.
  13. Copy the Images, Fonts, Models, and Sound folders from the BGP3D folder to the SuicideJockeys folder.
  14. From the BGP3D/Extras folder copy installer.bmp and icon.ico to the SuicideJockeys folder.
  15. Navigate to the folder C:\Panda3D-1.6.2\etc and open the file config.prc. Look for a line with the word fullscreen, and change that line to look like this. That will cause the game to load in fullscreen mode by default.
    fullscreen 1
    
  16. Open a Windows command prompt and navigate to the folder C:\Panda3D-1.6.2\bin. Type this line into the command prompt and hit enter.
Time for action - packing a Panda3D game