Discover millions of ebooks, audiobooks, and so much more with a free trial

Only $11.99/month after trial. Cancel anytime.

Learn Python by Coding Video Games (Intermediate): Learn Python by Coding Video Games, #2
Learn Python by Coding Video Games (Intermediate): Learn Python by Coding Video Games, #2
Learn Python by Coding Video Games (Intermediate): Learn Python by Coding Video Games, #2
Ebook167 pages1 hour

Learn Python by Coding Video Games (Intermediate): Learn Python by Coding Video Games, #2

Rating: 0 out of 5 stars

()

Read preview

About this ebook

Learn Python with Pygame, and create a full pacman game without the headachess
Python is a great programming language; however, most people spend too long trying to learn how to code and create games with Python the hard way. This book is the only one that will get you to learn Python fast without wasting so much time. This book is the second book in the series "Learn Python By Coding Games" where you will learn to code fast and be able to create your own video games with Python in no time and add interesting game play including Artificial Intelligence for the NPCs.

 

This is the only book that you need to get started with Python and game programming fast and to enjoy the journey without frustration. This book includes six chapters that painlessly guide you through the necessary skills to master Python and Python games development, use its core features, and create interesting 2D games. It assumes no prior knowledge on your part and ensures that you have all the information and explanations that you need every step of the way.

 

What you will learn
After completing this book, you will be able to:

  • Be comfortable with Python.
  • Use common structures to create programs in Python (e.g., loops, conditional statements, etc.).
  • Know and master the features that you need to create 2D games (user interface, collision and keyboard detection).
  • Create and instantiate classes using Python.
  • Create and manage an inventory of weapons for the player character using classes and lists.
  • Create and manage weapons and ammunitions that the player character can collect and use.
  • Create Artificial Intelligence for NPCs so that they can see or hear the player.

Make it possible for NPCsC to patrol, detect and follow the player

  • Create a finite state machine to manage the behaviour of NPCs.
  • Learn how to use the Pygame library.

 

What this book offers
This book includes all the features that you need to get started with Python and game development:

  • Learn without the headaches: This book assumes that you can't be expected to learn everything at once; this is why you will build all your skills incrementally.
  • Make your dream of creating your own games come true: This book ensures that you stay motivated by giving you the right amount of information and challenge in each chapter; we all know that it's hard to keep motivated when learning a new skill, so this book always contextualizes the knowledge with an example (so that you feel it's relevant), and also makes sure that you get to challenge yourself, if you need to, with optional challenges present at the end of each chapter.
  • Progress and feel confident in your skills: You will have the opportunity to learn and to use Python at your own pace and become comfortable with its core features. This is because every single new concept introduced will be explained in great detail so that you never feel lost. All the concepts are introduced progressively so that you don't feel overwhelmed.
  • Create your own games and feel awesome: With this book, you will build your own 2D games and you will spend more time creating than reading, to ensure that you can apply the concepts covered in each section. All chapters include step-by-step instructions with examples that you can use straight away.

If you want to get started with Python games today, then buy this book now.

LanguageEnglish
Release dateNov 17, 2022
ISBN9798215956915
Learn Python by Coding Video Games (Intermediate): Learn Python by Coding Video Games, #2
Author

Patrick Felicia

Patrick Felicia is a lecturer and researcher at Waterford Institute of Technology, where he teaches and supervises undergraduate and postgraduate students. He obtained his MSc in Multimedia Technology in 2003 and PhD in Computer Science in 2009 from University College Cork, Ireland. He has published several books and articles on the use of video games for educational purposes, including the Handbook of Research on Improving Learning and Motivation through Educational Games: Multidisciplinary Approaches (published by IGI), and Digital Games in Schools: a Handbook for Teachers, published by European Schoolnet. Patrick is also the Editor-in-chief of the International Journal of Game-Based Learning (IJGBL), and the Conference Director of the Irish Symposium on Game-Based Learning, a popular conference on games and learning organized throughout Ireland.

Related to Learn Python by Coding Video Games (Intermediate)

Titles in the series (2)

View More

Related ebooks

Children's Technology For You

View More

Related articles

Reviews for Learn Python by Coding Video Games (Intermediate)

Rating: 0 out of 5 stars
0 ratings

0 ratings0 reviews

What did you think?

Tap to rate

Review must be at least 10 words

    Book preview

    Learn Python by Coding Video Games (Intermediate) - Patrick Felicia

    Learn Python By Coding Games

    (intermediate)

    First Edition

    ––––––––

    A step-by-step guide to coding your first shooter game with Python and Pygame.

    Patrick Felicia

    Learn Python By Coding Games

    (intermediate)

    Copyright © 2022 Patrick Felicia

    All rights reserved. No part of this book may be reproduced, stored in retrieval systems, or transmitted in any form or by any means, without the prior written permission of the publisher (Patrick Felicia), except in the case of brief quotations embedded in critical articles or reviews.

    Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either expressed or implied. Neither the author and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.

    First published: October 2022

    Published by Patrick Felicia

    Credits

    Author: Patrick Felicia

    About the Author

    Patrick Felicia is a lecturer and researcher at Waterford Institute of Technology, where he teaches and supervises undergraduate and postgraduate students. He obtained his MSc in Multimedia Technology in 2003 and PhD in Computer Science in 2009 from University College Cork, Ireland. He has published several books and articles on the use of video games for educational purposes, including the Handbook of Research on Improving Learning and Motivation through Educational Games: Multidisciplinary Approaches (published by IGI), and Digital Games in Schools: A Handbook for Teachers, published by European Schoolnet. Patrick is also the Editor-in-chief of the International Journal of Game-Based Learning (IJGBL), and the Conference Director of the Irish Symposium on Game-Based Learning, a popular conference on games and learning organized throughout Ireland.

    Support and Resources for this Book

    To complete the activities presented in this book you need to download the startup pack on the companion website; it consists of free resources that you will need to complete your projects. You can download it here:

    http://learntocreategames.com/book_downloads/python_games/book2/

    This book is dedicated to Mathis

    [  ]

    Table of Contents

    Credits

    About the Author

    Support and Resources for this Book

    Table of Contents

    Preface

    Content Covered by this Book

    What you Need to Use this Book

    Who this book is for

    Who this book is not for

    How you will learn from this book

    Format of Each Chapter and Writing Conventions

    Special Notes

    How Can You Learn Best from this Book?

    Feedback

    Downloading the Solutions for the Book

    Improving the Book

    Supporting the Author

    Chapter 1: Starting with Our Shooter Game

    Moving the npc using the arrow keys

    Creating a weapon for the player character

    Creating a class for the targets

    Level roundup

    Summary

    Quiz

    Answers to the Quiz.

    Checklist

    Chapter 2: Creating an Inventory

    Creating the inventory

    Switching between weapons

    Collecting ammunitions

    Level roundup

    Summary

    Quiz

    Answers to the Quiz

    Checklist

    Challenge 1

    Chapter 3: Adding Collisions and Artificial Intelligence

    Resources necessary for this chapter

    Adding walls

    Adding collision detection with the walls

    Moving the npc with waypoints

    Adding Hearing and vision to the npc

    Level roundup

    Checklist

    Quiz

    Answers to the quiz

    Challenge 1

    Chapter 4: Creating a Finite State Machine

    Initializing the game

    Following the player

    Triggering transitions between states

    Spawning NPCs

    Level roundup

    Checklist

    Quiz

    Answers to the quiz

    Challenge 1

    Chapter 5: Polishing our game

    Changing the appearance of the enemies

    Displaying dots

    Detecting collision with the dots and updating the score

    Displaying the score

    Detecting collision with the npcs

    Level roundup

    Checklist

    Quiz

    Solutions to the Quiz

    Challenge 1

    Chapter 6: Frequently Asked Questions

    Scripts

    Interaction with assets

    Using a graphical user interface

    Create and use classes

    Using Lists

    Pictures and Audio

    Detecting user inputs

    Thank you

    ––––––––

    Preface

    This book will show you how you can very quickly code in Python and create games.

    Python is a powerful programming language used in a wide range of industries and that you can use even if you have (or you are teaching with) computers with very low technical specifications.

    This book series entitled Learn Python By Coding Games allows you to play around with Python’s core features, and essentially those that will make it possible to create interesting 2D games rapidly. After reading this book series, you should find it easier to code in Python and to create simple yet entertaining video games.

    This book series assumes no prior knowledge on the part of the reader, and it will get you started on Python so that you quickly master all the wonderful features that this programming language provides by going through an easy learning curve.

    By completing each chapter, and by following step-by-step instructions, you will progressively improve your skills, become more proficient in Python, and create several games.

    In addition to becoming proficient with Python, you will also create games that include many of the common techniques found in video games such as: level design, object creation, textures, collision detection, lights, weapon creation, character animations, particles, artificial intelligence, and menus.

    You will learn how to create customized menus and simple user interfaces using both Python and Pygame and animate and give artificial intelligence to Non-Player Characters (NPCs) that will be able to follow the player character using pathfinding.

    Finally, you will also get to export your game at the different stages of the books, so that you can share it with friends and obtain some feedback as well.

    [  ]

    Content Covered by this Book

    Chapter 1: Starting with Our Shooter Game, explains how you can create and move a 2D character; it also shows you how you can add a weapon (a gun) so that the player character can shoot. Finally, this chapter will also show you can create a class for the bullet, to keep their management smooth and easy.

    Chapter 2: Creating an Inventory, explains how you can create an inventory for the weapons that the player character owns. It shows you how you can combine classes and lists so that the player can switch between weapons and collect and manage ammunitions.

    Chapter 3: Adding Collisions and Artificial Intelligence, shows you how you can add challenge to your game by introducing NPCs that can patrol, but

    Enjoying the preview?
    Page 1 of 1