Skip to content
Home » Kivy Part 15 – Slugrace – The Project Folder

Kivy Part 15 – Slugrace – The Project Folder

Spread the love

In the previous part of this Kivy programming series you saw the assets that we’ll need for the project. They include both visual assets, like the images of the slugs and the race track and the button icons, and sounds, like the audio effects that you will hear when a slug finishes a race or when the game is over. In this part we’re going to set up a working environment for our project, so, in other words, a folder in which our project will live. All the code files, both Python and kv, as well as all the assets will be in that folder. So, setting up the environment will include two steps: First we’ll create a folder for our project and then add the assets to the folder.

But before we delve into the topic, here’s some info for you.

*****

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.

Kivy 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…

You can download all the assets that we discussed in the previous part of this series from Github. You’ll find the link in the upper part of the sidebar.

Your folder hierarchy will probably look different than mine. You will have to take this into consideration each time we need a path to one of our folders when working on the project.

Create the Project Folder

Now, find a location where you want to save your project. To keep things simple, I created a Projects folder on my D drive and in it I created another folder and named it Slugrace. This folder will contain both code and the assets for our project.

Create a New Folder

Your Panda3D Magazine

Make Awesome Games and Other 3D Apps

with Panda3D and Blender using Python.

Cool stuff, easy to follow articles.

Get the magazine here (PDF).

Download the Assets

Open the Slugrace folder and put the assets folder in it:

Download the Assets

When you now open the assets folder, you will see the following hierarchy:

file hierarchy

Make sure your folder hierarchy is the same if you want to follow along smoothly. As you can see there are no files with code yet in the Slugrace folder. We’re going to fix it in the next part, where we’ll be creating all the folders we need.

Python Jumpstart Course

Learn the basics of Python, including OOP.

with lots of exercises, easy to follow

The course is available on Udemy.

Blender Jumpstart Course

Learn the basics of 3D modeling in Blender.

step-by-step, easy to follow, visually rich

The course is available on Udemy and on Skillshare.


Spread the love

Leave a Reply