Python suitable for a game engine?

Nick Nick at p98.f112.n480.z2.fidonet.org
Fri Jul 2 07:39:35 EDT 1999


From: "Nick" <nick at NOSPAMvideosystem.co.uk>

The language doesn't necessarily need to support it. You could implement the
threaded system yourself in Lua, you then have more control over what goes
on. Proper threads are relatively slow in Windoze (I believe) and would be a
nightmare to debug? If Lua wasn't fast enough you could write a scheduler
with priority assessment in C/C++ and attached Lua script callbacks to this.
Personally I wouldn't dream of useing proper threads for game logic/AI I
would write a basic scheduler, it wouldn't be difficult. Grim Fandango uses
Lua as its scripting language and I think they did something along these
lines. I think Balders Gate is another game that is rumoured to use it.

N


Christian Tismer <tismer at appliedbiometrics.com> wrote in message
news:377BD789.C4A1D191 at appliedbiometrics.com...
>
>
>Nick wrote:
>>
>> Don't want to put the cat amongst the pigeons but Lua
>> (http://www.tecgraf.puc-rio.br/lua/), is a language specifically designed
to
>> be embedded and it runs about 50-100% faster than Python and is a lot
more
>> compact (30k or something). It has a lot of similarities syntactically as
>> far as I can see.
>>
>>  If I was to use an embedded scripting language in a game I would use Lua
>> not Python. If I was to write tools for the game I would use Python.
>
>I had a quick look, but not the time to check it completely.
>Does it have coroutines or small threads to do very
>quick context switches? This is something which
>Python will be able to do very fast, soon. You can have
>thousands of current contexts and switch them in no time.
>This can simplify the implementation of games in a scale,
>that the speed penalty might be compensated by that.
>Well, we have to try...
>
>ciao - chris
>
>--
>Christian Tismer             :^)   <mailto:tismer at appliedbiometrics.com>
>Applied Biometrics GmbH      :     Have a break! Take a ride on Python's
>Kaiserin-Augusta-Allee 101   :    *Starship* http://starship.python.net
>10553 Berlin                 :     PGP key -> http://wwwkeys.pgp.net
>PGP Fingerprint       E182 71C7 1A9D 66E9 9D15  D3CC D4D7 93E2 1FAE F6DF
>     we're tired of banana software - shipped green, ripens at home





More information about the Python-list mailing list