Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Roguelike as a PyGame tutorial

881 views
Skip to first unread message

Radomir Dopieralski

unread,
Feb 17, 2012, 5:10:07 AM2/17/12
to
http://therealkatie.net/blog/2012/feb/13/pygame-getting-started/

I wonder if we should reach out and help a little? :)

--
Radomir Dopieralski, sheep.art.pl

Todd Page

unread,
Feb 17, 2012, 7:34:18 PM2/17/12
to
I was never satisfied with pygame's performance, and as a die-hard
python-er it made me sad. I hope this project turns out better!

Would be curious to know if it has gotten better? Last I checked they
were still on 1.9.1, which was from 2009.

Radomir Dopieralski

unread,
Feb 18, 2012, 4:14:55 PM2/18/12
to
On 2012-02-18, Todd Page <twp...@gmail.com> wrote:
> On Feb 17, 5:10 am, Radomir Dopieralski <n...@sheep.art.pl> wrote:
>> http://therealkatie.net/blog/2012/feb/13/pygame-getting-started/
>>
>> I wonder if we should reach out and help a little? :)
>
> I was never satisfied with pygame's performance, and as a die-hard
> python-er it made me sad. I hope this project turns out better!
>
> Would be curious to know if it has gotten better? Last I checked they
> were still on 1.9.1, which was from 2009.

PyGame will not change performance-wise in the foreseeable future. The way
the 2D graphics is made, performance is all up to the way the application
draws and updates the screen. PyGame and Python add very little overhead
there -- so not much space for improvement.

Of course, if you compare that to the OpenGL games that have no problems
juggling thousands of sprites and doing full-screen updates with multiple
parallax effects at 50 FPS, then it may seem that PyGame is slow. However,
PyGame games are able to run on OLPC and other rather weak platforms with
pretty good performance -- something those OpenGL games are not able to do.
So in the end it boils down to the choice of technology. If you want your
game to have great effects and high resolution, and run only on computers
with good graphics cards -- go for PyOpenGL, Pyglet, Cocos2d, Pygrafix or
other library that utilises the graphic card's 3D acceleration. If you are
OK with frame rates in the dozens of FPS, non-fullscreen windows or you don't
require full screen update every frame, then PyGame is a good choice, as it
lets your program run on a much broader range of hardware (there is even a
PyGame subset for Adnroid).

Personally, I use PyGame simply because it is convenient to me and works
close to the way I think. Even when I use other libraries for graphics, I
still like to use PyGame's Rect data type and its time-handling utilities.
I didn't have any problem with performance at the speed that roguelike games
require.
--
Radomir Dopieralski, sheep.art.pl

Radomir Dopieralski

unread,
Feb 18, 2012, 4:37:01 PM2/18/12
to
On 2012-02-18, Radomir Dopieralski <ne...@sheep.art.pl> wrote:
> On 2012-02-18, Todd Page <twp...@gmail.com> wrote:
>> On Feb 17, 5:10 am, Radomir Dopieralski <n...@sheep.art.pl> wrote:
>>> http://therealkatie.net/blog/2012/feb/13/pygame-getting-started/
>>>
>>> I wonder if we should reach out and help a little? :)
>>
>> I was never satisfied with pygame's performance, and as a die-hard
>> python-er it made me sad. I hope this project turns out better!
>>
>> Would be curious to know if it has gotten better? Last I checked they
>> were still on 1.9.1, which was from 2009.

By the way, there is a talk about 1.9.2 pre-alpha now, so I suppose it's
going to be released soon.

--
Radomir Dopieralski, sheep.art.pl

Todd Page

unread,
Feb 18, 2012, 10:11:23 PM2/18/12
to
On Feb 18, 4:37 pm, Radomir Dopieralski <n...@sheep.art.pl> wrote:
Radomir,

Good to hear someone speak so well of pygame. I did enjoy most of the
time I spent with it. I agree that the library matches the 'way I
think' for me as well.

I do agree it is very fun and easy to get the basics going.. it was
when I got more advanced that I ran into trouble. I tried to be smart
about when and how I was updating the screen and was only using the
simple 2D surfaces. I'm also willing to admit any slowness in code was
my own fault... do you have an example of a 'reasonably
featured' (e.g. lighting, color, multiple enemy movements, etc) RL
using pygame? I would absolutely love to see if I am doing something
wrong. All the python RLs I usually see code for are libtcod-based :)



Todd Page

unread,
Feb 18, 2012, 10:13:00 PM2/18/12
to
On Feb 18, 4:37 pm, Radomir Dopieralski <n...@sheep.art.pl> wrote:
BTW just saw Z-Day on your website so I'm going to check it out!
Thanks.

Radomir Dopieralski

unread,
Feb 19, 2012, 10:08:36 AM2/19/12
to
That code is horrible, please don't learn from it. I wrote it for the 7drl
contest while learning python at the same time...

--
Radomir Dopieralski, sheep.art.pl

Todd Page

unread,
Feb 19, 2012, 11:14:25 AM2/19/12
to
Hah... fair enough! :)

I still thought it was a fun little game though. Sound effects were
great.

Does anyone else know of any other pygame RL examples? I'm looking for
something beyond the average 7DRL in feature-fullness.

All the projects I've followed seem to run into a wall, die off, or
switch to libtcod :)

narf_the_mouse

unread,
Feb 20, 2012, 11:55:59 PM2/20/12
to
On 17/02/2012 2:10 AM, Radomir Dopieralski wrote:
> http://therealkatie.net/blog/2012/feb/13/pygame-getting-started/
>
> I wonder if we should reach out and help a little? :)
>

And there's another page:

http://therealkatie.net/blog/2012/feb/20/pygame-treasure/

Quick, someone who's completed a Roguelike, comment.
0 new messages