Python Posts

166 posts tagged with python

Did some work on becontrary.com today. The front page was a little dull and had a bounce rate of 49.8% according to Google Analytics, which means that almost half of the visitors that land there don't go any further. Previously the front page just displayed a news feed and some recent arguments and comments, I change it so that the feed in the main column aggregates the content from the debates so that in addition to news, it also displays new debate topics and arguments. The result is that it the front page should contain much more interesting content that will tempt visitors to explore the site. continue reading…

The following is a list of the chapter titles for Beginning Game Development with Python and Pygame, and a brief explanation of the contents.

Any questions about the book contents, let me know!

Chapters:

Introduction to basic Python.

Goes a little deeper in to Python, covers Classes.

Explains how import and use Pygame.

Covers different ways of drawing to the screen.

Explains animation, vectors and time-based movement.

Covers how to read input devices and connect them to in-game motion.

Covers artificial intelligence.

Explains the basic 3D concepts, with samples.

Covers 3D maths and introduces OpenGL.

Sound and Music.

Covers textures and reading 3D models from files.

Covers lighting, blending, fog and other OpenGL features.

Appendices:

I promised to write up a report on my experiences building becontrary.com with Python and the TurboGears framework. An earlier post explains the concept of the site, and what it is intended for. continue reading…

My book, Beginning Game Development with Python and Pygame, is finally finished! It was a labor of love, and a lot of work. Apress have graciously allowed me to give away a free chapter.

I chose chapter 7, which is on the subject of Artificial Intelligence. I selected this chapter because it is nicely self-contained and doesn't require much additional understanding of other game concepts. It is an unusual chapter, in that it contains the largest listing in the book. I tried to avoid really long listings, but in this case I think it was justified so that the code in the book actually runs; I hate leaving any code as an exercise for the reader.

Download Chapter 7, Take me to Your Leader continue reading…

Download Chapter 7, Take me to Your Leader continue reading…

I had a marvelous idea for a website that combines fairly traditional elements from web applications like bulletin boards with elements from Web2.0 sites. I mulled it over for a while, and explained it to a few people—who seemed to like the idea.

The idea is for what I call recreational debating, i.e arguing for the hell of it. A debate consists of a topic of discussion that has two clearly opposing sides, represented by two columns were users can post their arguments. Users can comment on these arguments and also rate them on a scale between -2 and +2, a scheme that Pythonistas will be familiar with. Arguments are ranked according to votes given, so the best argument for each side will naturally rise to the top. continue reading…

It is the year 2112. Telepods have been in use for a decade to instantly transport matter from one part of the universe to another. You are waiting in line with your family at a telepod station to go to Tau Ceti. In front of you in the queue you meet the inventor of the telepods. He tells you that the telepods only appear to move matter, what they actualy do is create an exact duplicate at the destination and destroy the original in the process.

I have many ideas in the course of any given day. They are dredged up from the depths of my subconscious and placed on my mental in-tray, to be sorted in to mental heaps. Most are placed on to the "that'll never work" heap, others are thrown on the "better not, that's probably illegal" heap or the "plutonium isn't available at every corner drug store you know" heap. Occasionally though, some make it to my mental out-tray. continue reading…

I pride myself in my ability to make decisions. If I have all the variables and criteria then I can typically select the best course of action, or at least a good choice of action. As an engineer, this is invaluable because most problems in software development are of this type; you have all the facts and a desired outcome. If you meet the desired outcome, then you can safely say that you made the right decision. If not you can go back and try again. continue reading…

The consequence of this tale of woe is that I have released Food File as open source, so that I can collect on karma rather than hard cash. The source and Win32 installer is now available on Google Code, so those nice folks at Google can pick up the bandwidth bill. I hear they are not short of a few cents. continue reading…

Just uploaded a new version of Postmarkup (1.0.5), my bbcode parsing engine. The only significant change was a fix to a potential thread safety issue. It would only have occurred if you used the [list] tag, and even then only rarely (if at all). I figured it would be worthwhile since many people are using it in the context of a multi-threaded web application.

I decided not to bother with a win32 installer since its only a single Python file, and can be installed with easy_install. Use the following command line to install, or upgrade, Postmarkup.

If anyone really wants a win32 installer then let me know, I'll probably oblige.

See the Postmarkup homepage on Google Code for more information.