[Stackless] Reducing stackless footprint

Jacob Gorm Hansen jg at ioi.dk
Sat Sep 1 20:37:01 CEST 2001


Hi,

I'm trying to implement SLP 2.0 in a game engine, for use in a games project
which has to run in the limited memory of consoles such as the Playstation2.

I've been using Python for other (serverside) projects, and finally been given
the go for examining the potential for replacing our own simple state-language,
with similar Python functionality. Naturally, I'm facing a lot of scepticism
about the viability of this project from my C++ loving colleagues.

I have a few questions:

1) How do I best reduce the footprint of the interpreter. I'm going to need
floats, but not much more. Specifically I don't need the ability to eval()
strings, just the bytecode interpreter. I saw the patch for 1.5.1 where some
Finnish guys got it squeezed into 256K, has anyone had similar luck with 2.0
(and perhaps also Stackless)?
I've tried editing everything out of Modules/Setup, but the .so (on linux) is
stil about 1.3megs which is too much. I'd say about 512K would make things
possible (I'm fighting with other programmers and graphics people over memory
space).

2) Am I wrong at assuming that implementing a hierachical state machine where
states and event handlers can be subclassed and overridden could be rather
easily achieved using SLP and microthreads? Anyone have examples of doing that?

3) Is expecting SLP to handle game logic for about 50 simultaneous game 
characters at once (one or two threads per character), realistic?

4) Is it possible to pickle microthreads for use in save-games etc.?

Thanks in advance,
Jacob
_______________________________________________
Stackless mailing list
Stackless at starship.python.net
http://starship.python.net/mailman/listinfo/stackless



More information about the Stackless mailing list