Re: [pygame] I'm loving wills book :)

2008-04-02 Thread Kamilche
Lamonte(Scheols/Demonic) wrote: that pygame book, its nice, anyone learn anything new? Oh yeah, I was going to get that! Thanks for mentioning it. It took a while to come out!

Re: [pygame] Tiling a Rotated Bitmap

2008-04-02 Thread Kamilche
(your code worked up into a program), and wave the mouse back and forth to change the angle. Odd, huh? It's a tricky bit, apparently. The only hits I found on the internet were for software patents I didn't understand. --Kamilche import pygame import math filename=rC:\Documents and Settings

Re: [pygame] Tiling a Rotated Bitmap

2008-04-02 Thread Kamilche
Well, that was interesting, but also didn't work. It's similar to my attempt of tiling then rotating then cutting a piece out of the middle. I've modified the code to show what happens when that tile is tiled. Interesting, tho! --Kamilche import pygame import math filename=rG:\Incarnation

Re: [pygame] Tiling a Rotated Bitmap

2008-04-02 Thread Kamilche
. Do you spot a mistake in the app I posted? --Kamilche

[pygame] Tiling a Rotated Bitmap

2008-04-01 Thread Kamilche
. I see that the problem is a lot more complex than I thought, and I don't have a handle on how to do it. Does anyone know how to perform such a task? --Kamilche

Re: [pygame] Tiling a Rotated Bitmap

2008-04-01 Thread Kamilche
Well, basically, I want to take a picture, rotate it 15 degrees, and use some algorithm to jam all the pixels lying outside the bounding box back inside the box, and have the result be tilable. I thought it should be possible, but it's a thornier problem than I realized. --Kamilche

Re: [pygame] Perspective Test

2008-03-11 Thread Kamilche
title so it comes up in future searches! I also enjoyed it. --Kamilche

Re: [pygame] Perspective Test

2008-03-08 Thread Kamilche
Julia wrote: Awesome code Kamilche. I really like it. I'm going to put it in my favorites folder :) Thanks, glad you enjoyed it! I should probably mention I was inspired to create this code after reading an explanation of one point perspective at this site: http://www.olejarz.com/arted

[pygame] Perspective Test

2008-03-07 Thread Kamilche
Here's a perspective test I wrote, that I thought others might find enjoyable. It illustrates a single-point perspective (a 'vanishing point'), and shows how a room with a floor, ceiling, door, and avatar changes as the vanishing point changes. import pygame, os, sys, urllib SCREENSIZE

Re: [pygame] Text To Speech PYTTS

2008-02-29 Thread Kamilche
I just posted an example on comp.lang.python about how to control the Microsoft Genie agent using Python, if you are interested. --Kamilche

Re: [pygame] Text To Speech PYTTS

2008-02-29 Thread Kamilche
Ian Mallett wrote: That is an interesting effect... Thanks for sharing! I don't think that could be adapted to a game very well though. Ian You could have the genie do tts on all the chat stuff, mainly. Other than that, not much application.

Re: [pygame] When is pygame 1.8 coming out?

2008-01-24 Thread Kamilche
pygame was receptive to other people's ideas. I've submitted improvements to the examples before, and added features like cross-platform 'full screen mode', but they never got put into the software. I'll take another look at pygame ctypes later today. --Kamilche

Re: [pygame] When is pygame 1.8 coming out?

2008-01-24 Thread Kamilche
Bo Jangeborg wrote: Kamilche skrev: Luke Paireepinart wrote: Also - I was trying to make DLL's for Python in the past, and discovered the gnarly 'must have the same compiler Python was compiled with' error. Is that gone with Python 2.5? Basically - if I go to the effort of making

Re: [pygame] When is pygame 1.8 coming out?

2008-01-24 Thread Kamilche
Marcus von Appen wrote: On, Thu Jan 24, 2008, Kamilche wrote: Bo Jangeborg wrote: [...] What's stopping you from joining the developers ? It's a collaborative effort of volunteers as far as I know. Bo) I tried. I submitted some changes, some code samples, went to a Thursday online

Re: [pygame] When is pygame 1.8 coming out?

2008-01-24 Thread Kamilche
Marcus von Appen wrote: too. It's still not released ;-). But don't you want beta testers? ;-) Put it under a heading of 'beta' - that'd be good. We all know that means 'use at your own risk.' --Kamilche

[pygame] When is pygame 1.8 coming out?

2008-01-23 Thread Kamilche
version. If it's still not available, what have people migrated to for their Python 2.5 game development? Are they using ctypes with SDL, or something? --Kamilche

Re: [pygame] When is pygame 1.8 coming out?

2008-01-23 Thread Kamilche
Patrick Devine wrote: On Jan 23, 2008 9:59 AM, Kamilche [EMAIL PROTECTED] wrote: If it's still not available, what have people migrated to for their Python 2.5 game development? Are they using ctypes with SDL, or something? I thought everyone was using Pyglet now. :-D -pdev. Well, I'm

Re: [pygame] When is pygame 1.8 coming out?

2008-01-23 Thread Kamilche
intricacies and dependency on Pygame. If anyone's interested, I can post the example I've made when I get back home tonight. --Kamilche

[pygame] New GUI

2008-01-22 Thread Kamilche
in that area, I'd appreciate hearing them. --Kamilche

Re: [pygame] New GUI

2008-01-22 Thread Kamilche
Marcus von Appen wrote: On, Tue Jan 22, 2008, Kamilche wrote: [Unhappiness about the existing GUIs] It's interesting to see that a lot of people tell some public list/forum/whatever how unhappy they are with existing solutions, but do not dare to get into touch with any of the solution

Re: [pygame] New GUI

2008-01-22 Thread Kamilche
Patrick Mullen wrote: For a toolkit that can only be used in pygame, ignoring things like pyopengl, python-ogre, etc, such limited use I don't see as being very marketable. If it was generalized, and pluginable to almost any python program, that starts to have some real value. True - being

[pygame] Re: New GUI

2008-01-22 Thread Kamilche
Marcus wanted an example of how events could be handled better. I've worked up an example of how the mainline code could look, if the event handling were done using a more VB-like structure. import kamgui # This example creates a screen with 2 buttons and 3 labels. #

Re: [pygame] Code: Center of Triangle

2007-09-28 Thread Kamilche
DR0ID wrote: Hi def CalculateDistance(a, b): x, y, z = b[0] - a[0], b[1] - a[1], b[2] - a[2] dist = x*x + y*y + z*z return dist * dist no offense, but x*x + y*y + z*z is already the distance squared, so no need for return dist*dist. (or did you do this on purpose?). ~DR0ID

[pygame] Code: Center of Triangle

2007-09-27 Thread Kamilche
Worked this up today for myself, thought I'd post it in case someone else found it useful. import pygame def CenterOfTriangle(A, B, C): return (A[0] + B[0] + C[0])/3.0, (A[1] + B[1] + C[1])/3.0, (A[2] + B[2] + C[2])/3.0 def CalculateDistance(a, b): x, y, z = b[0] - a[0], b[1] -

Re: [pygame] refresh problem

2007-09-06 Thread Kamilche
Lots of people forget to put 'pygame.event.pump()' in the main loop. Try that, see if it stabilizes.

Re: [pygame] Not Quiting

2007-07-01 Thread Kamilche
with IDLE, also call 'pygame.event.pump()' every time through the main loop. Between that and calling 'pygame.quit()' at the end, all works fine. --Kamilche

Re: [pygame] Not Quiting

2007-06-30 Thread Kamilche
Ian Mallett wrote: By code I mean any program that works otherwise, by it crashes I mean I have to quit using the taskmanager and endtask, and by how I quit I mean keystate = pygame.key.get_pressed() for event in pygame.event.get(): if event.type == pygame.QUIT or keystate[K_ESCAPE]:

Re: [pygame] Starting Window Position

2007-06-28 Thread Kamilche
Ian Mallett wrote: My name is Ian. The full story on this is that I sent the message from my computer and then it sent a reply email saying it didn't work. I sent my message to my friend, Ken, who is also on the mailing list to see if he could get better results. As soon as he had sent my

Re: [pygame] Text-Based RPG

2007-06-19 Thread Kamilche
Kris Schnee wrote: What's different about the tavern versus a regular room? Most likely it's just some variables that you might as well put into a single Room class. For instance, if a room can be light or dark, you could give the Room class a light variable by putting in the __init__

Re: [pygame] 3D sample code

2007-06-08 Thread Kamilche
Will McGugan wrote: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: On Thu, June 7, 2007 2:45 pm, Horst JENS wrote: On Mon, 2007-06-04 at 21:19 +0100, Will McGugan wrote: I've just posted some sample code for using OpenGL with PyGame. Hope you find it interesting.

Re: [pygame] QuadMap

2007-06-07 Thread Kamilche
DR0ID wrote: nice! Some comments would be appreciated. Is it an affine transformation? The hit test look like raytracing code; how does it work? Well, no can do - I'm looking stuff up in books and online, and barely understanding this myself. For instance - you must specify the

[pygame] QuadMap

2007-06-06 Thread Kamilche
Here's a program that will map points from one quadrilateral to another quadrilateral: import pygame, math WIDTH = 800 HEIGHT = 600 BLACK = ( 0, 0, 0, 255) WHITE = (255, 255, 255, 255) RED = (255, 0, 0, 255) YELLOW = (255, 255, 0, 255) BLUE= ( 0, 0, 255, 255)

Re: [pygame] Slow performance in fullscreen mode

2007-05-31 Thread Kamilche
Brian Bull wrote: Hi, My Pygame app runs fine in windowed mode, using pygame.display.set_mode((1024,768)) But when I switch to fullscreen mode with pygame.display.set_mode((1024,768),pygame.FULLSCREEN) the display looks fine but the app speed slows down dramatically. Perhaps the

Re: [pygame] Choppy sound playback

2007-05-08 Thread Kamilche
. If that still doesn't do it for you, try turning the volume down to .5 on the channel. --Kamilche

Re: [pygame] sound crackling and fmod

2007-04-30 Thread Kamilche
is a little worse than Windows Media Player, but at least it's not grating to the ears any more. --Kamilche

Re: [pygame] Fugu's Friend

2007-04-27 Thread Kamilche
your blog. :-) --Kamilche

Re: [pygame] Sub-pixel rendering

2007-04-25 Thread Kamilche
. You've obviously got the maths to do it. ;-) --Kamilche

Re: [pygame] Path finding demo, now with more fugu

2007-04-20 Thread Kamilche
that you enjoy juggling technology women. I'm a technology woman - but you'd have to find 2 others before you could juggle us. ;-) --Kamilche

Re: [pygame] pygame standard mouse

2007-04-19 Thread Kamilche
, I throw all away except the first one. If you wanted to be more accurate, you should probably throw away all except the LAST movement. That way you're always guaranteed of being up to date. --Kamilche

Re: [pygame] PyWeek #4 in April!

2007-03-08 Thread Kamilche
they've developed in the past as part of their project. Just my 2 cents worth. I'd be happy to see your online game in the competition, as long as you included the source code. :-D --Kamilche

Re: [pygame] pygame is a disgrace

2007-02-15 Thread Kamilche
, and ensuring YOU will never receive any support from people who read this mailing list. --Kamilche

Re: [pygame] Perspective Transform Quad

2007-02-01 Thread Kamilche
Well, thanks for the info. I thought as much. I think I'll give it a miss - I don't need it badly enough to require OpenGL to be included as well. --Kamilche

Re: [pygame] Pixel Perfect collision suggestion.

2007-01-30 Thread Kamilche
V. Karthik Kumar wrote: I happened to read the changes list a day ago. I saw the code, I thought that this change might help detect regular pp cols faster. This version keeps checking pixels from the outer rectangle of the colliding area to the inner. It works considerably faster when objects

Re: [pygame] Masking Test: Simulated Lighting (Follow-Up)

2007-01-21 Thread Kamilche
Kris Schnee wrote: Kamilche wrote: Try the following code. It uses a gradient light. I'm trying to figure out how your example (much better than mine) works. It looks like the key is the last line of this function: def RefreshNight(night, alpha, light, x, y): a = NIGHTCOLOR[3

Re: [pygame] Load Graphics 30x faster than pygame.image.load

2007-01-20 Thread Kamilche
a pygame image load. The speed bump truly surprised me! --Kamilche

Re: [pygame] Load Graphics 30x faster than pygame.image.load

2007-01-20 Thread Kamilche
Luke Paireepinart wrote: Kamilche wrote: Bob Ippolito wrote: That doesn't seem to make any sense... you've already loaded the picture, why convert it to a string just to convert it back to a picture? It's using up about the same amount of RAM as a string or as an image object. Assume

Re: [pygame] Load Graphics 30x faster than pygame.image.load

2007-01-20 Thread Kamilche
the animations for a script, or load them in a separate thread, or something. --Kamilche

[pygame] Load Graphics 30x faster than pygame.image.load

2007-01-19 Thread Kamilche
else tho! (Someone that doesn't need 256 color images.) --Kamilche

Re: [pygame] BUG: / key won't work with brazilian ABNT 2 keyboard

2007-01-13 Thread Kamilche
Aaron Maupin wrote: Not sure if this is connected, but when I was working on a Pygame project with text input, it didn't detect my Japanese keyboard. It seemed to treat it like a standard U.S. keyboard. For example, if I pressed SHIFT-2, I got an @ instead of the correct . I was using

Re: [pygame] BUG: / key won't work with brazilian ABNT 2 keyboard

2007-01-12 Thread Kamilche
: print event.key I noticed that event.key is 0 when I press that key. Any ideas on what is going on? Thanks, Conrado Yeah, I have keyboard bugs too. For one guy, the shift key registers as 0. For me, I can't hit the print screen plus some other keys. --Kamilche

Re: [pygame] Numpy slower than Numeric

2006-12-28 Thread Kamilche
Rikard Bosnjakovic wrote: On 12/28/06, Kamilche [EMAIL PROTECTED] wrote: Sure, here it is. It's a total hack using global variables, but it works. Numeric takes 1 second, numpy takes 2.6, doing the same operations to the same picture. On line 30, array = pygame.surfarray.array3d(pic2).astype

Re: [pygame] Numpy slower than Numeric

2006-12-28 Thread Kamilche
to use numpy, if you have to convert to/from Numeric arrays to get it to work right anyway. --Kamilche def TestNumpy(): global pic2 pic2 = GetPic() print 'numpy version: %s' % numpy.__version__ array = numpy.array(pygame.surfarray.pixels3d(pic2).astype(numpy.int)) alphaarray

Re: [pygame] Numpy slower than Numeric

2006-12-27 Thread Kamilche
Jakub Piotr Cłapa wrote: Kamilche wrote: I make heavy use of Numeric in my sprite engine. When I did the following, I was able to 'drop in' numpy as a replacement, but it took 3x longer to load my complex graphics! :-O Maybe you could offer a reduced test case so we could check this? I'm

Re: [pygame] Rotating Images on a specified axis.

2006-12-27 Thread Kamilche
Patrick Mullen wrote: Rotate will distort the image as well, unless you rotate in 90 degree increments. Make sure to always rotate based on the source, and not off of previous frames of the rotation. Rotate is unfiltered, and won't look as good as rotozoom; rotozoom is slower I believe.

Re: [pygame] rc 3. please test windows installer.

2006-12-26 Thread Kamilche
Luke Paireepinart wrote: Jasper wrote: Brian Fisher wrote: On 12/25/06, Jakub Piotr Cłapa [EMAIL PROTECTED] wrote: AFAIK you ought to switch to numpy (which is maintained). ;-) According to the people behind numeric, users ought to switch to NumPy as quickly as possible see the Older Array

[pygame] Numpy slower than Numeric

2006-12-26 Thread Kamilche
I make heavy use of Numeric in my sprite engine. When I did the following, I was able to 'drop in' numpy as a replacement, but it took 3x longer to load my complex graphics! :-O try: import numpy as Numeric Numeric.Int = Numeric.int Numeric.Float = Numeric.float Numeric.UInt8 =

[pygame] Pygame 1.8 - PNG is an unsupported image format

2006-12-23 Thread Kamilche
are in PNG format. --Kamilche

Re: [pygame] SDL vs. Pygame: Alpha Differences

2006-12-23 Thread Kamilche
Pete Shinners wrote: On Sat, 2006-12-23 at 12:10 -0800, Kamilche wrote: In the SDL documentation, it says under 'SDL_SetAlpha': When blitting RGBA-RGBA with SDL_SRCALPHA: The source is alpha-blended with the destination using the source alpha channel. The alpha channel in the destination

Re: [pygame] Where Do I Go From Here?

2006-12-04 Thread Kamilche
to develop your own engine, which it sounds like you don't want to do), or to look at pre-built 3D engines that have Python bindings. --Kamilche

Re: [pygame] Where Do I Go From Here?

2006-12-04 Thread Kamilche
Simon Oberhammer wrote: mh.. couldnt find screenshots, but the NPCs look nice indead :-) They're all under the 'forum' link.

Re: [pygame] pygame and cairo

2006-11-24 Thread Kamilche
Richard Jones wrote: On Saturday 25 November 2006 06:52, Simon Burton wrote: I put up a cookbook entry on how to alias a cairo surface to a pygame surface (and a numpy array): http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/498278 Could you please put it in the pygame cookbook?

Re: [pygame] Incarnation

2006-11-24 Thread Kamilche
Farai Aschwanden wrote: Do you send it over the IP adresses? How you surpass firewalls and NAT? Am 24.11.2006 um 21:28 schrieb Kamilche: Farai Aschwanden wrote: Really great work! Also my compliments and respect to the GFX artist. ;) You pushed the game level of Pygame definately higher! One

[pygame] Alpha Channel Speed Question

2006-11-22 Thread Kamilche
I have a question - Do you know of a way to get method 3 as outlined below to be faster? The necessity of doing all those extra blits to preserve the alpha channel is really slowing things down. import pygame WIDTH = 800 HEIGHT = 600 bg = None def Init(): global bg, font

Re: [pygame] Rain Generator

2006-10-27 Thread Kamilche
Luke Paireepinart wrote: Now just add little splashes at the bottom, a rain sound effect, and randomly change the background to white for a few frames (to simulate lightning) and you can sell it as a screensaver! I'm excited :D Glad you find it entertaining! :-D Uh, BTW, that URL was

[pygame] Rain Generator

2006-10-26 Thread Kamilche
I was inspired to create a rain generator after seeing someone else's on the Internet today, and thought I'd post it here: [code] import pygame import random import time SCREENSIZE = 640, 480 class Rain(object): ' Rain generator' drops = [] height = 160 speed = 1 color

Re: [pygame] Rain Generator

2006-10-26 Thread Kamilche
Farai Aschwanden wrote: Nice looking rain and proper code! I experienced a tiny lag like every 3 seconds. I experienced that also in other games/demos, couldnt find out why. Did other ppl also experienced this and/or knew why or is it only on my Mac? Greetings Farai Thanks! It doesn't

Re: [pygame] Rain Generator

2006-10-26 Thread Kamilche
of this mini game is to keep that box at the bottom covered and not let any rain touch it. Really cute! --Kamilche

Re: [pygame] First stable release of my online game (Crescent Dawn Online)

2006-10-04 Thread Kamilche
No screenshots! How can I come make a snap judgement of your game if you post no screenshots? ;-)

Re: [pygame] First stable release of my online game (Crescent Dawn Online)

2006-10-04 Thread Kamilche
Patrick Mullen wrote: There's some screenshots at the blender forums: http://blenderartists.org/forum/showthread.php?t=76549page=3 Yeah the web sites still not quite finished. I plan on adding a gallery and a forum this weekend. Maybe I'm not really looking for people who will make snap

[pygame] Pygame runs faster when mouse is moved

2006-09-18 Thread Kamilche
in the queue, then render, the same behavior is exhibited. Even the throttle makes no difference. --Kamilche

Re: [pygame] Rects and they handle right and bottom borders

2006-07-31 Thread Kamilche
Nelson, Scott wrote: Ok, theory question about Rects... I understand how a rect works, but I'm interested in why it works the way it does to help flesh out my understanding... Originally, I was playing with code that looked something like this: r = pygame.display.get_surface().get_rect() If

Re: [pygame] Embedding pygame into wxPython

2006-07-17 Thread Kamilche
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

[pygame] Sky Algorithm

2006-07-15 Thread Kamilche
it 'in the air' like cloud cover with perspective. I could 'drag' those tiling bitmaps perspective corrected bitmaps about and simulate cloud cover, I believe, but I don't want to use OpenGL to do it. Does anyone have a Pygame example that does this, without using OpenGL? --Kamilche

[pygame] Sky Algorithm

2006-07-15 Thread Kamilche
it in the air, so it looks like cloud cover. I could 'drag' those tiling perspective corrected bitmaps about to simulate it pretty well, I believe, but I don't want to use OpenGL to do it. Does anyone have a Pygame example that does this, without using OpenGL? --Kamilche

Re: [pygame] Embedding pygame into wxPython

2006-07-13 Thread Kamilche
': os.environ['SDL_VIDEO_WINDOW_POS'] = '3,23' os.environ['SDL_VIDEODRIVER'] = 'windib' Anyways, try commenting out your environ variable settings, see if that helps... thought that might get you the 'DirectX' engine on older versions of Pygame. --Kamilche

[pygame] Numeric Question

2006-07-08 Thread Kamilche
, time. What's the magical incantation to get Numeric to assign the data directly to the pixels of the surface? --Kamilche --- import pygame import Numeric import Image import struct import math import os import sys pathname, scriptname

Re: [pygame] Numeric Question

2006-07-08 Thread Kamilche
Peter Shinners wrote: On Sat, 2006-07-08 at 20:04 -0700, Kamilche wrote: Hey Pete, I have another Numeric question for you, if you've got the time. Let's say I have a bunch of data in RGBA format, where is an arbitrary floating point number, and RGBA are unsigned bytes

Re: [pygame] Crop Image with Numeric

2006-07-05 Thread Kamilche
Rikard Bosnjakovic wrote: On 7/5/06, Kamilche [EMAIL PROTECTED] wrote: if alpha[x][y] 0: Strip 0 from that line. That is, change it to if alpha[x][y]:. Uh, that made it work a lot faster, but I don't know why. :-D It could still use some speed improvement

Re: [pygame] Crop Image with Numeric

2006-07-05 Thread Kamilche
Peter Shinners wrote: Anytime your have nested for x in width: for y in height: expect your code to be extremely slow. Numeric will be no faster than Python lists when used this way. I think the best method is to scan for empty rows and columns. You can also get the alpha from non-32 bit

[pygame] Intel Mac Problems

2006-07-01 Thread Kamilche
Is there a version of Pygame out there compiled for Mac OSX 10.4 Intel machines? When I try to run my game, I get the following message: File /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/pygame/__init__.py, line 75, in -toplevel- from pygame.base import *

Re: [pygame] Frantic (again)

2006-06-21 Thread Kamilche
sprites. That way you can have 1000 explosions going off at once for no memory hit, just a performance hit. --Kamilche

[pygame] Incarnation

2006-06-10 Thread Kamilche
and fog effects in some of the rooms. --Kamilche