Let’s Learn 12. Packaging a Game Saengthong School, June – August 2016

Slides:



Advertisements
Similar presentations
How to install the Zelle graphics package
Advertisements

Not? it Ready or Here comes.. Here it comes. Module 3: Creating a Windows ® Installer Package.
Best Western Green Bay CHEMS 2013 INSTALL OPTIONS.
Unreal Mod Installer Matthew Sable 8/16/2015. Before We Begin Make sure that your mod works under Unreal 2004 v and that client machines are patched.
taskbar Notification area Start To change size of taskbar: RMC- uncheck Lock the taskbar Changing Properties : RMC- Properties.
SAG Infotech Private Limited Soft solutions for those can not afford to make errors. How to Update New changes in Our Softwares?
One to One instructions Installing and configuring samba on Ubuntu Linux to enable Linux to share files and documents with Windows XP.
Tutorial 11 Installing, Updating, and Configuring Software
ICP Kit 2011 HHC Data Entry Module The World Bank ICP Kit Training African Development Bank.
Mail merge I: Use mail merge for mass mailings Perform a complete mail merge Now you’ll walk through the process of performing a mail merge by using the.
Batch File Basics Automate repetitive computer processes Friday, March 12, 2014 Presented by Thomas Redd, STS, Granite School District.
Project Deployment IT [211 CAP] How to convert your project to a full application.
1 Getting Started with C++. 2 Objective You will be able to create, compile, and run a very simple C++ program on Windows, using Visual Studio 2008.
Lesson No: 6 Introduction to Windows XP CHBT-01 Basic Micro process & Computer Operation.
Tool Install How to download & install Java 6 & Eclipse updated version based on Dr. G. L. Ray’s slides.
Programming for GCSE 1.0 Beginning with Python T eaching L ondon C omputing Margaret Derrington KCL Easter 2014.
Introduction to Python Lesson 1 First Program. Learning Outcomes In this lesson the student will: 1.Learn some important facts about PC’s 2.Learn how.
CHAPTER 3 (P.49-53) Importing modules + pygame intro.
ENDNOTE Installation Guide. E ENDNOTE ON LIBRARY PAGE ( Scroll down to see download instructions.
How to Install Eclipse Click hereClick here to download Eclipse.
Windows Installation Tutorial NASA ARSET For Python help, contact: Justin Roberts-Pierel
CITRIX REVIEW Presented by Mary Kay Black and Christy Randall.
Getting to Know Your Desktop Icons, Taskbar, Workspace, Window, Notifications, Start and Search.
PROGRAMMING IN PYTHON LETS LEARN SOME CODE TOGETHER!
1 Getting Started with C++ Part 1 Windows. 2 Objective You will be able to create, compile, and run a very simple C++ program on Windows, using Microsoft.
Learn R Toolkit D Kelly O'DayInstall & SetupMod 1 - Setup: 1 Module 1 Installing & Setting Up R Do See & HearRead Learn PowerPoint must be in View Show.
1. Starting 1 Let’s Learn Saenthong School, January – February 2016 Teacher: Aj. Andrew Davison, CoE, PSU Hat Yai Campus
Let’s Learn 3. Modules Saenthong School, January – February 2016
Windows Installation Tutorial NASA ARSET For Python help, contact: Justin Roberts-Pierel
4. If Statements 1 Let’s Learn Saenthong School, January – February 2016 Teacher: Aj. Andrew Davison, CoE, PSU Hat Yai Campus
Upgrade on Windows 7. DownloadSoftware Download Software from link provided in Webliography: e/
9. Media (sound effects, music, video) Let’s Learn Saengthong School, June – August 2016 Teacher: Aj. Andrew Davison, CoE, PSU Hat Yai Campus
5. Animation Let’s Learn Saengthong School, June – August 2016 Teacher: Aj. Andrew Davison, CoE, PSU Hat Yai Campus
Reference: What is it? A multimedia python library – Window Management – Graphics geometric shapes bitmaps (sprites) – Input Mouse Keyboard.
Perform a complete mail merge Lesson 14 By the end of this lesson you will be able to complete the following: Use the Mail Merge Wizard to perform a basic.
What type of project? I tried three type of project and the only one I managed to obtain the results I wanted was this one. It is more flexible and much.
4. If Statements 1 Have your program make choices. Depending on a test have a program do different things Computer Programming BSc in Digital.
Microsoft Word 2016 Lesson 1.
Development Environment
MET4750 Techniques for Earth System Modeling
Let’s Learn 2. Installing Pygame
8. Installing Pygame
How to use Borland C with DOSBox in Window 7 (64-bit)
17. Packaging a Game.
9. Drawing Let's Learn Python and Pygame
5. Loops Let's Learn Python and Pygame
4. If Statements Let's Learn Python and Pygame
HOW TO INSTALL AOL DESKTOP GOLD
Microsoft Word 2010 Lesson 1 Word Lesson 1 presentation prepared by Kathy Clark (Southside H.S. IT Academy Teacher at Chocowinity, NC). Content from Microsoft.
What are variables? Using input()
Let's Learn Python and Pygame
Module 1: Getting Started with Windows 95
Automating reports with Python
13. Sprites Let's Learn Python and Pygame
8. Starting Pygame Let's Learn Python and Pygame
An Installation Guide of PGP on Windows 2000
6. Lists Let's Learn Python and Pygame
Let's Learn Python and Pygame
BSc in Digital Media, PSUIC
7. Functions Let's Learn Python and Pygame
Let’s Learn 7. Sprites Saengthong School, June – August 2016
What are variables? Using input()
Windows Installation Tutorial
Macrosystems EDDIE: Getting Started + Troubleshooting Tips
More to Learn Creating a shortcut
What are variables? Using input()
University of Warith AL-Anbiya’a
Macrosystems EDDIE: Getting Started + Troubleshooting Tips
SAG Infotech Private Limited
Presentation transcript:

Let’s Learn 12. Packaging a Game Saengthong School, June – August 2016 Teacher: Aj. Andrew Davison, CoE, PSU Hat Yai Campus E-mail: ad@fivedots.coe.psu.ac.th 12. Packaging a Game

Outline What does Packaging Mean? cx_Freeze The Invaders Game Again setup.py for Invaders

1. What does Packaging Mean? 1. Create an executable (.exe) file for your game, which the user only has to double-click on to start no need to download & install python no need to start IDLE or run python from the command prompt 2. Create an installer (.msi) file for your game which installs the executable automatically the player only has to download a single MSI file from you

2. cx_Freeze The cx_Freeze package can convert a Pygame program into an executable, and also an installer. Website: https://sourceforge.net/projects/cx-freeze/ Docs: http://cx-freeze.readthedocs.io/en/ latest/overview.html Mailing list: https://sourceforge.net/p/cx-freeze/ mailman/cx-freeze-users/ But, for Python 3.5 on Windows, you need cx_freeze v5.0 at: https://github.com/sekrause/cx_Freeze-Wheels

Installing cx_Freeze Download the wheel file (.whl) for 32-bit or 64-bit Python (look back at part 2) e.g. cx_Freeze-5.0-cp35-cp35m-win32.whl Install it into Python using pip: pip install cx_Freeze-5.0-cp35-cp35m-win32.whl

3. The Invaders Game Again Use cx_Freeze to create an executable and installer for the Invaders game.

Create a setup.py File cx_Freeze uses a setup.py file to combine all of the game parts (code, images, music, fonts), pygame, and python into an executable you must write setup.py The contents of setup.py can vary a lot depending on what python modules you are using use my setup.py in the Invaders/ folder as a starting point for your own games

Using setup.py python setup.py build this creates the executable it prints lots of information and error messages python setup.py bdist_msi this creates the installer from the executable

Building the Executable The "build" command creates a build/ folder, which contains an executable folder called exe.win32-3.5/ In the executable folder is invaders.exe Double click to run game

Building the Installer The "bdist_msi" command creates a dist/ folder, which contains the installer file called Invaders-0.1-win32.msi Send only this file to a user Double-click to install the invaders executable.

Installing the Game Double-click on the MSI file. It asks where to install the invaders/ folder, and then takes 10-30 secs to install it.

The invaders/ folder is installed on the desktop, and a shortcut to the executable is also added to the desktop. Double click to run game

Uninstalling the Game There is no uninstaller feature. But the user can easily uninstall the game by deleting the invaders/ folder and shortcut

4. setup.py for Invaders The "build" parts of setup.py: from cx_Freeze import setup, Executable import os pygamePath = os.environ['LOCALAPPDATA'] + \ "\\Programs\\Python\\Python35-32\\Lib\\site-packages\\pygame\\" target = Executable( script = "invaders.py", base = 'Win32GUI', icon = "Apathae-Satellite-2-Games.ico", # from http://www.iconarchive.com/ ) Change this to match your game.

Change this stuff to match your game. game fonts, setup( name="Invaders", author = "Andrew Davison", version = "0.1", description = "Simple Space Invaders clone", options={ "build_exe": { # build_exe_options "packages":["pygame"], "excludes": ["tkinter", "tcl", "numpy"], "silent": True, "include_files":["Orbitracer.ttf", "startScreen.jpg", "background.jpg", "player.png", "alien.png", "alienExploSheet.png", "exploSheet.png", "arpanauts.ogg", "boom.wav", "explode.wav", "fire.wav", (pygamePath+"libogg.dll", "libogg.dll"), (pygamePath+"libvorbis.dll", "libvorbis.dll"), (pygamePath+"libvorbisfile.dll", "libvorbisfile.dll"), ] # force cx_freeze to include OGG DLLs from Pygame }, "bdist_msi": bdist_msi_options, executables = [target] ) Change this stuff to match your game. game fonts, pictures, music, sounds and 3 OGG DLLs

Folder Contents for Invaders The 3 OGG DLLs will be copied from the Pygame folder by cx_freeze

The "bdist_msi" parts of setup.py: shortcut_table = [ ("Invaders", # Shortcut "DesktopFolder", # Directory_ "Invaders", # Name "TARGETDIR", # Component_ "[TARGETDIR]\invaders.exe",# Target None, # Arguments None, # Description None, # Hotkey None, # Icon None, # IconIndex None, # ShowCmd "TARGETDIR", # WkDir ) ] msi_data = {"Shortcut": shortcut_table} bdist_msi_options = {'initial_target_dir': r'[DesktopFolder]\invaders', 'data': msi_data} For creating the invaders.exe shortcut For creating the invaders/ executable folder on the desktop