[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Starting a game



On Friday 29 June 2007 05:55:26 pm Casey Duncan wrote:
> On Jun 29, 2007, at 2:34 PM, Charles Joseph Christie II wrote:
> > Alright. I don't know if I'm going to be using that MVC stuff...
> > although I
> > might reprogram the game to use it later, if I decide it'll be
> > better... but
> > I want to start a game now! I'm so bored just sitting here that I
> > may as well
> > start something.
> >
> > So now, I'm going to get started. But the problem is that the last
> > time I
> > tried it, I over-complicated it by using advanced sprite functions
> > that I
> > didn't understand at all. I'm still trying to figure out an eaiser
> > way to
> > draw stuff than making everything a class and making it extend from
> > pygame.sprite.Sprite (painful >.<)
>
> My advice, come up with a game concept, then come up with one aspect
> of it that you can implement easily and do that first. For example,
> if you were making a tiled rouge-like game, you could come up with
> some simple art for a player character (like a knight or mage) then
> make it so you move the character in a grid on the screen. If you are
> making an asteroids type game, make it so you can turn your ship,
> then implement thrust, etc.
>
> Try to bite off little chunks you can do in a few hours time and
> don't try and invent the whole thing at once, learn as you go.
>
> Some kinds of games (such as the rouge-like one I mentioned) already
> have lots of pygame implementations, and there are frameworks that
> can help with things like tiling, level design, etc. Sometimes though
> it may be as hard to learn to use the framework as it is to learn
> pygame itself, so beware of biting off more than you can chew.
>
> > Also, some concepts of object orientation seem to have bit me. How
> > should I
> > have classes interact with each other? I know I was doing it
> > completely wrong
> > last time, and one of my friends called me on it. But I forgot how
> > he said I
> > should do it...
>
> Look at other people's code. Games and OO programming go hand-and-
> hand IMO and it really helps you if you have the right level of
> abstraction. The sprite class is supposed to help you in this regard,
> giving you a small organizational unit for the components of your
> game. OTOH, using Sprite may make it more difficult to implement
> certain patterns (i.e., MVC). But to risk overusing a cliche: "Don't
> let the perfect be the enemy of the good", figure out how to make
> something work first then learn how to make it better. Don't try to
> learn everything at once.
>
> Maybe you said this before, but what kind of game are you making? Is
> there another pygame that has similar ideas and elements you can
> borrow from?
>
> -Casey

I'm trying to decide between a Tetris Attack clone (my friends were all 
interested in this idea), an RPG (some of my other friends recommended I 
start with this, but if I did I wouldn't allow myself to do something like 
Final Fantasy, it'd have to be something really weird like Tendrills) or an 
arcade shoot-em-up game like the one I tried to make for my senior project, 
which would be a series of boss-battles in which you have to type a set of 
words to damage the boss. My teacher really wanted to see what it looked like 
when it was done but my first try ened up... well, crappy to say the very 
least. (it couldn't shoot bullets T_T)

I had other people on the ML say that I should start backwards from what I did 
last time: try to get an enemy firing bullets before I get the player on the 
screen. Which I probably will do, just to make sure I do it right this time.

You say to look at other people's games for an example of abstraction. Do you 
have a particular one in mind?