Re: [SPAM: 6.600] Re: [pygame] Re: removing 'experimental' notice from pygame.math

2018-03-03 Thread Russell Jones
IDK about physics, but AIUI, Z points from side to side, Y points down and X points diagonally; it's Λ that points up. (sorry) Russell On 1 March 2018 at 08:43, Greg Ewing wrote: > Daniel Pope wrote: > > Y points up in real physics? >> > > No, no, no. Z points up in real physics! > > -- > Greg

Re: [pygame] Python 2.7 with pygame on Mac Sierra (10.12.2)

2016-12-30 Thread Russell Jones
It's simpler, but not easier... modifying the system Python on OS X is a bad idea. See https://docs.python.org/3/using/mac.html AIUI it's not even possible with SIP enabled on 10.11+ Russell On 30 December 2016 at 21:41, Irv Kalb wrote: > To try to get pygame 1.9.2 installed easily (without any

Re: [pygame] Python 2.7 with pygame on Mac Sierra (10.12.2)

2016-12-29 Thread Russell Jones
Don't install it with sudo. Use a virtualenv or install a package manager such as MacPorts or Anaconda. Russell On 29 December 2016 at 22:34, Daniel Foerster wrote: > I'm thinking you should probably throw a sudo on the front of that (or > whatever the Mac equivalent is). > > On 12/29/2016 04:1

Re: [pygame] pygame.pixelcopy.array_to_surface(Dest, Src) not working

2016-12-24 Thread Russell Jones
On 24 December 2016 at 17:39, Mikhail V wrote: > The problem is however, transpose adds overhead, ca. 10-15% performance > hit, Have you played with order='FORTRAN'? See https://docs.scipy.org/doc/numpy/reference/generated/numpy.isfortran.html

Re: [pygame] Gracefully exiting with errors

2015-09-05 Thread Russell Jones
I use try: ... except: raise #show what went wrong finally: pygame.display.quit() This works for me with pygame_sdl2 in a python 3.4.0 virtualenv (using idle with a script in the VE as per http://stackoverflow.com/questions/4924068/how-to-launch-python-idle-from-a-virtual-environment-virt

Re: [pygame] Install documentation is down?

2015-04-06 Thread Russell Jones
flip() except: raise #show what went wrong finally: pygame.display.quit() #close the window On 6 April 2015 at 19:15, Russell Jones wrote: > I just installed it under 3.4.0 on Ubuntu 14.04 in a VE with "pip install > hg+https://bitbucket.org/pygame/pygame"; though I've

Re: [pygame] Install documentation is down?

2015-04-06 Thread Russell Jones
ported? And last I checked, Pygame was 2.x only. Is that > still true? > > On Mon, Apr 6, 2015 at 10:48 AM, Russell Jones > wrote: > > I am, yes. There's a(n old) version here: > > > http://web.archive.org/web/20140227121133/http://www.pygame.org/install.html > >

Re: [pygame] Install documentation is down?

2015-04-06 Thread Russell Jones
I am, yes. There's a(n old) version here: http://web.archive.org/web/20140227121133/http://www.pygame.org/install.html What OS and Python version are you using? Russell On 6 April 2015 at 17:07, Eryn Wells wrote: > Hi all, > > I've been trying to find information about how to install Pygame. I

Re: [pygame] Pygame for python 2.7 64bit - Yosemite - Help!!

2015-03-30 Thread Russell Jones
d to use > HomeBrew to install Pygame in my Anaconda directory - it likes to use > /usr/bin - which perhaps is good if I did not have Anaconda. If MacPorts > can install in the directory where Python actually resides, this might be > my solution. > > Thanks for your help, > Jeff &

Re: [pygame] Pygame for python 2.7 64bit - Yosemite - Help!!

2015-03-29 Thread Russell Jones
Just to be clear, are you saying py27-game in MacPorts doesn't work? Or did you perhaps miss it because of the slightly odd port name? Russell On 21 March 2015 at 22:43, JeffreyDanowitz wrote: > Actually what did happen in the beginning is that brew did install Python > once I opened another te

Re: [pygame] keyboard event bad issue on 64-bit fedora linux

2014-12-05 Thread Russell Jones
What type of video card are you using? Which kernel version, and which window manager? Are you using any input methods for non-Latin languages? Russell On 1 November 2014 at 18:19, Mikhail V wrote: > Hello, > > Recently I've tested some of my pygame scripts on 64-bit Fedora 20 linux > and to my

Re: [pygame] BUG: Mask.overlap_mask

2014-07-05 Thread Russell Jones
, 79, 77, 75, 73, 71, 69, 67, You can file a bug at the link below, I couldn't find any existing issues mentioning overlap_mask with a quick search. https://bitbucket.org/pygame/pygame/issues Russell On 5 July 2014 21:26, Russell Jones wrote: > Might it be that one method assumes a

Re: [pygame] BUG: Mask.overlap_mask

2014-07-05 Thread Russell Jones
Might it be that one method assumes a position of (0,0) if none is set, and the other does not? Is the result consistent for the unexpected result? If not, that would suggest the values have not been initialised. Russell On 19 June 2014 16:14, Florian Krause wrote: > Hello together, > > Mask.o

[pygame] Re: [pygame] Re: [pygame] problem with pygame.font and symbol °

2014-05-29 Thread Russell Jones
unicode strings (u"") specifying how those bytes should be translated to a sequence of unicode code points in a string. (I've not used python on windows much, so you might need to specify utf16le or something else, mbcs?) Russell On 26 May 2014 07:52, Russell Jones wrote: > &

[pygame] Re: [pygame] Re: [pygame] problem with pygame.font and symbol °

2014-05-25 Thread Russell Jones
On 14 May 2014 17:49, Dominik George wrote: > str(angle)+"°" > Or for Python 2.7 and 3.3+ compatibility (str(angle)+u"°").encode("latin1") Note that in 2.7 adding the normal string to the unicode one produces a unicode string. It might seem better to use unicode(), but this doesn't exist in 3.

Re: [pygame] pygame on Python 3.4 pip install

2014-04-18 Thread Russell Jones
I should add that though Debian has marked its absence as an important bug, ensurepip is not (or wasn't when I last checked a week or two ago) used in Debian Testing, and definitely isn't in Ubuntu 14.04, with pyvenv. So you still have to install your own. Russell On 18 April 2014 21:2

Re: [pygame] pygame on Python 3.4 pip install

2014-04-18 Thread Russell Jones
On Ubuntu 14.04, I installed it with the following sudo apt-get install mercurial "libsdl.*1.2-dev" build-essential sudo apt-get build-dep python-pygame sudo apt-get install python3-all-dev libswscale-dev libfreetype6-dev libavformat-dev pyvenv-3.4 --without-pip pygameve cd pygameve source bin/act

Re: [pygame] IDE ?

2014-04-16 Thread Russell Jones
I like spyder. Version 2.3 (in beta) supports python 3. It has variable and object inspection, class/source hierarchy panel, embedded ipython console (if you have zmq installed) and other nice stuff. You could try installing it from the repository in a virtualenv with pip install hg+https://bitbuck

Re: [pygame] PATCH: pygame.draw moire hole fix

2014-02-08 Thread Russell Jones
It seems that sdl_gfx has been ported to sdl2 http://sdl.5483.n7.nabble.com/Interpolate-and-SDL-2-0-alternatives-to-sdl-gfx-features-td37500.html Might it be that something has to be added to the core to get decent primitive support? PySDL2 seems to wrap the port http://pysdl2.readthedocs.org/en/la

Re: [pygame] Pygame > Python3

2013-10-05 Thread Russell Jones
sdl2 doesn't work either sudo port install py33-sdl2 python3.3 import sdl2 Traceback (most recent call last): File "/opt/local/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages/sdl2/dll.py", line 99, in dll = _DLL("SDL2", ["SDL2", "SDL2-2.0"], os.getenv("PYSDL2_D

Re: [pygame] Pygame > Python3

2013-10-05 Thread Russell Jones
Hm, well I just tried this (ish): Install MacPorts ( http://macports.org ) sudo port install py32-game python3.2 import pygame And I get Symbol not found: _PyCObject_AsVoidPtr OK, so let's try a virtualenv sudo port uninstall py32-game sudo port install py32-virtualenv virtualenv-3.2 --system-s

Re: [pygame] SDL 2.0

2013-09-19 Thread Russell Jones
Which wiki? SDL2, PySDL2 or Pygame? Just playing, but here are (probably suboptimal, even ignoring the naive algorithm) Pygame and PySDL2 examples of Conway's life. They require a recent numpy. I'd be interested to hear about better approaches. I'd like to get my head around using OpenGL "shader"

Re: [pygame] Re: Installing pygame on Snow Leopard 10.6.8

2013-09-13 Thread Russell Jones
I think all of those are in MacPorts apart from PySDL. Well, it looks like it's in... https://trac.macports.org/browser/trunk/dports/python/py-SDL2/Portfile I can't check as I'm not at a Mac just now. The thing to check with MacPorts is that you're building with the right variants, e.g. to use t

Re: [pygame] Distributing a Pygame game on Linux

2013-05-14 Thread Russell Jones
You may need to use ldd on the libraries you find by running ldd on the binary. Russell On 14 May 2013 14:39, Kevin Locoh wrote: > Many thanks for the feedback, I'll make a new build including the missing > library soon, probably tomorrow. There are quite probably a few other > missing libraries

Re: [pygame] Python comparing float

2012-08-28 Thread Russell Jones
Alternatively, in the numpy module (part of the Scientific Tools for Python http://www.scipy.org/ ) there is the linspace function, which you could use like this for x in numpy.linspace(0,2,21): print(x) Russell On 23 August 2012 14:34, Ricardo Franco wrote: > Well, this is a good idea, I g

Re: [pygame] I need the Noob wiki

2012-06-07 Thread Russell Jones
So 3.2 shouldn't have things made compatible with it because it doesn't have things that are compatible with it? Or am I missing something? Russell On 7 June 2012 06:56, Ian Mallett wrote: > On Wed, Jun 6, 2012 at 10:48 PM, Jeffrey Welch wrote: > >> Can someone answer that? >> What Pygame, if a

Re: [pygame] Re : [pygame] raycasting engine performances (numpy array)

2012-05-04 Thread Russell Jones
On 29 April 2012 20:48, Ian Mallett wrote: > As with others, absolutely: raycasting is going to be slow. It's slow > even in C, and that's kinda the reason GPUs were invented. As far as > optimization, often people set up 2D arrays laid out in memory with x as > the second variable. So, althou

Re: [pygame] Extending OpenGL support in Pygame

2012-04-05 Thread Russell Jones
Presumably the textures have an alpha channel. If so, that would seem possible to hide that requirement from the developer by making the excess invisible and checking collisions outside OpenGL. It might be useful to have optional exceptions for inefficient sprite sizes (defaulting to off, perhaps l

Re: [pygame] Trouble with PixelArray

2012-03-26 Thread Russell Jones
This may or may not be relevant, but notice that 41+86=128. [bin(x) for x in [0, 41, 86, 127]] [0b0, 0b101001, 0b1010110, 0b111] Russell On 19 February 2012 17:00, Erik Grahn J. wrote: > Hey all, > > I'm writing something where I load 4-colour indexed PNG images (8x8 tiles) > with a simple

Re: [pygame] How to close audio file?

2012-03-23 Thread Russell Jones
Not tested, but try getting a file object and using that instead, e.g. f=open('myfile.wav') pygame.mixer.music.load(f) ... pygame.mixer.music.stop() f.close() Russell On 21 March 2012 01:13, kfank wrote: > I'm using pygame to play a wav file using the mixer.music module, but > after completion

Re: [pygame] "Making Games with Python & Pygame" free book

2012-03-19 Thread Russell Jones
Ah, misread red-blue-yellow. That's interesting, thanks. Russell On 19 March 2012 19:02, Russell Jones wrote: > I'm pretty sure that's not the whole story as pigments are subtractive > whilst light is additive. One can't take red, green and blue paint and make >

Re: [pygame] "Making Games with Python & Pygame" free book

2012-03-19 Thread Russell Jones
I'm pretty sure that's not the whole story as pigments are subtractive whilst light is additive. One can't take red, green and blue paint and make any colour. IIRC. Russell On 19 March 2012 16:10, Ian Mallett wrote: > On Mon, Mar 19, 2012 at 9:49 AM, Russell Jones wrote: &g

Re: [pygame] "Making Games with Python & Pygame" free book

2012-03-19 Thread Russell Jones
Great news :) I liked IYOCGwP and have mentioned it here before now. BTW, on page 34 of the new book you write "(Red, blue, and yellow are the primary colors for paints and pigments, but the computer monitor uses light, not paint.)" The primary colours for pigment and paint are cyan, yellow and m

Re: [pygame] diagramming tool

2012-01-10 Thread Russell Jones
http://freemind.sourceforge.net/wiki/index.php/Main_Page looks good, and I've heard good things about it, though it does look a bit bloated. Russell On 9 January 2012 17:12, Sean Wolfe wrote: > I'm searching around for a tool to diagram out ideas and program > structure. I don't need to generat

Re: [pygame] Segfault on loading font from StringIO

2012-01-02 Thread Russell Jones
In summary, the font reading function in SDL relies on a filename, so as it stands, reading from a file-like object won't work. Covering the buffer to a string causes the data to be interpreted as a filename, which unsurprisingly gives an IOError saying the font filename can't be read (line 600 of

Re: [pygame] Segfault on loading font from StringIO

2012-01-01 Thread Russell Jones
I had a little play with this, and the following segfaults, too (on OS X 10.7 w/ Macports Python 2.7 and pygame 1.9.1) import pygame import io pygame.font.init() f = open("/opt/local/share/wine/fonts/symbol.ttf", "r") font = pygame.font.Font(f, 8) # Works fine f.close() f = open("/opt/local/sha

Re: [pygame] setting + modifying a variable for use across the entire application

2011-12-12 Thread Russell Jones
""" I'm not sure that works as you expect, though perhaps I've misunderstood what you're doing. Have a look at this and see what you think. Note file2.x stays as 1, but config.mutated changes to 2 c.m reset file1 1 1 c.m incd file3 1 f1 2 f2 2 f3 2 """ #__main__ import file1 as a import file2 pri

Re: [pygame] more basic python lists question

2011-11-19 Thread Russell Jones
I don't know if it was intentional, but that's a masterful play on words if so :) On 19 November 2011 03:41, Jake b wrote: > That's called 'list comprehension': > http://docs.python.org/tutorial/datastructures.html#list-comprehensions > > On Thu, Nov 17, 2011 at 8:14 PM, Lee Buckingham > wrote:

Re: [pygame] man oh man Java is painful

2011-11-04 Thread Russell Jones
This is going way off topic, but I think Java is intended for situations where you have a small core team of highly competent programmers and a large pool of semi- and incompetent ones, with no easy means of distinguishing the latter two categories. It allows you to create an environment where cert

Re: [pygame] man oh man Java is painful

2011-11-03 Thread Russell Jones
Well, there is jython . It's a version of Python that runs under the JVM with, roughly, Python 2.5 syntax. I think you can use Java objects from it, so you'd need to use Java APIs for graphics. I'm all but certain that pygame wouldn't be available. Russell

Re: [pygame] Students Interested in Pygames Community

2011-10-22 Thread Russell Jones
Hello Elinor, You might like to look at the book "Invent Your Own Computer Games with Python" It's available from Amazon as a paper book, but you can look at the whole thing on-line first. Chapters 17-20 are on pygame, with the others on more basic topics. See http://inventwithpython.com/chapters/

[pygame] Surprising result of applying pygame.sndarray.make_sound() to output of numpy.fft.rfft()

2011-10-08 Thread Russell Jones
Hello all, I had a look in the mailing list archives for FFT and Fourier, and couldn't find anything that looked relevant. The following code has a surprising result: it outputs sound.wav twice. I'd expect some random sounding noise the second time. There's nothing in the documentation for pygame