As I mentioned in the previous part we’re going to make a short break from programming now and have a look at the game assets that will be used in the app. There will be some graphics and sounds in the app. Let’s start with the graphics.
But before we delve into the topic, here’s some info for you.
*****
Table of Contents
Book Info
I just published my Kivy book, GUI Programming with Python and Kivy. It’s pretty long (over 800 pages) and comprehensive. And, which also counts, easy to read. The book contains lots of illustrations.
This book covers all the basics that you need to know to start programming GUI applications with Python and Kivy. Throughout the book we are building a GUI application from scratch, a fully functional game using all kinds of tools that Kivy has to offer. It’s our Slugrace project, but covered in a much more in-depth manner.
Each part of the book starts with a theoretical introduction of a topic or idea that we then implement in the project. I assume you have no prior knowledge of the Kivy library, but you should have at least some basic knowledge of the Python programming language, including the object-oriented programming paradigm as this is what we will be using a lot in this book.
The book covers all the basic elements of Kivy that you have to know, like widgets, layouts, Kivy ids and properties, graphics, screens, animation, sound. Finally we’ll deploy the app to Windows. It is pretty comprehensive and after you finish it, I’m sure you’ll be able to create your own awesome GUI apps of any kind, not just games.
I hope you will have at least as much fun reading the book as I had writing it.
As far as this Kivy series is concerned, the following parts will contain the most important elements covered in the book. However, some elements will be presented in a simplified way here on my blog or omitted completely.
____________
If you are interested, you can purchase the book in four versions. Here are the links:
1) ebook – pdf version on my website – in full color
Here you can see the description of the book, sample graphics from the book and the full table of contents.
2) ebook – Kindle version on Amazon – in full color
3) paperback version on Amazon – in black and white
4) paperback version on Amazon – in full color
*****
And Now Let’s Move On…
Visual Game Assets – the Images
We’re going to need some images. Let’s have a look at them now.
The Race Track
The first image we need is the race track, on which the slugs will be running. This is a 1000×200 px image. We will place it in the background. On top of it will be the slugs and some text.
The Slugs
We definitely need the slugs. Actually, we need each slug in two versions: a silhouette which will be visible when a slug wins a race and a top view of the slug, which we’ll see on the race track.
Silhouettes
Now, with the silhouettes it’s simple. Each slug has a corresponding image. Here they are:
- Speedster
- Trusty
- Iffy
- Speedster
We’ll also need an image with all four slugs, which we’ll use as a background decoration on one of the screens later in the game. Here it is:
Top Views of the Slugs
As far as the top views are concerned, we’ll need two images for each slug, one for the body and one for the eye (along with the tentacle it’s on). This is because the tentacles (to which we’re going to refer as eyes from now on for the sake of simplicity) are going to be moving parts. They will be attached to the bodies and animated later in the project. Here are the images:
Slug’s Name
Body
Eye
Speedster
Trusty
Iffy
Slowpoke
The Accidents
As you know, the slugs will be racing along the track. But what you probably don’t know yet is that they’re going to suffer from some accidents from time to time, or, to be more precise, not necessarily suffer, because some accidents will be pretty convenient for them and will help them win the race. Anyways, we’re going to discuss all the accidents later on, not so soon to tell the truth, but now let’s just have a look at the visual game assets that we’re going to use for the accidents. First of all, we’ll need a separate image for each slug for the Broken Leg accident:
For the other accidents we’ll just use generic images that will be used with all four slugs. Here are the visual game assets we’ll be using with the accidents:
Button Images
The last two visual game assets we’ll need are the images that we will put on the toggle button which will mute and unmute sound during the game. Here they are:
Audio Game Assets – the Sounds
We’re going to add some sounds to the game. A game with sounds seems more complete to me.
Game Sound Effects and Tunes
First, there will be some sound effects in the game:
go.wav | This is a popping sound that will be heard whenever a race starts. |
Game Over.mp3 | This tuned will be played when the game is over. |
Slugs’ Sound Effects
Then there will be some sound effects used by the slugs when they win. Each slug will produce a slightly different sound so that you can tell all the slugs apart by their sound after you get used to them:
Speedster Win.mp3 | This sound will be produced by Speedster if he wins. |
Trusty Win.mp3 | This sound will be produced by Trusty if he wins. |
Iffy Win.mp3 | This sound will be produced by Iffy if he wins. |
Slowpoke Win.mp3 | This sound will be produced by Slowpoke if he wins. |
Accident Sound Effects
Finally, when an accident happens, there will be a sound effect to accompany the visual effect of the accident. Below is the list of the sound effects with short descriptions. Don’t worry if you don’t understand what it’s all about. I will discuss the accidents later in the project. So, here are the sounds:
Asleep.mp3 | This sound will be produced by a slug that falls asleep. |
Blind.mp3 | This sound will be produced by a slug that goes blind. |
Broken Leg.mp3 | This sound will be produced by a slug that breaks his leg. |
Devoured.mp3 | This sound will be produced by a slug that is eaten by the slug monster. |
Drown.mp3 | This sound will be produced by a slug that falls drowns in the puddle. |
Electroshock.mp3 | This sound will be produced by a slug that is struck by lightning. |
Grass.mp3 | This sound will be produced by a slug that stops to eat some grass. |
Heart Attack.mp3 | This sound will be produced by a slug that has a heart attack. |
Overheat.mp3 | This sound will be produced by a slug that gets burned. |
Rubberizer.mp3 | This sound will be produced by a slug that stretches like rubber. |
Shooting Eyes.mp3 | This sound will be produced by a slug that shoots his eyes. |
Turning Back.mp3 | This sound will be produced by a slug that turns back. |
You can find all the game assets, both images and sounds, on Github, so you can grab them from there and save them in your project folder. But wait a minute, you don’t have a project folder yet… Yes, that’s right. We’re going to create the project folder in the next part and then download the assets to it.