By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,767 Members | 1,987 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,767 IT Pros & Developers. It's quick & easy.

Python game coding

P: n/a
Saw this on Slashdot
(http://developers.slashdot.org/artic...82207&from=rss)
and thought some people might be interested in it. Direct link to the
article is
http://harkal.sylphis3d.com/2005/08/...ckless-python/

--
--------------------------
Lucas Raab
lvraab"@"earthlink.net
dotpyFE"@"gmail.com
AIM: Phoenix11890
MSN: dotpyfe "@" gmail.com
IRC: lvraab
ICQ: 324767918
Yahoo: Phoenix11890
Sep 18 '05 #1
Share this Question
Share on Google+
7 Replies


P: n/a
Lucas Raab wrote:
Saw this on Slashdot
(http://developers.slashdot.org/artic...82207&from=rss)
and thought some people might be interested in it. Direct link to the
article is
http://harkal.sylphis3d.com/2005/08/...ckless-python/


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 '05 #2

P: n/a
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.


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

Diez
Sep 18 '05 #3

P: n/a
Diez B. Roggisch wrote:
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.

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


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
Sep 18 '05 #4

P: n/a
Diez B. Roggisch wrote:
Diez B. Roggisch wrote:
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.

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


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


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 '05 #5

P: n/a
TPJ
OT:
BTW: I wonder if and when someone will use stackless python (...)


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?

Sep 19 '05 #6

P: n/a
TPJ wrote:
OT:

BTW: I wonder if and when someone will use stackless python (...)

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?


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
Sep 19 '05 #7

P: n/a
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/~xeria...o_src_only.zip
</shameless plug>

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

Sw.

Sep 20 '05 #8

This discussion thread is closed

Replies have been disabled for this discussion.