Samples of code?

This is the place for queries that don't fit in any of the other categories.

Samples of code?

Postby JanW » Sat Feb 16, 2013 8:49 pm

Hi there,

I am new to the forum and I a want to learn how to program using Python. The reason for learning is because I like to make simple games for friends and family.
I am half way through the book 'Python programming, for the absolute beginner' and i must say that it is realy helpfull. Especially the challenge at the end of every chapter. If can not complete the challenge you need to read the chapter again. Further more, my english is not my native language so bare with me.

I have two questions, are there examples of code from simple games? I like to look over code from other people to see if I can understand it and if they have smart solutions I can use those in the future. Or is it 'not-done' using parts of other people's code?
JanW
 
Posts: 7
Joined: Sat Feb 16, 2013 8:35 pm

Re: Samples of code?

Postby micseydel » Sat Feb 16, 2013 8:54 pm

pygame is the standard module for simple games. If you Google "pygame examples" or "pygame samples" or such, you'll find what you're looking for. Feel free to post again if you have a more specific question.
Join the #python-forum IRC channel on irc.freenode.net!

Please do not PM members regarding questions which are meant to be discussed publicly. The point of the forum is so that others can benefit from it. We don't want to help you over PMs or emails.
User avatar
micseydel
 
Posts: 1390
Joined: Tue Feb 12, 2013 2:18 am
Location: Mountain View, CA

Re: Samples of code?

Postby JanW » Mon Feb 18, 2013 1:34 pm

Thanks, I found a great site with lots of examples.

http://www.pygame.org/news.html
JanW
 
Posts: 7
Joined: Sat Feb 16, 2013 8:35 pm

Re: Samples of code?

Postby Mekire » Wed Feb 20, 2013 7:22 am

That site does indeed have a lot of good examples, but be aware there are also a ton of bad examples on it as well (like anything I wrote over a year ago :D). If you have any specific Pygame related questions or want some code critiqued, feel free to ask in the Game Developement section and I (as well as a few others here who I know have pygame experience) will answer the best I (we) can.

-Mek
User avatar
Mekire
 
Posts: 988
Joined: Thu Feb 07, 2013 11:33 pm
Location: Amakusa, Japan


Return to General Coding Help

Who is online

Users browsing this forum: conor100, Crimson King, Google [Bot], Larz60+, W3C [Linkcheck] and 1 guest