[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] From * import * and Pygame2exe



Yes, the whole crux is that I currently have a proprietary text file
to Python variable and code loader, but if I could replace this with
pure Python, I would be a much happier fellow.  The loader just takes
room data and converts it into a list, then takes some Actor data and
creates a group of Actor instances, then takes a chunk of code,
compiles it, then exec's that code every cycle (this being
room-specific code, like victory conditions, special cases, etc.).

On 7/18/05, Sami Hangaslammi <sami.hangaslammi@xxxxxxxxx> wrote:
> On 7/18/05, kschnee@xxxxxxxxxx <kschnee@xxxxxxxxxx> wrote:
> > Why not store the room data more simply in a text format, or XML, or
> > Pickle? No need to worry about building a mini-compiler into your program,
> > and depending on your format it may be much more space-efficient and
> > easier to edit with a custom "room editor" program.
> 
> Using plain Python syntax for data is very convenient and has lots of
> good points. And you don't need to implement the parser and compiler
> yourself, they come included in Python. Some sort of pickle might be
> nice if you need to edit the files in a custom editor, but for
> hand-editing, the Python syntax is probably close to the nicest thing
> you can get.
> 
> --
> Sami Hangaslammi
> 


-- 
Andrew Ulysses Baker
"failrate"