Skip to content

Schulich-Ignite/flare

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

98 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ignite Flare

Welcome to Schulich Ignite Flare! This is our advanced sessions meant for people who are already familiar with the basics (variables, if/else, loops, lists, functions) and interested in learning more. If you're looking for our beginner workshops, take a look here.

Sessions will be using Python with pygame. Our sessions will be using Visual Studio Code (VS Code) as our text editor, but feel free to use any text editor you are comfortable with.

Installation guide

Check out our Session 0 slides for instructions on how to install everything you'll need for our sessions.

main.py

We will be using our main.py file as a template for all the projects in Ignite Flare. Make sure you save this file and keep it in a safe spot, as we will be copying it and using it a few times. This holds some pre-written code that is standard for any project using pygame. You won't need to understand how it works, but we encourage you to try your best to learn how it works anyway! You must have pygame installed first to use this file. See Session 0 for instructions.

Saving main.py on your computer

Unfortunately, GitHub does not offer a simple way to download this file. Instead you must save the contents yourself, by doing the following:

  1. Click on this file: main_COPY_AND_RENAME.py. Hint: Right click and choose "Open in new tab" so you can keep reading these instructions!
  2. Right-click and choose "Save as". Save the file somewhere safe and easy to remember.

Using main.py

When you start a new project, do the following:

  1. Create a new folder and give it a name (like example).
  2. Copy the file main_COPY_AND_RENAME.py and paste it inside the example you created.
  3. Rename your copied version of main_COPY_AND_RENAME.py to main.py
  4. Open your text editor. Any text editor works, but the following instructions are written for VS Code.
    1. In VS Code, select File -> Open Folder.
    2. Select the example folder you created.
  5. Run the code. You should only see a blank, black screen.
    • In VS Code, you can press the green Play button.
    • Alternatively, you can use a terminal or command line:
      • Windows: Type py -3 main.py
      • Mac: Type python main.py
  6. Start coding! Feel free to add to or edit any code you see inside main.py.

Note: If you search online for other pygame tutorials, you may find slight variations on the main.py file. They all roughly do the same thing. If you want to learn more in detail, you can check out the official pygame docs.

About

This is our public repository where you can find files and instructions

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages