Giter VIP home page Giter VIP logo

flare's Introduction

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.

flare's People

Contributors

alpharlee avatar raduschirliu avatar anandp1 avatar dylanleclair avatar alanayy avatar fan-lo avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.