Python game coding

Discussion in 'Python' started by Lucas Raab, Sep 18, 2005.

  1. Lucas Raab

    Lucas Raab Guest

    Lucas Raab, Sep 18, 2005
    #1
    1. Advertisements

  2. Very interesting!

    BTW: I wonder if and when someone will use stackless python or pygame as a
    basis for developing a _visual_ development environment for 2D
    games/multimedia like Macromedia Director. It would be a killer app.

    CU
     
    Alessandro Bottoni, Sep 18, 2005
    #2
    1. Advertisements

  3. Blender. It currently doesn't use stacklass AFAIK, but that shouldn't be
    too hard to fix.

    Diez
     
    Diez B. Roggisch, Sep 18, 2005
    #3
  4. Oop - I read 3d instead of 2d.. Hm, 3d _can_ do 2d, so just don't allow
    your cameras do fancy stuff like rotating :)

    Diez
     
    Diez B. Roggisch, Sep 18, 2005
    #4
  5. Very interesting, anyway, both in 2D and in 3D. It looks like I have to
    study Blender a little bit... :)

    Thanks
     
    Alessandro Bottoni, Sep 18, 2005
    #5
  6. Lucas Raab

    TPJ Guest

    OT:
    And what is this stackless python? I have visited it's homepage, but I
    wasn't able to find any answer. (Well, I have found out, that stackles
    python is python's implementation that doesn't use C stack, but it
    tells me nothing...)

    Is this stackless python faster or slower than CPython? Does anybody
    know something?
     
    TPJ, Sep 19, 2005
    #6
  7. The important thing is that the explicit modelling of the call-stack
    allows for running interpreters to be pickled - and thus stopped,
    persisted, reloaded and restarted. That is especially useful in comlex
    AI-code or e.g. workflow environments. The big difference is that you
    can _code_ as if you were always running and totally neglect the
    persistence and reentering issues.

    Diez
     
    Diez B. Roggisch, Sep 19, 2005
    #7
  8. Lucas Raab

    simonwittber Guest

    This article describes a system very similar to my own.

    <shameless plug>
    The LGT library (http://developer.berlios.de/projects/lgt) provides a
    simple, highly tuned 'microthread' implementation using generators. It
    is called NanoThreads. It allows a microthread to be paused, resumed,
    and killed, but not pickled.

    The eventnet module facilitates event-driven programming using a global
    dispatcher. It provides a Handler class which functions in a similar
    fashion to the Actor described in the article.

    We used the above recently, to compete in the pyweek game competition
    (http://mechanicalcat.net/tech/PyWeek/1/) under the moniker TeamXerian.
    Our boring (but glitzy) game used nanothreads to move, and animate 100
    critters at a frame independent rate. Each critter had a thread
    controlling movement and frame swapping.

    I also created an XML scene loader, which allowed designers on the team
    to create a timelined sequence of events, (like a movie script), which
    controlled sound and image elements using pre-programmed movement,
    rotation, scaling and fading style actions.

    If you want to take a peek, you can download a windows exe (17MB) from
    here:
    http://metaplay.dyndns.org:82/~xerian/Quido.zip
    or the source (95k) from here:
    http://metaplay.dyndns.org:82/~xerian/Quido_src_only.zip
    </shameless plug>

    So, forget 'game scripting' in Python, write the whole darn lot in
    Python!

    Sw.
     
    simonwittber, Sep 20, 2005
    #8
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.