[pygame] raycasting engine performances (numpy array)

2012-04-26 Thread Nathan Biagini
Hi. I have recently started to write a ray casting engine with Pygame and i'm at the very early stage of the engine but i already have performance issues. I use the surfarray module to do all the drawing (actually, i only want to draw lines) but i have issues about performances. When i come

[pygame] Resetting display

2012-04-04 Thread Nathan Biagini
Hi, i'd like to know if i can, with pygame, reset the display stuffs. I mean, i start with a certain resolution and i'd like to set the fullscreen after a certain condition is raised, but i don't know how to do that? Is that possible? Thanks.

Re: [pygame] Pygame subset for Android

2012-01-28 Thread Nathan Biagini
be really nice! Here is a zipped archive of my game : http://bngames.org/racer.zip Thanks! 2012/1/27 Nathan Biagini nathan.o...@gmail.com I have tried to use it but i got lot of troubles not able to create a distribution with kivy or any modules... 2012/1/27 Vovk Donets donets.vladi

[pygame] Pygame subset for Android

2012-01-27 Thread Nathan Biagini
Hi guys, i love developing little games with Pygame and recently heard about a way to port your games on Android devices with Pygame subset for Android. So, i'd like to ask if there are some of you who have already tested it? Does it works well? etc... Thanks.

Re: [pygame] Pygame subset for Android

2012-01-27 Thread Nathan Biagini
, Jan 27, 2012 at 09:56:47PM +0100, Nathan Biagini wrote: Ho. Thanks, and everything is supported? I mean, i can use font, mixer etc...? Because i heard a lot about font module that would not work properly. 2012/1/27 James Paige b...@hamsterrepublic.com On Fri, Jan 27

Re: [pygame] Pygame subset for Android

2012-01-27 Thread Nathan Biagini
optimisaion of game code. 2012/1/28 Nathan Biagini nathan.o...@gmail.com Hi guys, i love developing little games with Pygame and recently heard about a way to port your games on Android devices with Pygame subset for Android. So, i'd like to ask if there are some of you who have already

[pygame] car game AI

2011-09-20 Thread Nathan BIAGINI
Hi, i'm still writing my car game and now i need to think about implementing an AI. I searched on the internet for any ressources concerning AI in car games and i found some post about steering behaviors from Craig Reynolds : http://www.red3d.com/cwr/steer/. It seems to be exactly what i need but

[pygame] car game scrolling

2011-09-05 Thread Nathan BIAGINI
Hi again, i have a new problem to solve concerning my little car game. Actually i thought i did it but i just stopped a bug in my code. In fact, i decided to not move the car but to scroll the screen. I only move the car when the player reach one of the four edges of the map. I keep the

Re: [pygame] car game scrolling

2011-09-05 Thread Nathan BIAGINI
an obstacle Once again, this is my way to do. Might be not the best, so if someone have another idea. Here's the previous demo with Weeble improvements and my obstacles detection : http://pastebin.com/ibS5AtnN 2011/9/5 Weeble clockworksa...@gmail.com On Mon, Sep 5, 2011 at 5:54 PM, Nathan BIAGINI

[pygame] car game mechanics

2011-08-30 Thread Nathan BIAGINI
Hi, i'm trying to write a car game and i have decided to start by the movement part. I calculate the X and Y components of the car and update his position by increasing the current one with the two new components. The two components depend of the orientation of the car, managed by the right and

Re: [pygame] car game mechanics

2011-08-30 Thread Nathan BIAGINI
30, 2011 at 7:21 AM, Nathan BIAGINI nathan.o...@gmail.comwrote: Doing something like : a_rad = math.atan2(speedy, speedx) ? I can turn 360 degrees yeah but it does not make proper rotation... i ll try to find something on the internet about 2d car physics. 2011/8/30 Weeble clockworksa

Re: [pygame] car game mechanics

2011-08-30 Thread Nathan BIAGINI
and this in your draw: screen.blit(self.sprite, self.rect) And it looked much better to me. Let me know what you think. -Christopher On Tue, Aug 30, 2011 at 5:46 AM, Nathan BIAGINI nathan.o...@gmail.comwrote: Hi, i'm trying to write a car game and i have decided to start

Re: [pygame] trajectory

2011-07-23 Thread Nathan BIAGINI
close enough unless the movement is extremely complicated. On Wed, Jul 20, 2011 at 9:14 AM, Nathan BIAGINI nathan.o...@gmail.comwrote: Hi everyone, i would like to know what are the common way to handle trajectory in a 2d game. In fact, i think of writing a tower defense game and i wonder

Re: [pygame] trajectory

2011-07-23 Thread Nathan BIAGINI
Ok. Yeah it's more explicit, thanks to take time to rewrite it. So it will works in case of re

Re: [pygame] trajectory

2011-07-23 Thread Nathan BIAGINI
, add to original target position) On Sat, Jul 23, 2011 at 12:55 PM, Nathan BIAGINI nathan.o...@gmail.comwrote: Ok so thanks all for all your replies i will work with all that. I don't know already if i want to use homing missile style which seems to be easier to code or to use

Re: [pygame] trajectory

2011-07-23 Thread Nathan BIAGINI
time calculated in the previous step, add to original target position) On Sat, Jul 23, 2011 at 12:55 PM, Nathan BIAGINI nathan.o...@gmail.comwrote: Ok so thanks all for all your replies i will work with all that. I don't know already if i want to use homing missile style which seems

Re: [pygame] trajectory

2011-07-23 Thread Nathan BIAGINI
, your aim is wrong. On Sat, Jul 23, 2011 at 1:24 PM, Nathan BIAGINI nathan.o...@gmail.comwrote: So if the source if moving to the left, get in range of a tower and during the algorithm progress go up or down, it will not work. That's it? 2011/7/23 Joe Ranalli jrana...@gmail.com Yes

Re: [pygame] trajectory

2011-07-23 Thread Nathan BIAGINI
of direction and everything, then you will be aiming at the right spot. It still seems like using the homing bullets would be easier though. On Sat, Jul 23, 2011 at 1:29 PM, Nathan BIAGINI nathan.o...@gmail.comwrote: Yeah but if you calculate the node of the graph where the target will be when

Re: [pygame] trajectory

2011-07-22 Thread Nathan BIAGINI
on the new time Technically you could iterate that repeatedly until newposition converges. Practically, iterating once probably gets you close enough unless the movement is extremely complicated. On Wed, Jul 20, 2011 at 9:14 AM, Nathan BIAGINI nathan.o...@gmail.comwrote: Hi everyone, i would

[pygame] trajectory

2011-07-20 Thread Nathan BIAGINI
Hi everyone, i would like to know what are the common way to handle trajectory in a 2d game. In fact, i think of writing a tower defense game and i wonder how to handle the trajectory of the missile launch by the towers. I though of getting the pos of the tower and the target and create a vector

Re: [pygame] trajectory

2011-07-20 Thread Nathan BIAGINI
. Practically, iterating once probably gets you close enough unless the movement is extremely complicated. On Wed, Jul 20, 2011 at 9:14 AM, Nathan BIAGINI nathan.o...@gmail.comwrote: Hi everyone, i would like to know what are the common way to handle trajectory in a 2d game. In fact, i think

Re: [pygame] trajectory

2011-07-20 Thread Nathan BIAGINI
There is a pygame object to create a 2d vector? 2011/7/20 Joe Ranalli jrana...@gmail.com Yes a vector is probably appropriate. On Wed, Jul 20, 2011 at 10:20 AM, Nathan BIAGINI nathan.o...@gmail.comwrote: Ok. But all the calcul of how long the bullet will take to reach the target etc

Re: [pygame] Resolution for a 2d game

2011-05-19 Thread Nathan BIAGINI
Hey. Thanks for all your reply. The solution i have kept is to grab the size of the graph from the server (my game is an online 2d shooter) and than divide the chosen resolution by this value to grab a coefficient. I use this float coefficient to adapt speed and position on client side. I have

[pygame] fullscreen and resolution

2011-05-11 Thread Nathan BIAGINI
Hi. I want to make my game run in FULLSCREEN mode. However, i also want the resolution to be 800*600 and actually, when i use : screen = pygame.display.set_mode((0, 0), FULLSCREEN) It automaticaly sets the resolution to 640*600 So i tried : screen = pygame.display.set_mode((800, 600),

[pygame] freesansbold.ttf

2011-05-08 Thread Nathan BIAGINI
Hi everyone. The default font of Pygame seems to be missing... how can i solve it? RuntimeError: default font not found 'freesansbold.ttf'

Re: [pygame] freesansbold.ttf

2011-05-08 Thread Nathan BIAGINI
Ok so now the freesansbold font seems to be found but i got a Fatal error each time i want to use it. 2011/5/8 Nathan BIAGINI nathan.o...@gmail.com Hum... Nicer i can't say but it's a pretty simple font and also usable for menu etc... i think. 2011/5/8 David Burton ncdave4l...@gmail.com

[pygame] Frames per seconds

2011-05-02 Thread Nathan BIAGINI
Hi everyone, I'm writing using twisted for the network then i would like to know the for getting the exact seconds to wait each loop to have 60 frames per seconds. Actually i have to specify a value in seconds. There is a way to know the time in seconds to wait depending of the computer proc to

Re: [pygame] Frames per seconds

2011-05-02 Thread Nathan BIAGINI
frames handling. Right? 2011/5/2 James Paige b...@hamsterrepublic.com On Mon, May 02, 2011 at 07:48:17PM +0200, Nathan BIAGINI wrote: Hi everyone, I'm writing using twisted for the network then i would like to know the for getting the exact seconds to wait each loop to have 60

[pygame] Sprite troubles

2011-04-30 Thread Nathan BIAGINI
Hi everyone, it sounds like a stupid question but i have written a really simple program where i just want to add a sprite to a sprite group and then draw the containing of this group. Here is the main code : import pygame from sprites import Node pygame.init() screen =

Re: [pygame] Sprite troubles

2011-04-30 Thread Nathan BIAGINI
Yeah that's true... Sorry about that. My problem is that the sprite in the RenderGroup is simply not drawn. 2011/4/30 Julian Marchant onp...@yahoo.com It's hard to help you when you haven't said what isn't working. -- *From:* Nathan BIAGINI nathan.o...@gmail.com

[pygame] The font module

2011-04-27 Thread Nathan BIAGINI
Hi everyone, i currently using a Debian squeeze and i would like to run some application i have written before but it seems that the font module is not found. there is no soundcard fonty.py:42: RuntimeWarning: use font: No module named font (ImportError: No module named font) font =

Re: [pygame] The font module

2011-04-27 Thread Nathan BIAGINI
zytkiewicz stas.zytkiew...@gmail.com On Wed, Apr 27, 2011 at 10:42 AM, Nathan BIAGINI nathan.o...@gmail.com wrote: Hi everyone, i currently using a Debian squeeze and i would like to run some application i have written before but it seems that the font module is not found. Hi, I'm running

Re: [pygame] The font module

2011-04-27 Thread Nathan BIAGINI
for games development in Python and when i try to run a program using font with 'python fonty.py' (python is in 2.6.6 version), it returns that font is missing... 2011/4/27 stas zytkiewicz stas.zytkiew...@gmail.com On Wed, Apr 27, 2011 at 11:37 AM, Nathan BIAGINI nathan.o...@gmail.com wrote: I

Re: [pygame] The font module

2011-04-27 Thread Nathan BIAGINI
, 80) font pygame.font.Font object at 0xb756c110 Greetings, Stas On Wed, Apr 27, 2011 at 12:01 PM, Nathan BIAGINI nathan.o...@gmail.com wrote: It returns 6.0.1, so squeeze, the current stable debian version. The dpkg -l python-pygame returns : | État=Non/Installé/fichier

Re: [pygame] The font module

2011-04-27 Thread Nathan BIAGINI
dependencies were not found. Pygame can still compile and install, but games that depend on those missing dependencies 2011/4/27 stas zytkiewicz stas.zytkiew...@gmail.com On Wed, Apr 27, 2011 at 1:00 PM, Nathan BIAGINI nathan.o...@gmail.com wrote: Hum... Here is mine : One thing you

Re: [pygame] The font module

2011-04-27 Thread Nathan BIAGINI
help ;) 2011/4/27 Nathan BIAGINI nathan.o...@gmail.com Ok.. so it still does not work. I think i ll try to report a bug on the debian bugs support about python-pygame. I also try to install from sources. And before to begin the installation, it reports the found dependencies and FONT

[pygame] blit image

2010-12-01 Thread Nathan BIAGINI
Hi everyone, i currently have a really weird problem. I want to blit a background image on my screen. It s a really simple operation and i ve done it so many times in this case, the image only appear when i move the screen with my mouse cursor... I definitively don't understand... Here is the

Re: [pygame] keep a key pressed and then move a sprite

2010-11-25 Thread Nathan BIAGINI
english haha 2010/11/24 Kris Schnee ksch...@xepher.net On 2010.11.24 1:53 PM, Nathan BIAGINI wrote: Ok thanks to reply so fast :) yeah of course, it seems obvious now but i didn't know there is a way to manage keyboard state without the common event loop. I ll use this created topic to ask

[pygame] keep a key pressed and then move a sprite

2010-11-24 Thread Nathan BIAGINI
Hi everyone, i m learning to use Pygame and i wonder how make a sprite moving by keeping a key pressed. I checked all the method for the Event class but i don't find how to do it. I thought to use some kind of loop with boolean but there is maybe a better way to do with Event methods. Here is a

Re: [pygame] keep a key pressed and then move a sprite

2010-11-24 Thread Nathan BIAGINI
Ok thanks to reply so fast :) yeah of course, it seems obvious now but i didn't know there is a way to manage keyboard state without the common event loop. I ll use this created topic to ask something else about the optimization of a game written with pygame. Restrict frames per second with