Re: [pygame] Use of PyScheme for game projects
Yeah, I'm mainly familiar with procedural and object-oriented languages. I've only recently gotten a wild hair after taking a look at functional languages and how it actually makes perfect sense for them to be used in certain types of games. The fact that I'm looking for a language suitable to allowing user-created and procedurally-created content in a safe context (e.g., no os.system("C:\format") or what have you), is an added bonus, and also a testing-ground for my concepts. Thanks for all the help, folks!On 7/17/06, Bob Ippolito <[EMAIL PROTECTED]> wrote: It sounds like you're not very familiar with functional programming. In a purely functional context, functions are only useful if they have a defined return value, otherwise might as well be comments. Scheme isn't purely functional (or it wouldn't have for-each), but this subset of Scheme probably is. It doesn't make sense to support functions that can't do anything, does it? In either case, for-each is always just an optimization because map does the same thing with a defined return value. -bobOn Jul 17, 2006, at 10:17 PM, andrew baker wrote: So, it's not the familiar "foreach x in y" iterator?On 7/17/06, Bob Ippolito < [EMAIL PROTECTED]> wrote: On Jul 17, 2006, at 9:07 PM, andrew baker wrote: > > Not available: for-each >> This puzzles me, as Python's own "for x in y" is a good example of> a for-each.for-each is only useful if you have procs with side-effects, it's like map except the result is undefined. -bob-- Andrew Ulysses Baker"failrate" -- Andrew Ulysses Baker"failrate"
Re: [pygame] Use of PyScheme for game projects
It sounds like you're not very familiar with functional programming. In a purely functional context, functions are only useful if they have a defined return value, otherwise might as well be comments. Scheme isn't purely functional (or it wouldn't have for-each), but this subset of Scheme probably is. It doesn't make sense to support functions that can't do anything, does it? In either case, for-each is always just an optimization because map does the same thing with a defined return value.-bobOn Jul 17, 2006, at 10:17 PM, andrew baker wrote:So, it's not the familiar "foreach x in y" iterator?On 7/17/06, Bob Ippolito <[EMAIL PROTECTED]> wrote: On Jul 17, 2006, at 9:07 PM, andrew baker wrote:> > Not available: for-each >> This puzzles me, as Python's own "for x in y" is a good example of> a for-each.for-each is only useful if you have procs with side-effects, it'slike map except the result is undefined. -bob-- Andrew Ulysses Baker"failrate"
Re: [pygame] Use of PyScheme for game projects
So, it's not the familiar "foreach x in y" iterator?On 7/17/06, Bob Ippolito <[EMAIL PROTECTED]> wrote: On Jul 17, 2006, at 9:07 PM, andrew baker wrote:> > Not available: for-each >> This puzzles me, as Python's own "for x in y" is a good example of> a for-each.for-each is only useful if you have procs with side-effects, it'slike map except the result is undefined. -bob-- Andrew Ulysses Baker"failrate"
Re: [pygame] Use of PyScheme for game projects
On Jul 17, 2006, at 9:07 PM, andrew baker wrote: > Not available: for-each This puzzles me, as Python's own "for x in y" is a good example of a for-each. for-each is only useful if you have procs with side-effects, it's like map except the result is undefined. -bob
Re: [pygame] Use of PyScheme for game projects
> Ability to define new structuresThis is in reference to control structures like switches, innit?> However that because there is no input or output neither "read" and "write" are implemented.But, obviously, you supply some way to pass data in or out. What is the distinction?> Not available: for-eachThis puzzles me, as Python's own "for x in y" is a good example of a for-each. Thanks,Andrew Baker
Re: [pygame] Frantic memory usage
On Tue, 18 Jul 2006 11:20:26 +1000, "René Dudfield" <[EMAIL PROTECTED]> said: > Very good work! > > Do you have a download link to test? > > ps. have you removed the not needed stuff from the library.zip yet ? Ugh. Not yet. Anyway, you can download the latest here: http://medievalelks.com Alas, I just ran it on my desktop system that has 1.0 GB of RAM, 32 MB of video memory, with a 1.79 Ghz processor and it dragged. Nigh unplayable :-(
Re: [pygame] Frantic memory usage
Very good work! Do you have a download link to test? ps. have you removed the not needed stuff from the library.zip yet ? On 7/18/06, David Mikesell <[EMAIL PROTECTED]> wrote: On Mon, 17 Jul 2006 07:35:44 -0400, "David Mikesell" > weeks ago. RAM footprint ranges from 56 - 64 Mb depending on the number Got that down to 43 - 52 Mb now. Amazing how much I was wasting...
Re: [pygame] Frantic memory usage
On Mon, 17 Jul 2006 07:35:44 -0400, "David Mikesell" > weeks ago. RAM footprint ranges from 56 - 64 Mb depending on the number Got that down to 43 - 52 Mb now. Amazing how much I was wasting...
Re: [pygame] Embedding pygame into wxPython
Alexander 'boesi' Bösecke wrote: Hi Oh man I've must been blind, I've used pygame 1.6 and the main problem disappears with pygame 1.6.2. So it works on XP and W2k now. But the problem with py2exe is still there - the executable crashes with an "abnormal program termination" when pygame 1.6.2 is used. And my question exists further: Why is there no pygame 1.7 for Python2.3? Am 13.07.2006 17:26:19 schrieb Kamilche: if sys.platform == 'win32': os.environ['SDL_VIDEO_WINDOW_POS'] = '3,23' os.environ['SDL_VIDEODRIVER'] = 'windib' This doesn't help. Is there a complete list of environment variables for SDL? I've only found ftp://ptah.lnf.kth.se/pub/misc/sdl-env-vars, but SDL_VIDEO_WINDOW_POS isn't in this list. thx & cu boesi http://www.libsdl.org/cgi/docwiki.cgi/SDL_5fenvvars
Re: [pygame] Embedding pygame into wxPython
On Mon, 2006-07-17 at 13:08 +0200, Alexander 'boesi' Bösecke wrote: > And my question exists further: Why is there no pygame 1.7 for Python2.3? Python 2.4 requires a different MSCV compiler than older releases. Most people can build one or the other, but not both. If you have MSVC5 it is simple to build your own Pygame, once you have the dependencies.
Re: [pygame] Frantic memory usage
On Wed, 12 Jul 2006 09:29:21 -0400, "David Mikesell" <[EMAIL PROTECTED]> said: > The explosions are definitely a problem. Roughly 4.6 Mb of memory for > each, and considering there are two types (regular, ricochet hit) for > each enemy and one for the starship, as much as 41.4 Mb can be hogged on > a level just by explosion images (because there are never more than four > enemies per level, including the boss UFO). I've cut down the explosion memory usage quite a bit. They're still pre-rendered, but now there is only one type of explosion per enemy and I've cut the length all the way down from 60 frames per explosion to 24. They may not look quite as good, but the memory and disk footprint are a lot less hoggy now. Download size is 10 MB, down from 17.5 a few weeks ago. RAM footprint ranges from 56 - 64 Mb depending on the number of enemies loaded per level (never more than four, including boss). Still large, but way down from a few weeks ago when there was no memory management. http://medievalelks.com The music still skips/stutters on my laptop sometimes. I'm looking into that next.
Re: [pygame] Use of PyScheme for game projects
It's as safe as the functions you export into the scheme environment. We currently only export simple functions like add/subtract/if/etc so it's pretty secure. You can see a document of the specification at, http://www.thousandparsec.net/tp/dev/documents/ncl.php#Func_Requirements Hope it helps. Mithro On Sun, 2006-07-16 at 22:39 -0700, andrew baker wrote: > Good, one specific question I have is "Is it safe?" Any known trivial > exploits? In Python, it is trivial for a malicious user to trash > someone's system. > > On 7/16/06, Tim Ansell <[EMAIL PROTECTED]> wrote: > Good idea! > > We are also using pyScheme in our project Thousand Parsec, > http://www.thousandparsec.net/tp/ >
Re: [pygame] Embedding pygame into wxPython
Hi Oh man I've must been blind, I've used pygame 1.6 and the main problem disappears with pygame 1.6.2. So it works on XP and W2k now. But the problem with py2exe is still there - the executable crashes with an "abnormal program termination" when pygame 1.6.2 is used. And my question exists further: Why is there no pygame 1.7 for Python2.3? Am 13.07.2006 17:26:19 schrieb Kamilche: > if sys.platform == 'win32': > os.environ['SDL_VIDEO_WINDOW_POS'] = '3,23' > os.environ['SDL_VIDEODRIVER'] = 'windib' This doesn't help. Is there a complete list of environment variables for SDL? I've only found ftp://ptah.lnf.kth.se/pub/misc/sdl-env-vars, but SDL_VIDEO_WINDOW_POS isn't in this list. thx & cu boesi