Re: [pygame] Re: Hexagonal collision detection?

2009-09-15 Thread timothy
If your hexagons are individual sprites you could use mask-based collision detection. E.g. have your hexagonal button on a rectangular sprite with the surrounding parts transparent using colour-key transparency. The transparency is then used as the mask for pygame.sprite.spritecollide(), using

Re: [pygame] Re: Hexagonal collision detection?

2009-09-15 Thread timothy
Sorry, that should've been in reply to the OP! timothy wrote: If your hexagons are individual sprites you could use mask-based collision detection. E.g. have your hexagonal button on a rectangular sprite with the surrounding parts transparent using colour-key transparency. The transparen

[pygame] Re: Hexagonal collision detection?

2009-09-15 Thread timothy
If your hexagons are individual sprites you could use mask-based collision detection. E.g. have your hexagonal button on a rectangular sprite with the surrounding parts transparent using colour-key transparency. The transparency is then used as the mask for pygame.sprite.spritecollide(), using

Re: [pygame] How to send a keyboard event ?

2009-11-11 Thread Timothy Baldock
You'd do something like: e = pygame.event.Event(pygame.KEYDOWN, {"key": pygame.K_KP_PLUS}) pygame.event.post(e) pierrelafran...@sympatico.ca wrote: Hi I have a simple question : I want to create a class that generates keyboard event to test my application. Ex : I want a method to send this :

Re: [pygame] pygame.org project editing docs?

2009-12-18 Thread Timothy Baldock
It's just HTML :) B W wrote: Hey yous. Editing my projects, looking for basic editing so I get get something a little more elegant than a run-on paragraph. Can't find anything on pygame.org that looks like docs for the markup. Would some helpful person provide a link, please? Thanks in advance.

Re: [pygame] Optimising a tile map renderer

2010-03-05 Thread Timothy Baldock
Best way to speed up this kind of game is only updating the bits of the screen which change (e.g. dirty sprite list). You might also see speed improvements from using sprites rather than blitting to a surface, e.g. one sprite per tile. Makes it a lot easier to implement a dirty sprite list too

Re: [pygame] Working with maps

2010-05-18 Thread Timothy Baldock
the group containing all the country sprites. This technique means the countries can be any colour you want, or the colour can change without messing things up. I used this method for my isometric game engine to allow selection of tiles and other objects and found it to be quite fast. Thanks, Timo

Re: [pygame] Working with maps

2010-05-18 Thread Timothy Baldock
else: # No collision means nothing to select return None else: return None On 18/05/2010 15:27, Kenny Meyer wrote: Timothy Baldock (t...@entropy.me.uk) wrote: Hi Kenny, I'd do this by making each country a sprite with a transparent background (colou

Re: [pygame] Working with maps

2010-05-18 Thread Timothy Baldock
s are great. -Miguel On Tue, May 18, 2010 at 10:27 AM, Kenny Meyer mailto:knny.m...@gmail.com>> wrote: Timothy Baldock (t...@entropy.me.uk <mailto:t...@entropy.me.uk>) wrote: > Hi Kenny, > > I'd do this by making each country a sprite with a transparen

Re: [pygame] pygame.org DNS error?

2010-06-15 Thread Timothy Baldock
Looks like both the nameservers for pygame.org are offline, ns.f0o.com and ns.py3d.org (which are also both down). :( On 15/06/2010 23:21, Weeble wrote: > I can't load the www.pygame.org website. There seems to be a DNS problem: > > $ dig @8.8.8.8 www.pygame.org > > ; <<>> DiG 9.6.1-P2 <<>> @8.8

Re: [pygame] pypy?

2006-08-22 Thread Timothy Fitz
Let me attempt to clear some pypy things up. PLEASE NOTE, PyPy is a fast moving target, and by that I mean every three months they invent a new paradigm for programming in python. At the moment, you can write in RPython, a subset of python which looks more like pyrex without the type-declarations

Re: [pygame] pypy?

2006-08-23 Thread Timothy Fitz
On 8/23/06, Lenard Lindstrom <[EMAIL PROTECTED]> wrote: PyPy doesn't compile ctypes. It compiles rctypes, a subset of ctypes. As long as the SDL module is only declaring structures and C functions it should work. Sorry I wasn't clear on that. Also of note is that (like everything in pypy) rctyp

Re: [pygame] pypy?

2006-08-29 Thread Timothy Fitz
On 8/29/06, Kris Schnee <[EMAIL PROTECTED]> wrote: Will I be able to use PyPy to build a Python emulator? What do you mean here by emulator?

Re: [pygame] pypy?

2006-08-30 Thread Timothy Fitz
On 8/29/06, Kris Schnee <[EMAIL PROTECTED]> wrote: Why, a simulated version of Python of course -- PyPyPy! Given Py and PyPy, you can trivially recursively prove any number of Pys, including the special case of n=3 Or in other words, I still am not sure what you're asking. PyPy can run PyPy, w

Re: [pygame] pypy?

2006-08-30 Thread Timothy Fitz
On 8/29/06, René Dudfield <[EMAIL PROTECTED]> wrote: Now Apple are using x86, and x86 is getting more common in the embedded world too. Where I work we've been using x86 "embedded" since the first Intel 386s (: So now, rather than creating a VM like python does it seems to make sense to use t

Re: [pygame] PyGame with Eclipse PyDev - PyDev dont know return types.

2006-08-31 Thread Timothy Fitz
On 8/30/06, Jesper Taxbøl <[EMAIL PROTECTED]> wrote: I am working to setup pygame to work with PyDev for Eclipse. I can make it index the pyGame source , so some tab-completion is available. - But pyDev seem to be clueless about the return types from pyGame. PyDev uses some advanced type-infere

Re: [pygame] pypy?

2006-08-31 Thread Timothy Fitz
On 8/31/06, Kris Schnee <[EMAIL PROTECTED]> wrote: It was an attempt at a joke... So was this: """ Given Py and PyPy, you can trivially recursively prove any number of Pys, including the special case of n=3 """ So I guess I fail at being funny, or perhaps not everyone here has been forced to