Feb-03-2020, 05:28 PM
I've been learning Python from one of the No Starch Press books. "Python Crash Course" by Eric Matthes. I've started on the first project - an Alien Invasion game. I can copy/paste code from the book and it works fine. He explains how stuff works and I may think I understand how it works at the time but as soon as I go off the rails and try to do my own thing it all falls apart.
I want to put a scrolling star background in the game and I've found tutorials online that explain how to do it, and I have a file that successfully does what I want to do. The problem I'm running into is the book pushes refactorization - splitting up your programs into multiple files. I want to have my scrolling background in a separate file that is accessed by the main program. It goes through how to do this, and I'm trying to do that, and all I get is a giant pile of errors when I run the program. I've spent days trying to figure out the right way to do it, and rewritten my background file multiple times. I just can't do it.
I feel really frustrated because I feel like I can copycat code but don't intuitively understand what it is that I'm typing. I want to become literate in Python, and that means knowing more than just copying code. Is there a resource that teaches Python better than this book does? In a way that helps me understand Python in a more intuitive way so I can code from memory rather than copying from somewhere else?
I want to put a scrolling star background in the game and I've found tutorials online that explain how to do it, and I have a file that successfully does what I want to do. The problem I'm running into is the book pushes refactorization - splitting up your programs into multiple files. I want to have my scrolling background in a separate file that is accessed by the main program. It goes through how to do this, and I'm trying to do that, and all I get is a giant pile of errors when I run the program. I've spent days trying to figure out the right way to do it, and rewritten my background file multiple times. I just can't do it.
I feel really frustrated because I feel like I can copycat code but don't intuitively understand what it is that I'm typing. I want to become literate in Python, and that means knowing more than just copying code. Is there a resource that teaches Python better than this book does? In a way that helps me understand Python in a more intuitive way so I can code from memory rather than copying from somewhere else?