INVENT WITH PYTHON
  • Read for Free
    • Automate the Boring Stuff with Python
    • The Recursive Book of Recursion
    • Python Programming Exercises, Gently Explained
    • The Big Book of Small Python Projects
    • Beyond the Basic Stuff with Python
    • Coding with Minecraft
    • Invent Your Own Computer Games with Python
    • Scratch 3 Programming Playground
    • Making Games with Python & Pygame
  • Buy Books
    • Automate the Boring Stuff with Python
    • The Recursive Book of Recursion
    • Python Programming Exercises, Gently Explained
    • The Big Book of Small Python Projects
    • Beyond the Basic Stuff with Python
    • Coding with Minecraft
    • Cracking Codes with Python
    • Invent Your Own Computer Games with Python
    • Scratch 3 Programming Playground
    • Making Games with Python & Pygame
  • Video Courses
    • Automate the Boring Stuff with Python
    • Beyond the Basic Stuff with Python
    • Scratch
  • Social Links
    • Patreon
    • GitHub
    • Email
    • Mastodon
    • Bluesky
    • Twitch
    • LinkedIn
    • YouTube
    • Amazon Author
  • Blog
  • Donate
  1. Authors
  2. Al Sweigart
Mon 13 August 2012

Source Code Makeover: Square Shooter, Part 3

Posted by Al Sweigart in misc   

This is a continuation from Part 1 and Part 2, where I go through the source code of Square Shooter, an Asteroids clone, and try to redesign the code to be more readable.

Read more...


Fri 10 August 2012

Source Code Makeover: Square Shooter, Part 2

Posted by Al Sweigart in misc   

This is a continuation from Part 1, where I go through the source code of Square Shooter, an Asteroids clone, and try to redesign the code to be more readable.

Read more...


Thu 09 August 2012

Source Code Makeover: Square Shooter, Part 1

Posted by Al Sweigart in misc   

In this blog post, I'm taking a game off of Pygame.org and going through it to make it more readable and extend its functionality. You'll see an example of how to take code that works and changes to improve it's design (but more importantly, I explain why I make those changes).

Read more...


Mon 30 July 2012

Need a Game Idea? A List of Game Mechanics and a Random Mechanic Mixer.

Posted by Al Sweigart in misc   

If you need an idea for a game, try this random game mechanic generator.

Read more...


Wed 18 July 2012

Using Trigonometry to Animate Bounces, Draw Clocks, and Point Cannons at a Target

Posted by Al Sweigart in misc   

How to use trigonometry in your Pygame games.

Read more...


Mon 09 July 2012

16 Common Python Runtime Errors That Beginners Find

Posted by Al Sweigart in misc   

Figuring out what Python's error messages mean can be kind of tricky when you are first learning the language. Here's a list of common errors that result in runtime error messages which will crash your program.

Read more...


Thu 21 June 2012

A Common Programmer Mistake: Dog is not the Opposite of Cat

Posted by Al Sweigart in misc   

True is the opposite of false. Up is the opposite of down. What is the opposite of dog?

Read more...


Wed 16 May 2012

A Modest Proposal: Please Don't Learn to Code Because It Will Damage Your Tiny Brain

Posted by Al Sweigart in misc   

Read more...


Thu 03 May 2012

Implement a "Save Game" Feature in Python with the shelve Module

Posted by Al Sweigart in misc   

This post goes into the details of how you can add a "save game" feature to your Python games.

Read more...


Fri 06 April 2012

Stop Using "print()" for Debugging: A 5 Minute Quickstart Guide to Python’s logging Module

Posted by Al Sweigart in misc   

To figure out bugs in your code, you might put in print statements/print() calls to display the value of variables. Don’t do this. Use the Python logging module.

Read more...


  • Previous  | 
  • 1 | 
  • 2 | 
  • 3 | 
  • 4 | 
  • 5 | 
  • 6 | 
  • 7 | 
  • 8 | 
  • 9 | 
  • 10 | 
  • 11 | 
  • 12 | 
  • 13 | 
  • 14 | 
  • 15 | 
  • 16 | 
  • Next

LGBT Rainbow Flag
BLACK LIVES MATTER | TRANS RIGHTS ARE HUMAN RIGHTS | TAX THE RICH | LEARN AMERICAN HISTORY

Site built using Pelican