[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Writing games in interpreted languages
Michael Dartt wrote:
> I've been working with Python a lot lately, and it strikes me as a great
> language for--well, darn near anything, including game programming. One
> of its most useful aspects for a program like a game, where certain
> parts are going to need optimization (even if that just means "being
> compiled") is that Python works almost transparently with C and C++.
> (And Java, too, if you use JPython.) This means that you can write the
> entire program in Python, taking advantage of the *much* faster
> development time (and other VHLL benefits), and then, if you find that
> pieces of your game need to be faster, you can rewrite those modules in
> C or C++ and get that speed increase, without having to change the rest
> of your code. You can also embed Python in C, C++, or Java, too.
Yes, and you can do the same thing with Perl also. I do not know for
Guile or other Scheme interpreters, but I think they do support calling
C/C++ code just like Perl and Python.
Converting image formats, blitting and some other stuff like that cannot
be done quickly enough in interpreted languages alone, but the mere game
logic can easily be coded in many interpreted languages. If there is a
profiler for your preferred language, you can simply write a whole game
in it, then examine it with the profiler to find out what is too slow
and convert just those parts to C!
Ludus Design, http://ludusdesign.com/
"First they ignore you. Then they laugh at you.
Then they fight you. Then you win." -- Gandhi