PyGame Basics: Drawing Images

In this tutorial, we will be walking through how to draw images with PyGame. Let’s dive right in. In your game file, you should see the set_mode method being called. This method call returns a Surface, which is pretty much just the canvas that we’re drawing to. Make sure that the return value of this method call is being assigned to a variable. I named my variable, display like to so:...

October 2, 2019 · 2 min · Jared

Phaser 3 Basics: Custom Fonts

In this guide, we will be covering how to load custom fonts, specifically TrueType fonts, with Phaser 3. To begin, you will need a scene setup for this guide. If you don’t have a scene made already, you can learn how to create one here. Essentially, you need to define a new font face with CSS, create a div utilizing the font to “load” it, and finally reference it within our game code....

September 28, 2019 · 2 min · Jared

Phaser 3 Basics: Loading Images

In this guide, we will be taking a look at how to load images with Phaser 3. Hopefully you have a scene already setup. If you don’t have a scene setup already, please visit my tutorial on writing boilerplate code. In your scene, define a preload function if you haven’t already. To define an image, the syntax is the following: this.load.image(, ); Actual code could look like so: this.load.image("myimage", "my-path/to-image/myimage.png"); In our method call, key is the name you want to reference your image with in your code....

September 27, 2019 · 2 min · Jared