[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Scripting



On Tue, 16 Apr 2002, Steve Baker wrote:

>   while ( true )
>   {
>     walk_forwards ( 10 seconds )
>     if ( player within 10 meters )
>       turn_right ( 60 degrees )
>     else
>       turn_left ( 60 degrees )
>   }
>
>...then have 50 copies of this script running for your 50 monsters.
>
>You can't do that with a simple Python script because the script has
>to run to completion before you get control back again and you really
>want all fifty scripts to run only far enough so your critter knows
>what to do for the next 1/60th second.

Why not write the game logic in Python/Perl/whatever and call C functions
for stuff that needs more speed? Games that get developed for Linux aren'
too complex and don't anyway need all the power that current machines can
offer, so why not make the development process easy?

-- 
        Five exclamation marks, the sure sign of an insane mind.
                                              -- Terry Pratchett, Reaper Man