Re: [pygame] How to prevent mouse initialization in Pygame

2017-07-01 Thread Jake b
The best SE to post this would probably be stack overflow. There's quite a few pygame questions. Do you always require sudo to run, or only if using ssh? On Jun 30, 2017 1:29 PM, "Роман Мещеряков" wrote: > Hi all, > > In my Python application running on Raspberry Pi under Raspbian I use > Pygam

Re: [pygame] How much blit costs?

2017-06-14 Thread Jake b
Have you profiled your code? On Jun 14, 2017 4:39 PM, "babaliaris" wrote: > Hello. I'm trying to create a game engine with the maximum possible game > objects per scene. These days, i'm trying to understand how much the blit > method costs, so for this purpose i created a mini game engine and >

Re: [pygame] Re: Pygame doesn't close properly so I can't delete the file it's using

2017-05-28 Thread Jake b
That's because my_file is a string, not a file handle. my_file = "Text To Speech.mp3" When using with open, the file is closed when the context handler ends This might be of help: https://jeffknupp.com/blog/2016/03/07/python-with-context-managers/ Note: In the email, your code did not get po

Re: [pygame] BUG: pygame leaks memory (?)

2016-12-21 Thread Jake b
I don't see any obvious pygame reason. What if you remove numpy? -- if it still leaks, that would be interesting. On Dec 20, 2016 7:42 AM, "Christoph Stahl" wrote: > > Hello, > > I use pygame to visualize locally on my computer what otherwise can be > viewed on my self build led matrix that is d

Re: [pygame] Pygame 1.9.2 released!

2016-12-16 Thread Jake b
ecommended SDL2 version of pygame, and try to share code where it's >> practical. >> >> On 16 December 2016 at 17:16, Jake b wrote: >> >>> I thought 2.0 was for when pygame uses SDL 2.0 >>> >>> On Tue, Dec 13, 2016 at 12:58 PM, DiliupG wrot

Re: [pygame] Pygame 1.9.2 released!

2016-12-16 Thread Jake b
I thought 2.0 was for when pygame uses SDL 2.0 On Tue, Dec 13, 2016 at 12:58 PM, DiliupG wrote: > congratulations on this! LONG OVERDUE! > > next Pygame 2.0 > > Lets's skip the 1.9.3, 1.9.4, 1.9.agony-of-waiting, and jump straight to > the future! > > Congratulations to all involved once ag

Re: [pygame] Re: Out of memory loading very large image

2016-11-06 Thread Jake b
What are you using a 40,000 x 30,000 image for? On Thu, Sep 29, 2016 at 4:55 AM, shortcipher wrote: > My system is Windows 10 Home 64-bit on i7-4790 with 16 GB RAM. > > > > -- > View this message in context: http://pygame-users.25799.x6. > nabble.com/Out-of-memory-loading-very-large-image-tp2481

Re: [pygame] Freezing Pygame projects in Windows

2016-05-09 Thread Jake b
Scott: On Sat, May 7, 2016 at 2:18 AM, scottmeup wrote: > I'm trying to freeze a project made with pygame / SimpleGUICS2Pygame. Every > tool I've tried apart from pygame2exe results in an executable that stops > responding. Most of them print a pygame parachute segmentation fault. > ​Are you us

Re: [pygame] pygame Event

2016-03-04 Thread Jake b
On Friday, March 4, 2016, Stuart Laatsc wrote: > Well I don't really *need* the __dict__ functionality, but it would be > *convenient* to have > What are you trying to use it for? -- Jake

Re: [pygame] Pygame site

2016-02-28 Thread Jake b
It's probably worth posting to https://www.reddit.com/r/pygame , they've had threads about updating the website. On Sun, Aug 9, 2015 at 10:44 AM, Paul Vincent Craven wrote: > Would anyone like to work with

Re: [pygame] Should I use Sprites and Groups ?

2015-12-10 Thread Jake b
If not using hardware, `pygame.display.flip` is the same as `pygame.display.update(None)` Sprite groups can be used for partial screen updates instead. Jake

Re: [pygame] Steam Controller

2015-10-23 Thread Jake b
Steam uses SDL2, pygame uses 1. Maybe it's not the issue, SDL2 docs sounded like it might be: Joystick events now refer to an SDL_JoystickID. This is because SDL 2.0 can > handle joysticks coming and going, as devices are plugged in and pulled out > during your game's lifetime, so the index into

Re: [pygame] Closing issue 211 with big-endian CPU test

2015-10-21 Thread Jake b
Or /r/pygame -- Jake

Re: [pygame] Steam Controller

2015-10-21 Thread Jake b
Have you tried the controller using SDL2? On Wed, Oct 21, 2015 at 6:21 PM, Bartosz Debski wrote: > Hi All, > > I know this is quite fresh but if anyone wonders do Steam Controller works > with PyGame? > Well answer is a NO at the moment. I have tested it on Win and on Linux. > Results are the sa

Re: [pygame] Receiving stack overflow when inheriting Sprite class

2015-10-13 Thread Jake b
You. Can simplify self.rect.center = scn.rect.center Also because you use else, you can't hold ​multiple directions at the same time. If you want to bounce off the top, then . yvel *=-1 ​ ​

Re: [pygame] Is there a file limit on sound files?

2015-09-18 Thread Jake b
On Mon, Sep 14, 2015 at 1:33 PM, Bob Irving wrote: > To make it more complicated, some students are running Python in Win7 in a > VirtualBox on their Macbooks > ​I'm not sure if it applies in this setup, but are the filenames the right case? Also if using folders, does `os.path.join('foo',

[pygame] Scheduled challenges idea at /r/pygame

2015-07-14 Thread Jake b
Mekire started a thread on the pygame sub, if you're not subscribed check: https://www.reddit.com/r/pygame/comments/3cqg6h/meta_any_interest_in_bringing_back_community/ I think it's a cool idea. In the past it fizzled out because ideas expected to much work. With simple problems and giving boilerp

Re: [pygame] looking for a critique of my code

2015-07-14 Thread Jake b
On Jun 22, 2015 10:11 PM, "tom arnall" wrote: > > hi Chris, > > thanks for the offer. i'll post it soon. > > Tom Go for it. If you want more there's plenty of programming subreddit that allow reviews. Start with these subs, each of which have many related subs in their sidebars. LearnProgrammin

Re: [pygame] What's next for Pygame project?

2015-07-13 Thread Jake b
> cases. > ​​I expect much of the code that defines extension classes will be > rewritten. Pygame extensions to SDL, such as custom blitters, may be > salvaged. > ​Much of the work will be writing code to support the new SDL 2.0 features. > ​ > > ​​ ​There's also the problem of Texture vs Surfaces

Re: [pygame] What's next for Pygame project?

2015-07-13 Thread Jake b
Correct me if I'm wrong, but it appears you are using SDL_Surface instead of SDL_Textures? https://wiki.libsdl.org/MigrationGuide#If_your_game_just_wants_to_get_fully-rendered_frames_to_the_screen > One problem is blend modes - many of the pygame blend modes, including the default alphablend mode

[pygame] Which project is actually pygame2?

2015-07-12 Thread Jake b
[1] here's an overview of the new features of the SDL2 api - https://wiki.libsdl.org/MigrationGuide - http://blog.stuff-o-matic.com/post/2013/09/15/ASGP-s-Android-Port-Part-II%3A-from-SDL-1.2-to-SDL-2 . [2] I'm confused by all the forks/patches. I am not clear which is official. I'm not even sur

Re: [pygame] What's next for Pygame project?

2015-07-12 Thread Jake b
On Sun, Jul 12, 2015 at 10:05 AM, Paul Vincent Craven wrote: > Odds and ends: > >- ​​ >A big limitation on SDL 2.0 for me was the lack of good primitive >drawing commands. Drawing lines, rectangles, etc. were limited to 1 pixel. > > P ​ygame used gfx so Pygame2 will probably have SDL2

Re: [pygame] What's next for Pygame project?

2015-07-12 Thread Jake b
Lenard On Sat, Jul 11, 2015 at 7:20 PM, Lenard Lindstrom wrote: > Much of the delay is due to logistics. With the loss of the automated > build site a few years back there is no simple way to check a commit > against all supported operating systems. It also limits user testing. > What would we

Re: [pygame] BUG keyboard events

2015-05-13 Thread Jake b
After these changes, all your `break` statements are no longer needed. First things I noticed, you are only parsing one event per game loop. You're missing a ton of events. Instead use: for event in pygame.event.get(): For `eat_cpu`, instead sleeping. Use either `time.wait` or `time.delay`

Re: [pygame] OpenGL stretch of a pygame.Surface

2014-08-04 Thread Jake b
Just a warning, glBegin(), glEnd() is deprecated, and so you know it's an old tutorial. Have you tried SFML's python binding? It's a bit like Pygame, and abstracts the OpenGL functions for you. On Tue, Jul 29, 2014 at 7:38 AM, sylvain.boussekey < sylvain.bousse...@vertpingouin.fr> wrote: > I t

Re: [pygame] This program breaks on my Linux

2014-06-29 Thread Jake b
> SIGTERM (15) does not kill the program. SIGKILL (9) does. You need to handle event QUIT.

Re: [pygame] Pygame not handling keyboard tracking correctly

2014-06-22 Thread Jake b
Try removing pump(), since you are using event.get() http://www.pygame.org/docs/ref/event.html#pygame.event.pump Otherwise a small, runnable script lets others try it. -- Jake

Re: [pygame] Scaling the hitbox/rect of a sprite

2014-05-22 Thread Jake b
To preserve the center: pos = self.rect.center self.rect = self.rect.inflate(-85, -20) self.rect.center = pos On Thu, May 22, 2014 at 5:47 AM, Skorpio wrote: > Hi everybody, > > How can you scale the hitbox of a sprite? I tried self.rect = > self.rect.inflate(-85, -20) and that

Re: [pygame] IDE ?

2014-04-20 Thread Jake b
Does pycharm seem to run slow? Compared to sublime / visual studio, the UI is sluggish. Maybe it's a bad version I used? On Wednesday, April 16, 2014, Richard R. wrote: > I'm usually a hand coder, who doesn't use an IDE often, but I've been > trying PyCharm out lately and it's wonderful. > My pro

Re: [pygame] preview of new pygame website... HiFi part

2014-04-08 Thread Jake b
cheers, > > > > On Tue, Apr 8, 2014 at 5:26 PM, Jake b wrote: > >> Minor notes . >> >> I didn't realize the top menu at first. Might be too subtle. >> >> I tested it on my phone, chrome and Firefox. >> >> Chrome >> + doesn't work

Re: [pygame] preview of new pygame website... HiFi part

2014-04-08 Thread Jake b
Minor notes . I didn't realize the top menu at first. Might be too subtle. I tested it on my phone, chrome and Firefox. Chrome + doesn't work with swipe gesture. + arrow buttons: About 10% of the time the site scrolls 2 columns. While swipe works on ffx, but is giving false positives. If I scro

Re: [pygame] preview of new pygame website... HiFi part

2014-04-07 Thread Jake b
The page doesn't change layouts, so decreasing page width makes content go missing. AKA responsive design. On Mon, Apr 7, 2014 at 9:08 PM, Sean Felipe Wolfe wrote: > Playfulness +100 ! There are lots of gaming frameworks out there with > plenty of technical information. I love how the current si

Re: [pygame] Python3 version packaged?

2014-03-21 Thread Jake b
I tried to find what version SDL2 uses, but I didn't see any mention off portmidi.

Re: [pygame] Quick OS survey - 2013

2013-12-14 Thread Jake b
70% Windows 7 10% iOS 7 20% Linux (Nexus 5 android / Rpy and other Linux )

Re: [pygame] String replace error in docs

2013-11-27 Thread Jake b
dstrom > > On 13-11-23 08:40 PM, Jake b wrote: > >> See the broken output at >> >> http://www.pygame.org/docs/ref/sprite.html#pygame.sprite.LayeredUpdates >> >> -- >> Jake >> > >

[pygame] String replace error in docs

2013-11-23 Thread Jake b
See the broken output at http://www.pygame.org/docs/ref/sprite.html#pygame.sprite.LayeredUpdates -- Jake

Re: [pygame] pygame idea: pgHoF (pygame Hall of Fame)

2013-10-31 Thread Jake b
If we suggest projects to be posted on github/etc, that would prevent dying links. Down the road maybe viewer's votes would simplify who to choose for the month. I'm thinking simplicity is better here. ( facebook and greenlight only have an upvote, no downvotes ). We could could pick by recent-pop

[pygame] leveraging current non-mailing list members

2013-10-25 Thread Jake b
Once the site is updated, I think it needs a system for more dynamic addition of lower level admins. Because there's plenty of people active in the non-mailing list sites, like: http://www.reddit.com/r/pygame http://www.reddit.com/r/gamedev http://www.reddit.com/r/learnprogramming http://stackover

Re: [pygame] Pygame "look and feel"

2013-10-25 Thread Jake b
I think last time it was one or two guys, so if they had to quit/break there wasn't a system to transfer. Perhaps if the site were on `git`, then we could easily have people make a change or two, without one guy having to devote full time to it. - On Sat, Oct 12, 2013 at 4:29 PM, Frozenball wrot

Re: [pygame] Pygame "look and feel"

2013-10-09 Thread Jake b
I like it, but I think keeping the 'spotlight' and 'new releases' sections somewhere on the front will be good to have. Perhaps using one of those "multiple items in one rect" that steam and many sites use these days. On Wed, Oct 9, 2013 at 4:10 AM, Aikiman wrote: > Took some design and colour s

[pygame] news items:

2013-10-09 Thread Jake b
Couple ideas for today: 1- http://www.reddit.com/r/pygame/comments/1o3529/student_pygame_animations/ 2- http://www.reddit.com/r/BaconGameJam/comments/1nlyov/bacongamejam_06_on_20131025_2200_utc_48_hours/ -- Jake

Re: [pygame] Pygame "look and feel"

2013-10-08 Thread Jake b
I like the concept. - The choice looks like it'd scale pretty well too, which might be a consideration. ( So that a 64px or so icon could work ) - It's more obvious that it's a snake Maybe the bottom right one (no text) would be a good icon/small sized. And a text one if it's bigger or a website.

Re: [pygame] spam on cookbook?

2013-06-01 Thread Jake b
ucket site might be another good alternative. > > Paul Vincent Craven > > > On Thu, May 16, 2013 at 9:36 AM, Jason M. Marshall wrote: > >> I know that the WordPress CMS has a plugin called Bad Behavior for >> blocking wiki spam, but I haven't tried it myself. &g

Re: [pygame] which version?

2013-05-31 Thread Jake b
The site doesn't make it clear, but I think you use these installers first : https://bitbucket.org/pygame/pygame/downloads On Thu, May 30, 2013 at 11:52 AM, David wrote: > It would be helpful if there were a table showing > > *if you have this**this * > *Version of **Py

Re: [pygame] spam on cookbook?

2013-05-14 Thread Jake b
I wonder there must be some method or different CMS that would help with the spam issue. On Tue, May 14, 2013 at 4:28 PM, James Paige wrote: > That is definitely spam. Many of the wiki pages on pygame.org are still > plagued with it :( > > On Tue, May 14, 2013 at 04:04:39PM -0500,

[pygame] spam on cookbook?

2013-05-14 Thread Jake b
I found strange links on the bottom of the cookbook. It just says http://www.el7z.com/search.php?t=%D8%A7%D9%84%D8%B9%D8%A7%D8%A8%20%D8%AA%D9%84%D8%A8%D9%8A%D8%B3 -- Jake

[pygame] download page should more clearly link the new binaries

2013-04-26 Thread Jake b
at http://www.pygame.org/download.shtml it can appear that the newest package is from 2009 ( I've seen several posts on SO where under the assumption that pygame doesn't have a py3.x installer ) But lower there are links to py3.x 32/64 binaries. And there are also: https://bitbucket.org/pygame/pyg

Re: [pygame] Comparing the image on two Surface objects.

2012-12-10 Thread Jake b
Do you want to know If they are pointing to the same surface, or duplicate memory? On Thu, Nov 29, 2012 at 4:10 PM, Al Sweigart wrote: > Is there any way I can check if the images on two pygame.Surface objects > are identical? Or will I have to write a function that gets PixelArray > objects fro

Re: [pygame] 2D Game - Thankyou for all help

2012-10-08 Thread Jake b
Break it up into a bunch of simpler pieces. You might start with: 1. make a single guy on screen, 2. use arrow keys to move him 3. add enemies 4. click to select a guy, now clicking will move a guy 5. make guys auto-shoot at other guys 6. add a tileset ( this folder has a demo)

Re: [pygame] Redesigning the pygame.org website

2012-09-19 Thread Jake b
It would be nice if projects/games could be uploaded to the site like google allows automatically with mercurial (Hg) commits. -- Jake

[pygame] pyweek voting is starting

2012-04-30 Thread Jake b
Contest starts next week. Don't forget. :) -- Jake

Re: [pygame] Best practices for creating multiple resolution 2D pixel-art games?

2012-04-22 Thread Jake b
.svg image's have a width/height in the data. So it might be set to 100x100 units in the vector image, and I tell it to render to 320x320 pixels in game. Or 10x10 pixels. Or squish it. Using cairo+rsvg You can render as a pygame surface, from the .svg data. ( Trying to fully learn this myself, hav

Re: [pygame] [ROOKIE] Best way to manage jump movement

2012-04-21 Thread Jake b
Sounds like you want the first, but just incase, here's both ways. Since both are used in different cases. [1] For one jump per press: On the event: KEYDOWN , apply your velocity. [2] For continual acceleration while holding a key down: Use pygame.key.get_pressed ( http://www.pygame.org/docs/ref/

Re: [pygame] (newish?) SVG examples?

2012-04-13 Thread Jake b
What pixel format do I use? I have a SVG file loaded, and rendering now. But, it is mixing up the RGBA channels. ( Meaning the lion is pink, instead of yellow. source file: http://croczilla.com/bits_and_pieces/svg/samples/lion/lion.svg I use: init: self.screen = pygame.display.set_mode(( s

[pygame] (newish?) SVG examples?

2012-02-27 Thread Jake b
I'm Looking for a vector rendering example, to render .SVG images. I'm mostly finding info from '09. Is this still the recommended method? I'm looking for what code / library to use, ( to prep for Pyweek. ) So far, I've found: http://stackoverflow.com/questions/120584/svg-rendering-in-a-pygame-a

[pygame] front page: whats new

2011-12-28 Thread Jake b
I just noticed that 'whats new' says latest is 2009. http://www.pygame.org/whatsnew.shtml Maybe it can read from the code repo changelog? -- Jake

Re: [pygame] Github Pygame Example Repository

2011-12-18 Thread Jake b
Nice. For the main game loop, I like to do: while not done: # ...events , draw... if pressed[K_ESC]: done = True # to allow smooth exit / save game state / cleanup if needed. check out : pygame.Color() http://www.pygame.org/docs/ref/color.html You can post your code on the site, with a

Re: [pygame] Using pygame to create interface...

2011-12-03 Thread Jake b
See also: project's tagged #gui at http://www.pygame.org/tags/gui -- Jake

Re: [pygame] pygame performance limits

2011-11-25 Thread Jake b
The short answer is you don't really have limits. Unless you're doing something slow / inefficient, that would be slow anway. Brute forcing / re-creating surface every frame / mixing different formats on your surfaces / etc. Biggest one I'd think is collision detection. You can make your algorith

Re: [pygame] more basic python lists question

2011-11-18 Thread Jake b
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: > > > >> filenames = [f for f in filenames if f.endswith(".png")] >> > > > Slick! I learn so much listening to you guys and your ques

[pygame] Games for blind players

2011-10-23 Thread Jake b
Speech recognition and TTS library http://code.google.com/p/pyspeech/ On Saturday, October 22, 2011, Luis Miguel Morillas wrote: > A friend asked me to write a game for blind kids. He proposed me a > kind of hangman game. Do you have any experience using speech > recognition and text to speech in

[pygame] set new recommendation to which version of pygame?

2011-09-30 Thread Jake b
For the updated website, what versions do you think we should recommend? Here's what I think: 1) Python version: 2.7 and 2.6 are good. (Almost any random module will work with them, many smaller ones are not updated for 3.x ) 2) pygame version: **need link to the new .exe, which is some

Re: [pygame] pygame download page still reccomends python 2.5

2011-09-29 Thread Jake b
I don't think its true anymore, AFAIK you should go with python2.7 for pygame. There is a python 2.7 download on the mailing list. Outside of pygame, 2.7.x is what you want to go with, since wiht 3.x series doesn't have as many libraries precompiled, or working. On Thu, Sep 29, 2011 at 4:48 PM,

[pygame] issues installing SDL? Or windows patch?

2011-09-28 Thread Jake b
My previously working pygame , and numpy install is broke. I did install libSDL ( for c++ ) a few days ago. I'm 95% sure pygame worked after that. I did a windows update last reboot. Could either be breaking it? pygame fails in pydev *and* scite. I'm not sure what the exception is telling me. C

Re: [pygame] Native PyGame method for automatically scaling inputs to a surface resolution?

2011-09-27 Thread Jake b
I wrote a quick demo, using numpy for vectors. velocity = numpy.array([10., 30.]) http://code.google.com/p/ninmonkey/source/browse/boilerplate/pygame/4.%20with%20numpy%20for%20array/boilerplate%20-%20pygame_with_numpy-2011_jake.py Euclid is python only, which means you don't need to insta

Re: [pygame] car game AI

2011-09-24 Thread Jake b
Note: Learn how to use vectors. You will need this for steering, and movement. (You technically don't, but it's much simpler) The *very best* tutorial to A* pathfinding : http://theory.stanford.edu/~amitp/GameProgramming/ ( Great diagrams ) These are relevant for your racing, and terrain. Making

Re: [pygame] Native PyGame method for automatically scaling inputs to a surface resolution?

2011-09-24 Thread Jake b
Are you using numpy? -- Jake

Re: [pygame] Getting pygame import to work in pydev/eclipse, shows as error.

2011-08-22 Thread Jake b
error: http://imageshack.us/photo/my-images/171/pydevcapimporterror.png/ On Fri, Jul 29, 2011 at 11:29 AM, Brian Fisher wrote: > Are you sure pydev is running your script with the python 2.7 interpreter > you have installed? > > I think so. \The script has "import sys; print sys.version" , an

Re: [pygame] "game" idea

2011-08-21 Thread Jake b
I like this one: SoundDrop: http://www.youtube.com/watch?v=oDqM31-N2ec&feature=related Uses lines and bouncing balls. -- Jake

[pygame] pygame wiki/questions on stackoverflow

2011-08-21 Thread Jake b
If you've never visited SO, take a look. It's a combination of a wiki+Mailinglist. Right now there's a question on the fastest way to blit per-pixel, If you know the best method? http://stackoverflow.com/search?tab=newest&q=%5bpython%5d%20pygame -- Jake

Re: [pygame] Articles about game design?

2011-08-18 Thread Jake b
Eli's articles are pretty good. Two magazine, and pdf links: http://devmag.org.za/ has several nice articles, good illustrations as article or magazine download. gamedeveloper http://www.gdmag.com/homepage.htm If you can pickup a free subscription it's worth it. -- Jake

Re: [pygame] growing out of idle ide

2011-08-17 Thread Jake b
I think geany uses scintilla ( which is scite's text editor widgit ). Several other programs, like notepad++ do too. I also use scite. I default to it, for quick / smaller projects, else pydev. Scite is very configurable if you are comfortable with doc's and text config editing. -- Jake

Re: [pygame] growing out of idle ide

2011-08-17 Thread Jake b
Pydev. [ which is a python eclipse plugin ] http://pydev.org/ I find its quite nice, and runs quickly. On Mon, Aug 15, 2011 at 3:50 AM, David Burton wrote: > Is anyone here using Eclipse+PyDev, or Eclipse+DLTK? > Opinions, please? > -- Jake

[pygame] spotlight apps selection

2011-08-13 Thread Jake b
Are these currently the a list, from a while ago? I ask because, ie: Albow for example has a last updated date of 2007. There are newer, and less known apps that could be hilighted. It'd be cool if it was somehow automatic, whether it's based on positive comments, or downloads, or whatever. -- J

Re: [pygame] Pygame-UI: UI Component Framework for python and pygame

2011-08-03 Thread Jake b
Do you know the command to download your code using mercurial? I've done it before, but, it isn't finding the svn repo today. And, have you learned about properties? They replace the need of getter/setter functions that other languages use.

[pygame] Getting pygame import to work in pydev/eclipse, shows as error.

2011-07-28 Thread Jake b
In pydev/eclipse I can run a file using pygame. So it runs, but, (even for new projects) I get the errors: ( in the UI. it still runs, but autocompletion for pygame doesn't load. ) import pygame > unresolved import pygame from pygame.locals import * from pygame import Color, Rect, Surface unres

Re: [pygame] trajectory

2011-07-24 Thread Jake b
This calculates to shoot in the path of the target. Like how you throw a football, to lead the catcher. Instead of where they are at that second. For tower defense, some Bullets fly fast enough you don't have to lead. Slower bullets fire, then every frame you: Move the bullet location toward targ

Re: [pygame] trajectory

2011-07-22 Thread Jake b
A more involved example, but a great site is red3d's steering movements. To do heat seeking missiles, you use the seek behavior. http://www.red3d.com/cwr/steer/ On Fri, Jul 22, 2011 at 11:45 AM, Joe Ranalli wrote: > Homing missile is by far the easiest thing to code. Every clock tick, find > th

Re: [pygame] Blog posts on a pygame+pyopengl project

2011-07-20 Thread Jake b
Cool! I missed this email. I like the images, and diagrams. Are you planning on ability to edit or create a new world? Have you thought of doing a Terarria map viewer? (It's similar in a lot of ways, but from the side view its 2d only.) I found a few python interfaces to the map file: -

Re: [pygame] trajectory

2011-07-20 Thread Jake b
You can define bullet speed in pixels per second. You can use euclid (it works), but I instead suggest numpy. Which has a vector( numpy.array ), and is useful for other game related things. Here's a stand-alone example, uses numpy for vector movement. https://code.google.com/p/ninmonkey/source/

Re: Re: [pygame] Pygame-UI: UI Component Framework for python and pygame

2011-07-03 Thread Jake b
For rendering, what do you plan on doing? ( blit, opengl, svg_blit, pygame.draw ) My main request for reusability is loading a .css file. If for XML, I tried this. [ Using attributes for sll style info seemed wrong. ] inventory root window frame

Re: [pygame] Pygame-UI: UI Component Framework for python and pygame

2011-07-01 Thread Jake b
How do you plan on drawing? You mentioned styling. I suggest using properties and values in the same format as CSS2.1 ( http://www.w3.org/TR/CSS21/ ), where possible. This would allow more users to immediately style the UI, without having to know much of the iternals. You can get quite complex lo

Re: [pygame] Making animation.

2011-05-28 Thread Jake b
Take a look at http://www.pygame.org/project-PyIgnition-1527-.html ( you don't need openGL. ) -- Jake

[pygame] hiding duplicate project updates?

2011-05-14 Thread Jake b
On the front "more" page, http://www.pygame.org/tags/all There's often duplicates. Right now there's 14+ copies of "GetPath" on page 1. If a project is updated, keep it on top, but only list the project once per page, ( or one total across all pages? ) -- Jake

Re: [pygame] Re: Help needed on creating snake n ladder game

2011-05-10 Thread Jake b
ke in boilerplate # but also add: # if key == current player's key_move , then move him. player = self.players[self.cur_player] key = player.key_move if event.key == cur_key: cur_player.move() self.n

Re: [pygame] Help needed on creating snake n ladder game

2011-05-08 Thread Jake b
Where are you started / stuck? Breaking a problem into smaller pieces can make it easier to solve. example: 1. draw empty board 2. draw player on square X 3. player input, dice. 4. turn taking 5. 'ladder' tiles save the tile id of the square to slide down to On Mon, May 9, 2011 at 12:46 AM, Mr.

Re: [pygame] RESIZABLE FLAG

2011-05-02 Thread Jake b
if Event.type == VIDEORESIZE: size, w, h = event.size, event.w, event.h See: http://www.pygame.org/docs/ref/event.html On Sunday, April 24, 2011, ANKUR AGGARWAL wrote: > Hey > I want to scale my image according to the size of the screen. If I am > using the resizable flag in the display how ca

[pygame] Pygame: Fixed timestep demo?

2011-05-02 Thread Jake b
What's the suggested way to use a fixed time step in pygame? I want to verify I'm using the right method. I want it for the case when you're not using a physics lib. ( There's resources at gaffer, and stackoverflow, ) but none specifically pygame that I found. Do you know of an example? -- Jak

Re: [pygame] pygame.org can has social?

2011-05-02 Thread Jake b
Cool, voting , and time settings. Is there a "front page" to view recent comments, or popular? there's a filter on project page. On Friday, April 29, 2011, René Dudfield wrote: > twitter: @pygame_org > disqus comments: http://pygame.org/project-Crazy+China+Pong-1820-3229.html > -- Jake

Re: [pygame] Making the sprite sheet background transparent

2011-04-19 Thread Jake b
You want to save a new image with transparency? Try: .set_colorkey http://www.pygame.org/docs/ref/surface.html#Surface.set_colorkey then saving the image. On Thu, Apr 14, 2011 at 2:36 PM, ANKUR AGGARWAL wrote: > Yup,infact already did that. But I want to do it in python style :O:O > > > On Fri, A

Re: [pygame] Update on Sphinx version of Pygame docs

2011-04-13 Thread Jake b
As a newbie to reST I don't feel qualified to decide. Although I found a few resources I thought I'd share: for the html docs: you might be interested in a javascript sites include, that add syntax hilighting to code found in the page. This leaves the original code clean of styling. It should work

Re: [pygame] blit a list containing surfaces

2011-04-13 Thread Jake b
Take a look at AnimatedSprite() in piman's tutorial : http://www.sacredchao.net/~piman/writing/sprite-tutorial.shtml As well as help(pygame.Sprite) http://www.pygame.org/docs/ref/sprite.html Without seeing your code, it would be something like: # where i is your current frame index of the list. s

[pygame] New pygame tutorials -- areas lacking?

2011-04-11 Thread Jake b
Are there any areas that you think pygame examples / tutorials could use a new tutorial? Or perhaps certain documentation sections that could use work? My thoughts are specifically non-OpenGL , or other libraries -- there's many existing tuts, and code for that. .. My thought: I'm working on a p

Re: [pygame] Sprite examples with images

2011-04-11 Thread Jake b
Check out http://www.sacredchao.net/~piman/writing/sprite-tutorial.shtml http://eli.thegreenplace.net/category/programming/python/pygame-tutorial/ And the pygame doc's examples (comes with images ) The pygame projects page has more. On Monday, April 11, 2011, ANKUR AGGARWAL wrote: > Hey > I am r

Re: [pygame] News: SDL 1.3 is now under the zlib licence.

2011-04-10 Thread Jake b
Are there new features in 1.3 , and will any be available in pygame in the near future? Couldn't figure out a good google query.

Re: [pygame] Recommendations required

2011-04-04 Thread Jake b
Asteroids Pong Tetris Space invaders A top down shooter On Monday, April 4, 2011, ANKUR AGGARWAL wrote: > Hey > I am reading pygame module and experimenting with it in small codes too . I > want your help. I want you to  recommend the games ,beginner of this module > should try to develop as a

Re: [pygame] Re: I can't install pygame on activestate python [win, 32bit python 2.7]

2011-04-02 Thread Jake b
Thank you :) -- Jake

[pygame] Re: I can't install pygame on activestate python [win, 32bit python 2.7]

2011-04-01 Thread Jake b
pygame.org's windows installer didn't have a version for 2.7 There is a link for an offsite version, but the link is broken. [it's javascript, not a real url. maybe it's been compromised?] I'm looking for Python 2.7, win32. > http://thorbrian.com/pygame/builds.php This page has no 2.7 build I t

[pygame] I can't install pygame on activestate python [win, 32bit python 2.7]

2011-03-31 Thread Jake b
I'm using activestate's package manager (pypm) on windows. There is no package for pygame, because the build fails on their logs: their failed log (for win32, py2.7 ) http://pypm-free.activestate.com/2.7/win32-x86/pool/p/py/pygame-1.9.1release_win32-x86_2.7_1.pypm.d/log (package page: http://code

Re: [pygame] Inconsistency in online docs

2011-03-30 Thread Jake b
(there are two big threads, so this might have been covered) 1] Is there a method other projects use, that we could copy? 2] I would definitely push for a web wiki-interface (at least to allow 'comment's section of current docs ) * allows correction submitions ( mentioned in other thread ) * wou

  1   2   3   4   >