pygame examples

Started by
25 comments, last by biggjoee5790 15 years, 3 months ago
Hey guys I finally feel that Im ready to begin learning pygame. I am very comfortable with python and Tkinter. I had a python class this entire semester that added to all of the knowledge I gained through my own studies. Im using the book "Beginning Game Development with Python and Pygame". Its an awesome book and its helping me a lot. Do you guys know where I can find some example game source code to learn from and possibly get ideas for my own practice games? Just 2d for now because Im nowhere near opengl yet.
Advertisement
http://www.pygame.org/projects/6

These also may be benefitial as resources that may not have projects of games that are open source however!

http://en.wikipedia.org/wiki/Pygame

There are a bunch of links at the bottom of the page under the heading "External links"!
I wrote a beginners tutorial called pygame easy as py not long ago that should be around here somewhere.
Lemme know if it works out for you.
But yes as you can see from my tutorial and the comments,etc it's a lot easier going(motivation) when you have an end goal in mind(in my case a sid meiers pirates clone) instead of just checking out other people's code and not learning as much.


[Edited by - daviangel on December 20, 2008 4:05:29 PM]
[size="2"]Don't talk about writing games, don't write design docs, don't spend your time on web boards. Sit in your house write 20 games when you complete them you will either want to do it the rest of your life or not * Andre Lamothe
Quote:Original post by biggjoee5790
Do you guys know where I can find some example game source code to learn from and possibly get ideas for my own practice games?

You're doing it wrong.

I'm sure you have ideas, even if it's just incremental changes on games you've played. I'm also sure you can think of simple games that would at least be exercise to implement - Pong, Tetris, Connect4, Solitaire, Minesweeper, Nemesis... The beauty of Python and PyGame is that they take care of a lot of complex details so you can just focus on getting your game working. Instead of looking for code to essentially copy from, I want you to try to solve the problems on your own, then turn to other people's code and this forum for help if you get stuck.

You can do it, so do it.
I love how that "tutorial" has copyrighted code that is essentially taken right out of "The L Line: The Express Line to Learning" by Andy Harris. Especially the IDEA and ALTER concepts...
thanks alot guys. My goal as of now is to make a diablo copy. Starting small with one or 2 character types and maybe a map or two. Then expanding and making it bigger and bigger. I know I need to make some smaller 2d games first but thats my goal as of now.
Quote:Original post by biggjoee5790
thanks alot guys. My goal as of now is to make a diablo copy. Starting small with one or 2 character types and maybe a map or two. Then expanding and making it bigger and bigger. I know I need to make some smaller 2d games first but thats my goal as of now.

That's a good, healthy goal. I've been thinking about making a Gauntlet style game myself, just for fun. Keep us informed; maybe we'll swap notes and war stories. [smile]
Quote:Original post by Esys
I love how that "tutorial" has copyrighted code that is essentially taken right out of "The L Line: The Express Line to Learning" by Andy Harris. Especially the IDEA and ALTER concepts...

Yes excellent book I recommend it all the time;)
Glad I'm not the only one that's actually read it.
And yeah after seeing how easy it is to use pygame using the IDEA and ALTER concepts you wonder why someone didn't think of it before or at least putting it in a book so help other new pygame programmers?

p.s. the pygame easy as py pun was all my idea though so give credit where it's due!
[size="2"]Don't talk about writing games, don't write design docs, don't spend your time on web boards. Sit in your house write 20 games when you complete them you will either want to do it the rest of your life or not * Andre Lamothe
ya thanks I think its a decent goal... not too farfetched. Im pretty sure I know what skills I would need to create such a game. Some pre rendered 3d models, some sprites, textures, good programming skills, pyopengl knowledge, etc. Only thing I have absolutely no idea about is creating levels.. like the actual maps. I guess Id use some sort of isometric level editor correct?
Quote:Original post by biggjoee5790
Only thing I have absolutely no idea about is creating levels.. like the actual maps. I guess I'd use some sort of isometric level editor correct?

That's really up to you. An isometric tiles game basically requires that you have map data that defines the level layout, with different values/symbols/definitions for each tile that indicates whether it's a barrier or a passable surface, and what kind of barrier or surface, etc. For relatively simple setups, the data can be as simple as an ASCII text file where each character represents a different type of tile. In that case, your level editor can be Notepad, or you can write an application to help you graphically place the tiles.

You can use an existing level editor, but then you have to make your game conform to the level data definition used by that editor. It's a tradeoff of features vs development effort.

This topic is closed to new replies.

Advertisement