I Haz Codes

Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
Menu
Installing pygame
Making a pong game
Learning the basics of pygame
Stacking triangles
Space invaders
Pygame tutorials

Pygame is a brilliant python library which will teach you how to create your own games as well as develop your multimedia coding skills.

 

Installing pygame

Installing pygame In order to install pygame you first must install python. You can use the video above to do this. It is important to follow the steps closely otherwise installing pygame will be harder. The above video will now show you how to install pygame using pip. Pip is the package manager for python.

Making a pong game

  Watch the above tutorial videos to get an idea of how to write your own pong game. The final code is shown below. Note – it will not run in the browser due to the sound files.  You can find sound files by making your own using the following site – https://www.bfxr.net – Sound […]

Learning the basics of pygame

In order to learn pygame you need to go through the following key lessons. These will introduce you to some of the key ideas before you can start a more complex project. Make sure you go through them in the order listed below!

Stacking triangles

http://www.pygame.org/docs/ref/draw.html#pygame.draw.lines using the link above, create a pygame program which will generate the triangle below using random colours. It should use a while loop and NOT just be a series of draw commands. The secret is to decide on how each triangle differs. Start off with drawing the larger triangle first and then the second […]

Space invaders

You can learn how to create a basic space invaders game using the tutorial below. The tutorials will not only teach you how to code it but also get you to consider how to solve difficult problems such as making space invaders. TODO add trinket for space invaders code

Leave a Reply

Your email address will not be published. Required fields are marked *

Information