PyGame Basics: Keyboard Input

In this guide, we will take a look at a couple ways to gather keyboard input with PyGame. There are a few ways of grabbing keyboard input. The first way to gather keyboard input is via capturing PyGame events. To check if any arrow keys are pressed down on the current update, you can write: for event in pygame.event.get(): if event.type == pygame.QUIT: running = False if event.type == pygame.KEYDOWN: if event....

October 5, 2019 · 2 min · Jared

PyGame Basics: Image Effects

In this guide, we will be taking a look at some different image effects you can use within your PyGame. In the examples below, I will be drawing sample images at x: 480 and y: 128. To learn how to position images, you can take a look at this guide of ours. Scaling Images You can scale images with PyGame using the pygame.transform.scale method. This method, like the other methods part of pygame....

October 3, 2019 · 3 min · Jared

PyGame Basics: Game Loop

In this tutorial, we will be creating the game loop of our PyGame game. By adding the game loop, we can keep our game window from disappearing. If by chance you don’t have a game window yet, you can check out this part of our PyGame Basics series. To create our game loop, we need a clock to set the FPS, or frames-per-second of our game. Under the last line of our game window code, add the following line:...

October 1, 2019 · 2 min · Jared

PyGame Basics: Introduction

We all know Python is highly flexible. What many don’t know is that you can create awesome games with a library called, PyGame. PyGame is a cross-platform set of game development modules for Python. This series is meant to help you learn the basics of PyGame, and is written so you don’t have to follow every part in order. Think of the PyGame Basics series as a reference, and not necessarily a step-by-step walk-through of each part (though you could read each part in order....

October 1, 2019 · 1 min · Jared

Phaser 3 Basics: Loading Sounds

In this guide, we will be learning how to load sounds with Phaser 3. At this point it would be useful if you had a scene already setup. If you don’t, you can take a look at my boilerplate code guide in this series. In your scene, define a preload method if you haven’t already. In order to define an image, you will need to follow this syntax: this.load.audio(, );...

September 27, 2019 · 2 min · Jared

Phaser 3 Basics: Boilerplate Code

In this part we will be adding the boilerplate code for our Phaser game. There are a few steps we need to do: add code to our index.html file, add some code to an index.html file, defining a game configuration, creating a boot scene, adding a main scene, and creating an instance of our game. If you don’t have an index.html file yet, or you need to add a script for our game, please check out part one of this series....

September 27, 2019 · 3 min · Jared

Phaser 3 Basics: An Introduction

Phaser is one of the most popular HTML5 game frameworks. It uses modern web technologies that allow for creating epic cross-browser games. In this tutorial series, we will be covering the basics of Phaser 3! This series will cover everything needed to make a basic game. Some of the concepts we will be covering include: Setting up a simple development environment Loading images, sounds, and TrueType fonts Adding sprites Changing positions Setting velocity and acceleration Simple collisions Basic sprite effects Playing sounds Particles The goal of this series is to break down these concepts into small, manageable parts....

September 25, 2019 · 1 min · Jared