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
    • The Simple Turtle Tutorial
  • 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
    • Mastodon
    • Bluesky
    • Twitch
    • LinkedIn
    • YouTube
    • Amazon Author
  • Blog
  • Donate
  1. Authors
  2. Al Sweigart
Fri 19 August 2011

Nobody Cares About a Few Million Nanoseconds

Posted by Al Sweigart in misc   

This is a mistake a lot of new programmers make. The coder comes up with some clever trick or that can save a few bytes of memory or shave a few nanoseconds off of a function. You must learn that these "clever tricks" aren't really worth it.

Read more...


Thu 11 August 2011

Recursion Explained with the Flood Fill Algorithm (and Zombies and Cats)

Posted by Al Sweigart in misc   

This is a programming tutorial for beginner and intermediate programmers who want to learn what recursion is. The programming language used for the examples is Python, but you can probably follow along if you know programming in some other language such as PHP or JavaScript.

Read more...


Fri 24 June 2011

New Game Source Code: Gemgem (A Bejeweled clone)

Posted by Al Sweigart in misc   

Here's the source code for a Bejeweled clone called Gemgem, written in Python with Pygame.

Read more...


Mon 13 June 2011

New Game Source Code: Star Pusher (Sokoban clone)

Posted by Al Sweigart in misc   

Here's a Sokoban ("box pusher") clone called Star Pusher. I've used the graphics from the Planet Cute collection. You'll need Python (2 or 3) and Pygame installed to run it. Just download and unzip the files to the same directory. It comes with 201 levels from David W. Skinner.

Read more...


Fri 10 June 2011

New Game Source Code: Four in a Row

Posted by Al Sweigart in misc   

I've made a Connect Four AI in Python with Pygame.

Read more...


Mon 16 May 2011

Great Pygame Example Site

Posted by Al Sweigart in misc   

I wanted to share this link to a great site with some simple Pygame examples:

Python and Pygame Examples

There is also a textbook draft called "Introduction to Computer Science Using Python and Pygame" by Paul Vincent Craven.

Read more...


Mon 09 May 2011

"MooseGesture" - Python Mouse Gestures Module

Posted by Al Sweigart in misc   

"MooseGesture" is a Python module that implements a basic mouse gesture recognition system. It can identify gestures made up of strokes in the eight cardinal and diagonal directions.

Read more...


Sat 30 April 2011

Free Music, Sound Effects, Tiles, and 2D Art to Use in Your Games

Posted by Al Sweigart in misc   

I've compiled a list of free graphics and sound files that you can use in your games. The chapter on using graphics and sound files with the Pygame library is in Chapter 19 of the "Invent with Python" book.

Read more...


Sun 06 March 2011

New Game Source Code: Squirrel Eat Squirrel

Posted by Al Sweigart in misc   

Made a new game with Pygame. It's called "Squirrel Eat Squirrel", where you move your squirrel around the screen eating the smaller squirrels and avoiding the larger ones. The more squirrels you eat, the larger you grow.

Read more...


Fri 25 February 2011

New Extra Game: Connect Four clone

Posted by Al Sweigart in misc   

I have a text version of a Connect Four clone done. The AI for it looks ahead two moves, which makes it fairly impossible to beat unless you concentrate.

Read more...


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

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

Site built using Pelican