One of our final year university modules was called “Languages, Platforms & Tools”. This module featured lecture material on compilers and interpreters, along with debates about various programming topics. The coursework required us to produce a simple application in a programming language that we knew well, and then port it to another mainstream language that we did not know at all. The bulk of the work, however, was a written report that compared the chosen languages.
As you may have guessed from the title of this post, the primary language I chose was C#, and the secondary language was Python. The application I made with these languages was a simple clone of Asteroids, so I utilised the XNA 4.0 Framework with C#, and a library known as Pygame 1.9.1 with Python 2.7 to handle the graphics for the game in each case. My report discussed the histories of both languages and contrasted their features. I also included a developer diary that reviewed the progress of my implementations. I was given a “B+” for my work.
Languages, Platforms & Tools – Report (.PDF, 485 KB).
XNA Asteroids Clone – x86 Executable (.ZIP, 25 KB).
I aim to compile and upload an executable of the Python version at a later time.
At the time that I was working on this project, I was also unfamiliar with XNA as well as with Python, so I had a steep learning curve to tackle with this module. By the end of it, however, I found that I was really enjoying using Python, and I am now an advocate of the “off-side rule” (using whitespace for delimiting code blocks). Pygame was a little tricky to learn because it is completely different to XNA in the way that it handles moving sprites around, but the finished result was pretty much identical to the XNA version.