[pygame] unsubscribe

2008-06-04 Thread Jason Ward
unsubscribe


Re: [pygame] Python and Speed

2008-04-16 Thread Jason Ward
The way I speed up my python code is Ctypes.
I just make a dll file in C or asm and then call it with Ctypes and presto.
I have tons of speed at my fingertips.

Just my 2 cents :)


[pygame] Google Summer Of Code

2008-03-18 Thread Jason Ward
I like this project idea.Easy simple software 3d. Possibly tinyGL, and a few
extra parts, or just something like a textured polygon drawer. Basically...
model = load_model();model.render(screen, (0,0))



so are you asking us to integrate a 3D software renderer into pygame with an
easy to use API?
If so I would like to help out. will this be written in python?


Re: [pygame] Minimalistic Pygame 3D Engine

2008-03-11 Thread Jason Ward
On Tue, Mar 11, 2008 at 4:01 PM, Ian Mallett <[EMAIL PROTECTED]> wrote:

> I'm posting this here, in another thread because someone said it might
> come up in searches better.  Enjoy!
> Ian


Why aren't you using matrices? they make the 3D pipeline much simpler.
Are you interested in making a  3D software renderer using pygame?


Re: [pygame] MMX Transform for Win32

2008-03-09 Thread Jason Ward
>
> The assembler code is in SVN. The code is in routines:
> filter_shrink_X_MMX, filter_expand_X_MMX, filter_shrink_Y_MMX and
> filter_expand_Y_MMX.
>
> --
> Lenard Lindstrom
> <[EMAIL PROTECTED]>


I looked through it but I don't think I'm gonna be able to be much help.


Re: [pygame] MMX Transform for Win32

2008-03-08 Thread Jason Ward
I just looked in transform.c and I haven't seen any asm code at all.
maybe point me to a function name or a code line number


Re: [pygame] MMX Transform for Win32

2008-03-08 Thread Jason Ward
what is this MMX discussion about and the transform function?
If this is to do with pygame source I may be interested. but not to solely
do it, just to give a rather small helping hand.
I know intel asm but I haven't really gotten into MMX so this would be a
great opportunity for me to get into it.
So I might be able to help you do it Richard.

Just direct me in exactly what it is :)


Re: [pygame] Texture for raycasting engine

2008-03-06 Thread Jason Ward
Hi
You weren't being too specific. so basically it sounds like you are writing
a software renderer. If it's a 3D one which I assum it is, then I have heard
of a good tutorial.
this site has great help for those who are doing software renderers, just
ask at the forums http://www.devmaster.net also tery googling for
perspective texture mapping. Beware the math behind this is not the simplest
thing out.

But if you are just doing 2D then with a bit of thought you can work it out.

I was writing my own software renderer last year in asm but I got sick of it
and just moved to opengl.


Re: [pygame] PyDay #1

2008-02-28 Thread Jason Ward
On Thu, Feb 28, 2008 at 11:12 PM, Greg Ewing <[EMAIL PROTECTED]>
wrote:

> Jason Ward wrote:
> > lol, if it was 64KB we could imagine we were olden day real mode
> > programmers working with very limited resources :)
>
> It should be 48KB - gotta allow 16K or so for the
> interpreter ROM, you know. :-)
>
> Although it could be a BBC - they had 32K of ROM.
>
> --
> Greg


hm, I didn't know about that part, thanks :)


Re: [pygame] PyDay #1

2008-02-28 Thread Jason Ward
Sorry PyMike that was me. I was just trying to clear everything up just in
case I enter something and am disqualified. A whole month for the next
competition is a long wait when it's such an awesum idea for a comp.

lol, if it was 64KB we could imagine we were olden day real mode programmers
working with very limited resources :)


Re: [pygame] PyDay #1

2008-02-28 Thread Jason Ward
so how do you stop someone from drawing in an editor, converting it to a
string and then copy pasting the string pixel values into the code?

Why not just allow all that but it is eventually gonna cut into our precious
32000 byte limit, so it makes it fair to use editors?
coz currently I don't see how we are gonna stop people from cheating, other
than believing in the common good in people. :)

Um I have never heard of CST before, so I googled it but I can't work out
what the time in South Africa is from what I read.
Can't you just say like 7:30pm at GMT+whatever your gmt is?


Re: [pygame] Why won't pyopengl import

2008-02-27 Thread Jason Ward
YAY!

Thanks that worked :)


Re: [pygame] Why won't pyopengl import

2008-02-27 Thread Jason Ward
I am using a proxy so I ez_setup.py can't connect.

Is there a way to make everything on windows connect through a proxy or is
that application specific?


Re: [pygame] Why won't pyopengl import

2008-02-27 Thread Jason Ward
It will import OpenGL works, but if I try any other things such as GL or GLU
then it says that there is no module called pkg_resources.
It is searching for the file in the OpenGL directory.  So it's not a problem
with python, its PyOpenGL.


Re: [pygame] Why won't pyopengl import

2008-02-27 Thread Jason Ward
I tried that, this is only a problem on windows, my linux one does it fine.

I have the latest python 2.52 and the latest PyOpenGL.

I was just gonna use it to do a test between any two arbitrary quads to see
if they intersect. But the thing won't load :(


[pygame] Why won't pyopengl import

2008-02-27 Thread Jason Ward
I just downloaded the latest version of pyopengl for windows and it won't
import.

I type
import OpenGL.GL  #just like I used to

but it says that pkg_resources was not found.

I have no clue how to fix this


Re: [pygame] Help

2008-02-15 Thread Jason Ward
btw Mirra is a 2D library, forgot to mention that.


Re: [pygame] Help

2008-02-15 Thread Jason Ward
There is something called Mirra. it uses opengl for hardware rendering etc.
You can find it here http://www.pygame.org/project/117/

I tried it out a long time ago. it was pretty good IMHO. And not very hard
to use.

But pygame already handles 2D graphics and it is relatively fast. Depending
on what your doing. Also I have never seen easier event handling than that
in pygame.

Pygame has great functions for displaying text...


Re: [pygame] Per Pixel Alpha

2008-02-08 Thread Jason Ward
ya I think blending is broken in pygame for python 2.5. Maybe just the
windows version. I'm not sure


Re: [pygame] Per Pixel Alpha

2008-02-08 Thread Jason Ward
yes I see what you mean. I just tested it on my machine and I had the same
problem.
It should be invisible with an alpha of 0.

Try it with python 2.4 and the pygame version for that.
Mine worked with that setup.
I am now on 2.5 and it's not blending.
Maybe a bug?


Re: [pygame] Per Pixel Alpha

2008-02-08 Thread Jason Ward
you weren't changing the alpha value btw.  the sequence for  set_at is
R,G,B,A  you had 255,0,0,0try   255,0,0,128

http://www.pygame.org/docs/ref/surface.html#Surface.set_at

This link is right on the pygame site. This reference list is brilliant and
explains how to use pygame very well.

If you want to modify a lot of inividual pixel values really fast then use
Surfarray. I can't remember if there was another method as well.


Re: [pygame] Per Pixel Alpha

2008-02-08 Thread Jason Ward
this is slow and could be sped up quite a bit btw. just my 2 cents.
use xrange instead of range if your just looping through integers.
lock the surface before you start setting it's pixels with set_at.
and then unlock it when your done


Re: [pygame] Clearing the mouse and keyboard state

2008-01-06 Thread Jason Ward
I usually do this.

#once a buttun has been clicked you can do what you want, setting the mouse
state
to not pressed but this is easier.


while pygame.mouse.get_pressed()[the button]  == 1:
pygame.event.pump()

this will loop until they let go of the mouse button, you may want to
refresh the screen or
something but do what works.

Easy hey :)


Re: [pygame] Why does my ball vibrate?

2007-12-05 Thread Jason Ward
a while ago someone said that the ball speeding up and slowing down
"randomly" was because it was based on the time elapsed every frame and that
time varies because if other tasks are being run then the cpu is executing
both threads so it doesn't spend all of its time in your game.

But then what workaround is there for physics simulations that are based on
time?


Re: [pygame] Making Executable?

2007-12-04 Thread Jason Ward
py2exe
can be found at pygame.org under downloads


Re: [pygame] Networking?

2007-11-20 Thread Jason Ward
Thanks for the options guys. I'll look into them when I find the time. But I
don't mind low-level stuff if that's what sockets library requires, just as
long as it can work. Surely there must be some good C/C++ library that I can
call with ctypes?
What about just calling the win32 api straight with ctypes to do all my
networking?
I looked into twisted but it's documentation is rather difficult and I hate
libraries that want the main loop, I prefer the control.


[pygame] Networking?

2007-11-19 Thread Jason Ward
I want to make my game playable over the network and if possible the
internet.
For the network it must support more than 2 computers and be realtime
Would the sockets library in python solve all my needs?


Re: [pygame] Break outside the loop

2007-11-15 Thread Jason Ward
your break is outside of the loop.
if you run this:

break

you will get the same error because that's exactly what your doing,
there is no loop to break out of.


Re: [pygame] palletized surfaces

2007-11-13 Thread Jason Ward
well that was just an extra. But the main question is on palleted
surfaces with pygame


Re: [pygame] palletized surfaces

2007-11-13 Thread Jason Ward
thanks. But I think you are misunderstanding. I'm talking about
palletised surfaces in pygame.

I have a small pyOpenGL problem. On my python pc I don't have
internet. I downloaded the pyopengl package on sourceforge but when I
try and install with the setup.py script is wants to connect to get
setupTools. But I have the package already. I thought of just
installing from source but it doesn't explain how to build from
source.  :(  . I am using kubuntu but I am new to linux.


[pygame] palletized surfaces

2007-11-13 Thread Jason Ward
Hi
whenever I am calling get_pallete it tells me that the surface is not
palletised. But I have no clue how to make a surface
palletised, I can't find it in the docs.
Would surfarray be faster than using palletes to update entire surfaces?
Should I use numpy, surfarray, numeric or palletes to update entire
surfaces? (the fastest is the best imo)


Re: [pygame] blitting arrays/lists

2007-11-10 Thread Jason Ward
well the idea is I will be updating this surface every frame so it won't be
drawn just once.
I'm just wondering if there is anything slow about it, like in opengl if
your drawing to the frontbuffer it's slower than drawing to the backbuffer.


[pygame] blitting arrays/lists

2007-11-09 Thread Jason Ward
Hi.
I want to render an array or a list.
Should I use surfarray or numeric.
Also should I draw to a surface and blit that or should I draw
straight to the display surface(screen)?

This stuff isn't related to pygame but it would be helpfull:
Will psyco speed up numarrays like it does with lists?
Can python do pointers?

These are some speed alternatives that I thought up but I would like
to know if they are viable.
I saw something about python buffer objects, would this be a fast
alternative to numarray/lists?
Also using ctypes we can allocate memory through
kernel32.dll with VirtualAlloc(), is this a good idea?


Re: [pygame] OpenGL in Pygame

2007-08-26 Thread Jason Ward
Hi

Could someone please give me a small code sample of how to use
glDrawPixels in python.

I have so far:

import numarray
from OpenGL.GL import *
from OpenGL.GLU import *

arr = arange(1024*768)
glDrawPixels( 1024 , 768, GL_RGB, GL_FLOAT, arr )

setup code and stuff is irrelevant.
I just wanna know why this won't work
after I have put colour values in it.
Also ignore the fact that I didn't enter values for the array


[pygame] pygame-arrays

2007-08-10 Thread Jason Ward
What is the best array module to use?
Numpy or Numeric?

For PyOpenGL I want to call
glDrawPixels, but what do I do for the pointer to the pixels? How do I do a
pointer in python?

Which is better to use.
glDrawPixels or Pixel buffers?


Re: [pygame] pygame

2007-08-03 Thread Jason Ward
Ya but I managed to install from the rpm though.


[pygame] pygame

2007-08-02 Thread Jason Ward
Hi it's Jason again.
What was that part about makin python scrips executable on linux again?
and that link with all the suse rpms?


Re: [pygame] pygame- Installing pygame on suse linux from source

2007-08-02 Thread Jason Ward
The massive repository is perfect. It has everything I need!
All problems solved.
wxPython too! although some of the files there are old. Like PyOpenGL.
That's another problem too.

But thanks so much guys for the time spent helping me.
Thanks a lot.


Re: [pygame] pygame- Installing pygame on suse linux from source

2007-08-02 Thread Jason Ward
ok the command worked.
It installed sdl.src.rpm
But sdl-config still doesn't work.
On windows it's a good idea to restart once you've installed something, is
linux the same?
My suse computer doesn't have internet access, I am still trying to get it
to use this pc's , windows, internet through my lan cable. But I'm still a
linux beginner and it won't work. So using yast to download packages
isn't possible.
Isn't there a site which has this stuff so I can download it from another
pc?


Re: [pygame] pygame- Installing pygame on suse linux from source

2007-08-02 Thread Jason Ward
Oh wait, I found it


Re: [pygame] pygame- Installing pygame on suse linux from source

2007-08-02 Thread Jason Ward
hahahaa
I can't believe it.
I didn't know. I thought I had to install from source if there was no rpm or
run file.

Thanks so much.
I've been installing almost everything from source!

But opensuse.org only has suse. No other packages?
Or is there another suse site for packages?


Re: [pygame] pygame- Installing pygame on suse linux from source

2007-08-02 Thread Jason Ward
No. I couldn't find an rpm for suse on pygame.org
I just want pygame.


Re: [pygame] pygame- Installing pygame on suse linux from source

2007-08-02 Thread Jason Ward
It says sdl-config not found.

But I installed  sdl.src.rpm
and I have the source


Re: [pygame] pygame- Installing pygame on suse linux from source

2007-08-02 Thread Jason Ward
Thanks guys.
The main question is still getting pygame installed.
If I go to the console and type sdl
it says unkown command.
But I have every single package available from the sdl site installed. EVERY
ONE OF THEM
but when I run setup.py it tells me I don't have sdl-dev installed, I made
sure that I have that and it still complains.

Why is it so hard to install any python package, all others are easy.


[pygame] pygame- Installing pygame on suse linux from source

2007-08-01 Thread Jason Ward
Hi
I downloaded pygame source and I've been trying to install it on my suse
10.2 linux.
It says I need sdl-dev when I run setup.py from the console with the
command, python setup.py install

So I downloaded, the source of sdl and the src.rpm and the dev rpm and the
runtime.
But with any or all of these installed I still get the error message.
You should put a link on the site for the required sdl files.

PS. How do I make python scripts executable on linux? (My first time using
linux)
How do I get it so that I can open with IDLE?
running scripts from console is a mission

Thanks guys


Re: [pygame] DLL's

2006-11-19 Thread Jason Ward





From: Pete Shinners <[EMAIL PROTECTED]>
Reply-To: pygame-users@seul.org
To: pygame-users@seul.org
Subject: Re: [pygame]  DLL's
Date: Sat, 11 Nov 2006 09:53:19 -0800

On Sat, 2006-11-11 at 19:24 +0200, Jason Ward wrote:
> I want to write program in assembler and put them into dlls.
> Then I want to make python call those dlls for me. How does
> python call up dlls?
>
> Also, if I make a function return a value in the dll and then python
> calls it up. Can I do it like this.
>
> num=dll_function()
>
> THe first question is the most important

You'll want to check out the docs for this, it is referred to as
"extending python".

Python has a complete C API, so you can manipulate and call Python
objects from C. You can make a .dll loadable as a regular python module.
You import these like you do a regular .py file.

If you are just making functions from C/assembly callable by Python this
won't be too hard. The .dll needs a magically named "init" function.
Python will look for this when opening the .dll. That function will
setup an array of function pointers and strings. Python can then call
those functions using the given names.




Will I need to put anything inside of that init function or do I just leave 
it blank and let

python do the rest for me?
Please explain fully

_
See their smiles, hear their laughter with Windows Live Messenger! 
http://messenger.live.com




Re: [pygame] DLL's

2006-11-11 Thread Jason Ward

Hi.
I want to write program in assembler and put them into dlls.
Then I want to make python call those dlls for me. How does
python call up dlls?

Also, if I make a function return a value in the dll and then python
calls it up. Can I do it like this.

num=dll_function()

THe first question is the most important

_
Discover the magic of RSS feeds at MSN South Africa! http://za.msn.com/



Re: [pygame] Rpg Game ?

2006-11-10 Thread Jason Ward





From: "federico ramirez" <[EMAIL PROTECTED]>
Reply-To: pygame-users@seul.org
To: pygame-users@seul.org
Subject: Re: [pygame] Rpg Game ?
Date: Fri, 10 Nov 2006 19:52:48 -0300

Im used to php, make websites, etc, not so much math and stuff but i think 
i

will get used to pygame soon ^-^



Hey can you help me. I know nothing about php. Can I use it to put my pygame 
scripts on a

web page so that people can play them?
What is php?
Please explain in great detail.

_
Customise your home page with RSS feeds - visit MSN SA today! 
http://za.msn.com/




Re: [pygame] Rpg Game ?

2006-11-10 Thread Jason Ward





From: "federico ramirez" <[EMAIL PROTECTED]>
Reply-To: pygame-users@seul.org
To: pygame-users@seul.org
Subject: Re: [pygame] Rpg Game ?
Date: Fri, 10 Nov 2006 19:43:56 -0300

Well yes, i know i will have to make other games before, i will make it 
when

i am very confortable with pygame. I have some docs and tutorials, thanks
for your help i will try making a pong game :)
Altought i have no idea now how to do it xD

2006/11/10, Ryan Charpentier <[EMAIL PROTECTED]>:


This is a pretty big undertaking. If you want to create an rpg in pygame,
you'll have to program a tile scrolling engine, map format, map editor,
battle system, dialogue system, and many other things. There's a lot of
obstacles to overcome, and many different ways to do things. My advice to
you would be to use a game creation toolkit like Gamemaker "
http://www.gamemaker.nl/";. Most of the work is done for you, you just have
to adapt it to whatever rpg you had in mind.

If you really want to program games completely from scratch like you can
with pygame, then try making some simple games first. A great first game 
to

make would be pong, or breakout. You may not think that making a game like
these would be challenging or fun, but you'll learn a lot, and you'd be
surprised how good it'll feel to get a game completed. Once you've made
games like these, you should be able to move onto more complex games,
eventually working your way up to an rpg. It just takes perseverance.





--
Best Regards.
fedekiller




Don't worry game development is fun, you won't find it hard. Its actually 
quite easy.


_
Get the ultimate real-time chat experience - Windows Live Messenger! 
http://messenger.live.com




[pygame] widescreen

2006-11-10 Thread Jason Ward
Try making it fullscreen. If it still gives a distorted look then set the 
screen size
to the desktop screen size, I find 1024*768 works best. Set the windows 
resolution and

pygame resolution to that.

Have you noticed that if you take the pyopengl examples that use glut and 
convert

them to use pygame, they run 100 times faster.

_
Customise your home page with RSS feeds - visit MSN SA today! 
http://za.msn.com/




[pygame] Go for it

2006-11-10 Thread Jason Ward
Pygame is ideal for a scrolling game. Go with the other guys idea to start 
simple.

But I am telling you that it is possible to do it.

for example

x=-100
y=-100
for j in range(20):
x=x+1
y=y+1
screen.blit(picture,(x,y))

This will move the image from outside of the screen to inside the screen.
Have fun making your game and good luck.

_
See their smiles, hear their laughter with Windows Live Messenger! 
http://messenger.live.com




[no subject]

2006-11-10 Thread Jason Ward
How do you use py2exe with pygame2exe. It never works for me. Ever, I always 
get a porblem
with the pygame2exe script. I can't remember the error, but it just doesn't 
work.


Anyway the main thing is the movie module. I tried 
pygame.movie.Movie("mymovie.avi")

Then it tells me that I don't have the movie module, ie It can't find it.

_
See their smiles, hear their laughter with Windows Live Messenger! 
http://messenger.live.com




[no subject]

2006-11-10 Thread Jason Ward

Hey, I have a problem.

I have been asked to write a game for some company.
I can write the game but the problem is that
I must make the game playable on the web page, Ie the user must
click on the game and run it while they are on the site. How do I
do this. Is there any HTML command that I must give or what?

Please help.
I am using python and pygame

_
See their smiles, hear their laughter with Windows Live Messenger! 
http://messenger.live.com