Pygame, easy as... (?)

The place for chatting and discussing subjects unrelated to Wesnoth.

Moderator: Forum Moderators

Post Reply
User avatar
Midnight_Carnival
Posts: 836
Joined: September 6th, 2008, 11:08 am
Location: On the beach at sunset, gathering coral

Pygame, easy as... (?)

Post by Midnight_Carnival »

Sorry about this mini-rant, just something I felt obliged to share.
It's just that I rember going to the pygame website, looking around, seeing a small crappy, but still cute or fun game, downloading it, taking it home to my crappy obsolete computer with 5-6 year old Linux installed, playing it, saying "cool, let's see how they made it" and then looking at the code, understanding, maybe using some of it.

These days it's like: error "the file is too large" -then another error message after I've deleted everything off my usb device to make room, this time it won't run because my software doesn't support it - I can still look at the code, but I can't understand any of it, let alone use it -"package not supported" - I mean I'm not L33t H4x0r, but I do remember looking at a python program which wouldn't run, figuring out for myself why it wouldn't and then writing a few lines of code to fix it...

Don't get me wrong, not being agianst progress, and it's not the fault of real programmer that I don't have the time, effort, dedication and intelligence to figure it all out for myself and stay on a par with them - I just do remember a time when someone would make a crappy cheap totally non-pro effort that someone else would find cute or fun and people would apreciate it.

thanks for listening to me whine.
...apparenly we can't go with it or something.
User avatar
artisticdude
Moderator Emeritus
Posts: 2424
Joined: December 15th, 2009, 12:37 pm
Location: Somewhere in the middle of everything

Re: Pygame, easy as... (?)

Post by artisticdude »

It's because no one's interested in small, cute games anymore. Gaming has evolved to a point where only a tiny fraction of the minority of players that will even touch a 2D game will so much as look twice at a 'small, cute game'. Also, if you're running a version of any Linux distro that is >4 years old, I'd really suggest updating at some point. :P Or you might want to try shopping around for the distro that works best on your hardware (there are a number of distros that are developed specifically to work well on low-spec machines).

If you want to learn game programming yourself, Pygame is more or less just a python wrapper around the SDL libraries. I'd suggest learning the SDL libraries themselves in conjunction with C or C++ (I prefer using C++ myself, because it offers object orientation). The SDL libraries are really quite easy to learn; I taught myself the basics (enough to actually program some small games) in about two weeks. In fact, if you are already familiar with Pygame, you should feel quite comfortable with SDL.

And if/when you've got SDL down, you might even want to try playing around OpenGL at some point. :geek:
"I'm never wrong. One time I thought I was wrong, but I was mistaken."
User avatar
Midnight_Carnival
Posts: 836
Joined: September 6th, 2008, 11:08 am
Location: On the beach at sunset, gathering coral

Re: Pygame, easy as... (?)

Post by Midnight_Carnival »

:cry: :cry: :cry:

I know this seems even more off topic than usual for me, but bear with me:

In our shop we got an old (1904) singer sewing machine, manual, nice, heavy wood and metal.
It didn't work, so I took it apart without hesitating, even though I know nothing about mechanics or sewing machines. A little penetrating oil and some swearing later we have a working singer with beautiful action - I delight in showing cusotmers the movement of the bullet-shaped bobbin thing...

Electrical sewing machines make things sew much easier... I wouldn't dream of fixing one of those, or even looking to see where the problem was - and of course these days you can't even open electrical appliances. The prevailing ideology seems to be

"That's it, it's a package, you take it as is, if you don't like it buy another one - if something goes wrong buy another one - you aren't smart enough to understand how it works, don't even try."

and I'm sorry, but I do have a problem with that - because I for one don't want to live in a world where 90% of the 7 billion population can't do anything except sit on their asses and blindly consume. I am annoyed by constant modifications designed to make things "simpler, better, etc..." which are in actual fact putting a plastic cover over everything and saying "you can't do anything, you're not smart enough".


humidity = 0.1 # put in whatever value you need to check
temp = -3 # put in whatever value you need to check

h_threshold = 0.8 # the humidity threshold for precipitation to occur
(not the right value)
t_threshold = 0.0

if((temp<=t_threshold)and(humidity>=h_threshold)):
print("snow on the ground")
else:
print("no snow today")
if(temp>t_threshold):
print("it's too hot")
if(humidity<h_threshold):
print("it's too dry")
...apparenly we can't go with it or something.
Post Reply