Quantcast
Channel: daftpython
Viewing all articles
Browse latest Browse all 18

Rediscovering Python and PyGame

$
0
0

After quite a long break, I find myself back into Python - specifically for PyGame projects. The day job is .Net centred and I've been dabbling in 6809 assembler, Android and HTML5 for personal development. I have been trying a few new technologies for various GFX programs but few have come close to the RAD, features and fun of Python with PyGame.

I have had some fun with HTML5 especially with the canvas - sadly the drawing primitives are not all there yet. Hate how slow HTML progresses so not holding my breath for a better canvas for a long time. True Python doesn't run in the browser but it is cross platform, free and fairly easy to install (more on that later).

PyWeek

Taking part in PyWeek again was a challenge but great fun and I came up with a game that met a good few of my goals:


I have received some great feedback this time around. There are many required game play tweaks (an area I sadly did not have time for during the competition). Better mapping, goal feedback and more interesting terrain. 

Lessons Learned in no particular order:
  • Not having sound is something people WILL notice.
  • The motto 'Keep it simple and complete' is an excellent strategy.
  • Even small animation and movement pay off. The feel of the game is improved so much.
  • Keeping classes small helps - never a problem that a bit of code was too small.
  • Don't leave all on screen controls until the end!
  • Write the User instructions and revisit them at the end.
  • Getting the IDE, libraries, tools etc chosen and installed in advance allows for a quicker start. Should maybe include packaging, installer for next time.
  • Some bits and pieces of Python (3) I did not know yet.
  • Small custom tools can save lots of time.


Would I do another one? Yes. Always fun and educational. I have tweaked the game a little since release but I feel I would get more from trying something different rather than writing a sequel! It was designed to be ported to HTML5 so next time I want to do something in the browser realm...

Versioning

One thing that came up during the judging of the PyWeek entry was the problems of versions. Not just an issue for the competition - I was only able to feedback on half the games I could have after wrestling with various versions of libraries and non-standard module set up. In the .Net world NuGet is rather good. Hopefully Python 4 will include a single common way to set up extra libraries on all systems.


Future


Currently working on a 2 player Cowboy game with input from my eldest son. Blog post on that one soon :-) Think it will be called '8bit Cowboy Goldrush'. Yee-ha!


Viewing all articles
Browse latest Browse all 18

Trending Articles