Python in game development?

Ronald Steedman steedman at quake.cs.fsu.edu
Sun Jul 23 05:09:46 EDT 2000


 Michael Abrash wrote an article on creating micro-languages in assembly
 to create extremely fast programs that perfectly fit the problem domain.
 He believed with good reason that they could outperform both C/C++ and
 general purpose scripting language while allowing easier coding. He also
 didn't believe that they were very difficult to program.

 Tradeoffs would include resources allocated to develop the language as
 well as training time to teach new employees how to use it effectively.
 You would also need a programmer with a thorough knowledge of assembly.

  -- Ron Steedman

In comp.games.development.programming.misc Sean Wilson <newsgroup at neutron.globalnet.co.uk> wrote:

: Before I started trying to write my own scripted language I tried to find
: some tutorials and articles on them but couldn't get them anywhere. Someone
: directed me towards python but I couldn't find anything about the virtual
: machine it uses. How does it work and why is it so slow?

: My system is extremely simple and only allows assembly style instructions
: but I cannot really see how it can be made faster. Using the 'Move
: <Direction of movement> <Number of steps>' command, the following list of
: integers are produced for Move Up 3 (where capitals are constant values):

: CMD_MOVE
: CONSTANT
: DIR_UP
: CONSTANT
: 3

: I just have a big 'switch' statement which the first integer is sent to,
: with each command having matching 'case' statement. The relevant command
: code then reads in one parameter at a time, moving the current integer
: pointer in the script forward after each. The parameters are then send to
: the C++ Move function to be executed.

: I found a tutorial on Flipcode which used a stack machine but this seems
: very slow compared to this approach. One big disadvantage though of my
: approach is that I'm allowing no compound statements (e.g. Move Up (1 + 2)),
: but this isn't a problem since the game is based on a 2d tile map.

: What other methods are there? How do professional games such as Unreal do
: it?

: Regards,

: Sean Wilson
: http://www.users.globalnet.co.uk/~neutron/programming





More information about the Python-list mailing list