Re: [pygame] roguelike question

2010-10-04 Thread Marius Gedminas
? Or git and github.com? Or Bazaar and launchpad.net? Marius Gedminas -- The primary purpose of the DATA statement is to give names to constants; instead of referring to PI as 3.141592653589797, at every appearance, the variable PI can be given that value with a DATA statement, and used instead

Re: [pygame] pygame.mixer.init(frequency=?)

2010-02-25 Thread Marius Gedminas
the lossy reencoding. Marius Gedminas -- (mental note: stop installing red hat. everytime i do so, it takes ages to fix my system again.) -- from the sig of Martin H�gman signature.asc Description: Digital signature

Re: [pygame] Requiring pygame in setup.py

2009-10-05 Thread Marius Gedminas
is the right way to ask easy_install to get pygame as a dep when my lib is installed? Marius Gedminas -- To stay awake all night adds a day to your life. -- Stilgar (Frank Herbert _Children_of_Dune_) signature.asc Description: Digital signature

Re: [pygame] [Pygame] Key Configuration

2009-05-12 Thread Marius Gedminas
to have a dictionary from key to action (it also allows you to detect conflicts). However for the purposes of the user interface, it may be more convenient to have a dictionary like you have. It's pretty simple to translate between the two forms, so you could have both. Marius Gedminas -- Never

Re: [pygame] Cairo + SDL

2009-05-04 Thread Marius Gedminas
On Sun, 5/3/09, Marius Gedminas mar...@gedmin.as wrote: On Sun, May 03, 2009 at 07:32:39AM -0700, Yanom Mobis wrote: Is cairo used for game programming? There are a few games using Cairo: http://lists.cairographics.org/archives/cairo/2006-May/007032.html It was not designed specifically

Re: [pygame] Cairo + SDL

2009-05-03 Thread Marius Gedminas
On Sun, May 03, 2009 at 07:32:39AM -0700, Yanom Mobis wrote: Is cairo used for game programming? There are a few games using Cairo: http://lists.cairographics.org/archives/cairo/2006-May/007032.html It was not designed specifically for games, though, unlike SDL. Marius Gedminas -- We don't

Re: [pygame] API draft for vector type

2009-04-28 Thread Marius Gedminas
) Python doesn't allow __len__ to return a non-integer value, thankfully. I didn't even know/had forgotten all about __abs__. thanks again for the quite thorough feedback. Thanks for the comprehensive proposal. Marius Gedminas -- User n.: A programmer who will believe anything you tell him

Re: [pygame] Never seen this before

2009-04-25 Thread Marius Gedminas
it: * http://www.python.org/download/releases/2.2/descrintro/#cooperation * http://fuhm.net/super-harmful/ Marius Gedminas -- Microsoft's entry in this cavalcade of horrors is Universal Plug and Play (UPnP). This is a protocol that allows [...] an end-user system to request a dynamic port

Re: [pygame] Never seen this before

2009-04-25 Thread Marius Gedminas
mistakes never go away. With experience you begin to expect them and check your assumptions more often. There have been countless times I've written unit tests for tiny functions that I couldn't possibly have written wrong, only to discover that I have in fact made a silly mistake. Marius

Re: [pygame] multi-width aalines and aacircles

2009-03-24 Thread Marius Gedminas
would still be a pain, and require an offscreen buffer, which is unfortunate. And, likely you'd ask for variable width AA bezier curves next, which also isn't supported. That one may be because it's hard, though. How about full Cairo support while we're at it? ;-) Marius Gedminas

Re: [pygame] Redraw under mouse cursor in HWSURFACE mode

2009-03-02 Thread Marius Gedminas
differently and is interacting with my redraws (i.e. fails to let them complete well under it). Anyone familiar with this kind of mouse cursor issue in HWSURFACE mode? Thanks Marius Gedminas -- Cool. Does it also recode ISO10646-1 pcf files into the funny permutations and subsets used a long time

Re: [pygame] surfarray on 64-bit machines

2009-03-01 Thread Marius Gedminas
plain PyGame, one that uses Numeric, and one that uses NumPy. The last one will be preferred if available. Marius Gedminas -- main(k){float i,j,r,x,y=-16;while(puts(),y++15)for(x =0;x++84;putchar( .:-;!/)|IH%*#[k15]))for(i=k=r=0; j=r*r-i*i-2+x/25,i=2*r*i+y/10,j*j+i*i11k++111;r=j);} /* Mandelbrot

Re: [pygame] surfarray on 64-bit machines

2009-02-28 Thread Marius Gedminas
On Fri, Feb 27, 2009 at 08:04:30PM -0800, Lenard Lindstrom wrote: Marius Gedminas wrote: Since I'm really clueless about Numeric/numarray/numpy, please tell me if this code has any obvious shortcomings: # initialization, done once import pygame import numpy image

Re: [pygame] surfarray on 64-bit machines

2009-02-26 Thread Marius Gedminas
This was a long time ago (shame on me for not finding the time to investigate this further): On Wed, Oct 22, 2008 at 7:23 PM, Marius Gedminas mar...@gedmin.as wrote: A user reported that PySpaceWar fails on 64-bit Linux machines if I try to scale the alpha channel. Here's the code

Re: [pygame] surfarray on 64-bit machines

2009-02-26 Thread Marius Gedminas
)  alpha = 42.5 # a float varying between 1 and 255  array[...] = (mask * alpha / 255).astype('b') Cheers! Marius Gedminas -- Never trust a computer you can't repair yourself. signature.asc Description: Digital signature

Re: [pygame] Name self not defined

2009-01-28 Thread Marius Gedminas
-0008/ Marius Gedminas -- lg_PC.gigacharset (lg = little green men language, PC = proxima centauri) -- Markus Kuhn provides an example of a locale signature.asc Description: Digital signature

Re: [pygame] Pathfinding

2009-01-26 Thread Marius Gedminas
with A* is that the NPCs seem to know too much about the map and directly walk the most optimal path without exploration. Marius Gedminas -- niemeyer philiKON: I'm changing ZCML to parse files twice as fast.. philiKON niemeyer, weee benjiooh, I like it! philiKON how do you do that? niemeyer

Re: [pygame] fast sqrt? and profiling

2009-01-21 Thread Marius Gedminas
On Wed, Jan 21, 2009 at 07:45:08AM -0800, Ian Mallett wrote: math.hypot() is good for distance calculation. I did some microbenchmarks a while ago, and math.hypot() was faster than x**2 + y**2. I was surprised. Still, avoiding O(n**2) algorithms would be best. Marius Gedminas -- Anything can

Re: [pygame] unit and doc testing questions

2009-01-15 Thread Marius Gedminas
. It pretty much does if module is imported, but not main script, and needs recompile(because was changed): then run tests This sounds very interesting. Do you have a URL? I tried searching on http://code.activestate.com/recipes/langs/python/, but didn't find anything. Marius Gedminas -- Writing

Re: [pygame] unit and doc testing questions

2009-01-14 Thread Marius Gedminas
changes to the source control system (you have one, right?) 3) Other advice relating to testing ? Keep them short and fast. Marius Gedminas -- Microsoft has performed an illegal operation and will be shut down. -- Judge Jackson signature.asc Description: Digital signature

[pygame] surfarray on 64-bit machines

2008-10-22 Thread Marius Gedminas
fine on 32-bit systems. Marius Gedminas -- If C gives you enough rope to hang yourself, C++ gives you enough rope to bind and gag your neighborhood, rig the sails on a small ship, and still have enough rope left over to hang yourself from the yardarm. signature.asc Description: Digital signature

Re: [pygame] Good code for text wrapping?

2008-09-21 Thread Marius Gedminas
On Mon, Sep 22, 2008 at 02:41:28PM +1000, René Dudfield wrote: oops, I also forgot... - CSS3 and CSS4 support. - a pony. I'm sure the last one could be implemented easily, if you had SVG support and Javascript. Marius Gedminas -- In short, at least give the penguin a fair viewing. If you

Re: [pygame] Good code for text wrapping?

2008-09-16 Thread Marius Gedminas
#L466 Output example: http://mg.pov.lt/pyspacewar/pyspacewar-help-screen.png It's GPL-ed, feel free to use or ask me for a licence change if that's not suitable. Marius Gedminas -- If you are smart enough to know that you're not smart enough to be an Engineer, then you're in Business

Re: [pygame] my 3d planet game

2008-06-12 Thread Marius Gedminas
()) ValueError: invalid literal for int() with base 10: '0.6' Cheers! Marius Gedminas -- Special bonus feature: absolutely nowhere in RetchMail's code is there an arbitrary 3-second sleep(). Wow! What other mail retriever can say that? (Hint: not fetchmail.) -- http://open.nit.ca/wiki

Re: [pygame] Battery Life

2008-06-03 Thread Marius Gedminas
your process doing? Marius Gedminas -- It's not illegal to disagree with my opinions (*). [...] (*) Although it obviously _should_ be. Mwhaahahahahaaa... You unbelievers will all be shot when the revolution comes! -- Linus Torvalds signature.asc Description: Digital signature

Re: [pygame] your opinion: singleton-pattern vs. modules vs. classes

2008-03-04 Thread Marius Gedminas
to add a restriction of at most one game in a Python process. Regards, Marius Gedminas -- Computers are not intelligent. They only think they are. signature.asc Description: Digital signature

Re: [pygame] LAN vs Internet

2008-01-31 Thread Marius Gedminas
, including those within that LAN. That would require the server to proxy all communications between players, to work with NATed LANs. Is the latency decrease worth maintaining complex code? You decide. Marius Gedminas -- Never assume the reader has read the subject line. signature.asc

Re: [pygame] Good code

2007-12-07 Thread Marius Gedminas
/pyspacewar/trac/browser/trunk/src/pyspacewar/ Regards, Marius Gedminas -- lg_PC.gigacharset (lg = little green men language, PC = proxima centauri) -- Markus Kuhn provides an example of a locale signature.asc Description: Digital signature

Re: [pygame] Fullscreen Display

2007-12-04 Thread Marius Gedminas
program. I expected the set_mode method to treat the FULLSCREEN as an argument and not as a variable/ object. That's not how Python works. Cheers! Marius Gedminas -- If the code and the comments disagree, then both are probably wrong. -- Norm Schryer signature.asc Description

Re: [pygame] This showed up in pygame-users@seul.org

2007-11-21 Thread Marius Gedminas
://homepage.hispeed.ch/py430/python/ Marius Gedminas -- A real friend isn't someone you use once and then throw away. A real friend is someone you can use over and over again. signature.asc Description: Digital signature

Re: [pygame] Reverse Compiling

2007-08-08 Thread Marius Gedminas
/decompyle/ Marius Gedminas -- If it weren't for the last minute, nothing would get done. signature.asc Description: Digital signature

Re: [pygame] What is wrong with this

2007-07-14 Thread Marius Gedminas
) Cheers! Marius Gedminas -- C, n: A programming language that is sort of like Pascal except more like assembly except that it isn't very much like either one, or anything else. It is either the best language

Re: [pygame] I have a quick question... again...

2007-06-19 Thread Marius Gedminas
version... How do you do 3D tetris? o.O http://en.wikipedia.org/wiki/Blockout Marius Gedminas -- Perl is hard for most people to write. They write PERL or Pearl. -- Abigail signature.asc Description: Digital signature

Re: [pygame] Smooth Scaling for Terrain Generation

2007-06-16 Thread Marius Gedminas
://freespace.virgin.net/hugo.elias/models/m_perlin.htm Marius Gedminas -- Si fractum non sit, noli id reficere. signature.asc Description: Digital signature

Re: [pygame] I have a quick question... again...

2007-06-16 Thread Marius Gedminas
understand theory vs. practice. Marius Gedminas -- Never trust an operating system you don't have sources for. signature.asc Description: Digital signature

Re: [pygame] I have a quick question... again...

2007-06-16 Thread Marius Gedminas
://www.diveintopython.org/unit_testing/index.html http://www.diveintopython.org/unit_testing/stage_1.html Marius Gedminas -- 1 + 1 = 3 -- from a Microsoft advertisement signature.asc Description: Digital signature

Re: [pygame] 'Shining Sea' source code

2007-05-31 Thread Marius Gedminas
no problems after that. Marius Gedminas -- The death rate on Earth is: (computing) One per person. signature.asc Description: Digital signature

Re: [pygame] Need help testing Slingshot rc2

2007-05-26 Thread Marius Gedminas
. Because it doesn't dump a core, gdb was no help either _ If you run 'ulimit -c unlimited' before you run python Slingshot.py, then you ought to get a core file. Marius Gedminas -- To stay awake all night adds a day to your life. -- Stilgar (Frank Herbert _Children_of_Dune_

Re: [pygame] Need help testing Slingshot rc2

2007-05-25 Thread Marius Gedminas
speed would be nice -- not all mice have wheels. Marius Gedminas -- IBM motto: If you can't read our assembly language, you must be borderline dyslexic, and we don't want you to mess with it anyway -- Linus Torvalds signature.asc Description: Digital signature

Re: [pygame] Need feed back on new game!

2007-05-23 Thread Marius Gedminas
over the place here. Marius Gedminas -- Unix for stability; Macs for productivity; Palm for mobility; Windows for Solitaire signature.asc Description: Digital signature

Re: [pygame] Fixed width font

2007-05-19 Thread Marius Gedminas
have those fonts bundled with it. Heck, a PDF viewer is not necessarily installed on all platforms. /pedantic I agree that 'Courier New' ought to be a pretty safe bet. Marius Gedminas -- Any sufficiently advanced technology is indistinguishable from a rigged demo. - Andy Finkel, computer guy

[pygame] Missing fonts on Ubuntu Edgy

2007-03-01 Thread Marius Gedminas
/Message/pygame-users/2970161 Marius Gedminas -- If Linux doesn't have the solution, you have the wrong problem. signature.asc Description: Digital signature

[pygame] Re: Missing fonts on Ubuntu Edgy

2007-03-01 Thread Marius Gedminas
On Thu, Mar 01, 2007 at 04:46:01PM +0200, Marius Gedminas wrote: Suggested fix: have pygame/sysfont.py parse ~/.fonts.cache-1. (There's a slight complication: most fonts.cache-1 files have three fields per line (font name, some number, font properties), while ~/.fonts.cache-1 has four (font

Re: [pygame] alpha channel in font-rendered Surfaces

2007-02-15 Thread Marius Gedminas
can use convert() instead of convert_alpha() (I think...) There's a fallback in PySpaceWar that does this when Numeric is not installed. Marius Gedminas -- 11. Are you at least tracking the number of users of retchmail? As far as I know, retchmail has exactly three users. -- http

Re: [pygame] sdl_ttf font render failed

2007-01-31 Thread Marius Gedminas
failed Actually, you only get this if you call font.render with a string that contains a space character, and with antialias set to False. Seems to be a known bug in the SDL_ttf version that is in Ubuntu. Marius Gedminas -- Always proofread carefully to see if you any words out. signature.asc

Re: [pygame] Masking Test: Simulated Lighting

2007-01-21 Thread Marius Gedminas
On Sun, Jan 21, 2007 at 10:17:32PM +0100, Nicola Larosa wrote: Kris Schnee wrote: I was thinking about how to simulate a lighting effect in Pygame: a character with a portable light source in a dark room. Marius Gedminas wrote: This reminds me of something... Here it is: Escape

[pygame] PySpaceWar 0.9.3

2006-12-25 Thread Marius Gedminas
/pyspacewar/ Testing, feedback of any kind, or return gifts (such as pretty artwork or sound effects) would be appreciated. Cheers! Marius Gedminas -- You can't have megalomania. *I* have megalomania. -- Joe Bednorz signature.asc Description: Digital signature

[pygame] Font.render barfs on spaces

2006-12-16 Thread Marius Gedminas
) Is this a bug? Marius Gedminas -- The IQ of the group is the lowest IQ of a member of the group divided by the number of people in the group. signature.asc Description: Digital signature

Re: [pygame] Galcon linux version

2006-12-13 Thread Marius Gedminas
for it to be included. My memory of everything is a bit hazy, since I haven't used py2exe for ages, but this sounds like the problem I've seen. I'm sure there's a FAQ somewhere. Marius Gedminas -- Woe unto them that rise up early in the morning -- Isaiah 5:11 signature.asc Description: Digital signature

Re: [pygame] I can handle more of a one monitor?

2006-10-10 Thread Marius Gedminas
monitors. Marius Gedminas -- Anybody who doesn't cut his speed at the sight of a police car is probably parked. signature.asc Description: Digital signature

Re: [pygame] PyGame on Palm?

2006-08-30 Thread Marius Gedminas
about Python 2.3 port with a broken link: http://itconnection.ru/pipermail/zopyrus/2005-April/078617.html Marius Gedminas -- He who sacrifices functionality for ease of use Loses both and deserves neither pgpLSSRTgetQ7.pgp Description: PGP signature

Re: [pygame] BUG: display.init() confuses key mods

2006-08-13 Thread Marius Gedminas
. if (mods K_LALT) or (mods K_RALT) or (mods 512): These should be KMOD_LALT and KMOD_RALT, not K_LALT/K_RALT. KMOD_xxx are bit masks used in event.mod, K_xxx are key codes used in event.key. (mods KMOD_ALT) is the same as (mods KMOD_LALT) or (mods KMOD_RALT). Marius Gedminas -- H.323 has much

Re: [pygame] 2D vector class

2006-08-12 Thread Marius Gedminas
, and besides that I needed the accuracy for gravity calculations. You can find my Vector class here: http://mg.pov.lt/pyspacewar/trac/browser/trunk/src/pyspacewar/world.py It has unit tests, and is somewhat optimized (only those bits that showed up when profiling). Marius Gedminas -- C

Re: [pygame] GP2X Game Comp

2006-06-13 Thread Marius Gedminas
and test opening a window: http://jafo.ca/getentry.html?stamp=20060526_0237 Anyway, stand by for a completely different announcement... PySpaceWar (http://mg.pov.lt/pyspacewar) runs on my Nokia 770 without any changes. At about 1 frame per second. ;-) Marius Gedminas -- The only way