Skip to content

sailorbob134280/PygameDemo

Repository files navigation

PygameDemo

Welcome to lesson whatever we're on! Today we're going to talk about an intro to PyGame, and how we start games in general. Please come prepared with this repo downloaded (so you have the assets in the right place) and a new venv spun up. If you've forgotten how to do that, see here.

So where the heck do we start?

Well, that depends on exactly what you want to do. For most people, we intend to have some level of graphics, whether it's boxes, pixel art, or fancy assets we've made or bought. No matter which we're going with, it all still boils down to these steps: Put pixels on a screen, make them move, and establish rules for how they move. With that in mind, we're going to start by simply getting pixels on a screen. That includes getting our window set up, setting some constants, and drawing something. Next, we're going to do some basic animation tests to make things move in the way we want. Finally, we're going to establish the rules our pixels need to obey, which will become the laws of our little game world.

Cool, I'm now an expert after reading that last paragraph! Where do I go from here?

Tune in next week and we'll be talking about how to integrate into our main engine. We'll do this in two ways: 1. Write our game in such a way that we can use the provided engine (recommended), or 2. write our own engine from scratch and use the provided engine to kick off ours. We'll do this by porting our little example over to use the provided engine. We'll also take a little tour of the provided engine and note the similarities and differences between our engine. This should clear up some confusion over what it be and what it do. Besides that, please please please take a stab at starting on your own game. Similar to starting a game, any programming project, from little hobby projects like this to spacecraft software, start by putting something on a screen. Get SOMETHING down, I don't care what it is. You will have to revisit it, that is a guarantee. So for your own sanity, please do not focus on perfection. You will not succeed the first time. Instead, try to get some pixels on a screen, and embrace the impending refactor. :)

Well this just rustles my jimmies! Where can I go to learn more?

I'm glad you asked! The PyGame documentation is a great place to start. That said, it's a little dense, so it's not a bad idea to hit up some YouTube tutorials to see what you actually need to know. There's already been a few posted, and there's at least a few trillion more out there. PyGame is many things, but "underrated" is not one of them. We also highly recommend checking out what others have done. Remember, you can always <git checkout> anyone's branch and take a look. Just please keep in mind, it's considered poor form to commit to someone else's branch, so double-check which one you're on before you commit.

As always, we're available throughout the week to answer questions. That said we do have jobs and (on rare occasions) lives, so we'd appreciate it if you could take a stab at researching your problems before coming to us. Just give it a try and if you're still stuck, shoot us a message and we'll help.

Wow, this is awesome! Who do I thank for this??

Tyler Wise - For having a cute doggo

Jackson Smith - For the world's most awesome soundtrack

Brian Schmidt - For being better at pixel art than the idiots listed above and making the assets for this lesson

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages