DEV Community

Cover image for Getting Started with 2D Games Using Pyxel (Part 1): Introduction
Kajiru
Kajiru

Posted on

Getting Started with 2D Games Using Pyxel (Part 1): Introduction

What Are We Going to Build?

First, let me introduce the game you will build in this book.

Asteroid Destruction Game

In this book, we will create a simple Asteroid Destruction Game that anyone can build quickly.
It’s a straightforward game where you avoid asteroids while shooting and destroying them.

You’ll get that exciting moment of realization:

“So this is how a game actually moves when you program it!!”

What Is Python?

Next, Python itself is briefly introduced in a separate article.
Please feel free to check it out if you’re interested.

About Python Basics

For installing Python and learning basic syntax, refer to

Getting a Taste of Python (Beginner Edition).

You can continue reading even without prior knowledge of classes, but having a rough idea will help you understand things faster.
If needed, taking a look at

Chapter 12: Let’s Use Classes

will make things go more smoothly.

Development Environment

For the development environment, we will use IDLE, the editor that comes bundled with Python.
For details on how to use it, please refer to

Appendix: Let’s Run It (Installation Guide).

Library Introduction

This time, we will use a game engine called Pyxel to create a 2D game.

What Is Pyxel?

Pyxel is a game engine that makes it easy to handle things like character rendering, movement, and collision detection.
It is especially recommended for those who love retro-style games.

Installing the Pyxel Library

Pyxel is a third-party library.
You need to install it in advance from the command line using the pip command.
(The $ symbol is not part of the command.)

# Installation
$ pip install pyxel
Enter fullscreen mode Exit fullscreen mode

Coming Up Next...

Thank you for reading this far.
The next chapter is titled “Let’s Create a Game Screen.”

Stay tuned 👍

Top comments (0)