Python and Crown and Cutlass

David has posted a couple times now about python. We certainly had a good time going to PyCon and had a good time doing PyWeek. I really am a fan of Python. I think it worked really well for us during PyWeek and the other times I’ve used it. I have other thoughts on both items, but I think they’re better left for another day. What I want to focus on is how is all this affects our work on Crown and Cutlass.  

If anyone is still with us, watching the blog or the forums for activity, you probably have noticed a considerable slowdown in work. This has been caused by a couple things. First, and I think most importantly, is that fact that David went back to school 8 months ago. Since we work together on Crown and Cutlass quite a bit, our motivation often ebbs and flows together. Since David has less time to work on it, I find myself with less motivation. The other issue I have, is that when I take time off from Crown and Cutlass, I have a very hard time jumping back into the code. Getting back into a C++ mindframe from Delphi (which I use at work) is really difficult.  

Based on that, we’re going to be writing as much of the game play code as possible in Python. By exposing our Protocce engine to Python, we’ll be taking advantage of the rewrite work we’ve been doing as well as moving to a more hospitable development environment. I think this will speed up development on Crown and Cutlass by removing accidental complexity.

We’ve long talked about scripting as a major component to our game engine, but have always put it off for another day. Now, by using Python, all (or most) of our actual game code will be done in script. It gains us the flexibility of Python, while maintaining the speed of C++ in the engine. Anything that needs to be sped up can be implemented in C++.

I think is an exciting development for Crown and Cutlass. It gives us more opportunity to think about the gameplay and avoid the problems we’ve had at times in C++. You should be seeing more exciting developments over the summer as we make more progress on Crown and Cutlass.

Tags:

2 Responses to “Python and Crown and Cutlass”

  1. James H says:

    I have a game-scripting-integrating experience to share: I was doing an Object Pascal/Lua combination. New engine, building the game at the same time. Nominally, the Pascal code was controlling the action, but really, I found that passing things back and forth between the two was a huge hassle. It worked out in the end, but if I were doing it again I would have used more Lua and less Pascal, and focused more on giving a clean structure to the Lua code.

    As is often theorized in language-choice discussions, there were performance issues resulting from algorithm choice that would have taken too long to change, for the dates I wanted to hit. If I had waited on that “last 3-5x of optimization” until it was really necessary I would have been able to iterate on the algorithm more and be better off overall.

    In your case you already have an engine :) so it’s a different problem.

  2. Marc says:

    I am one of those reading your posts, doing an update from time to time on your svn commits and yes, both the old and the new code compiles for me without any warning on gcc-4.3 !!! That build.py script was great to find my broken dependencies !!!

    So I only hope this summer both of you find the time to put the new code at a similar working level as the old, so we (the non-real-programmers) can start helping you in some ways. I found that cities.xml specially easy for me to contribute to !!!

    I have a runtime error with the new code related to ogre. Should I start a thread in the forum for it, or just wait for the code to be updated?

    It is difficult for me to say it in your language, but I will try to; As you see, this post was only to try to give you some energy to make one step ahead in this project of yours, I hope I managed doing it !!!

    Best !!!

Leave a Reply