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

Re: [pygame] Some Platforms



The PyPlatform engine was cool.  It could do slopes and had a built in
editor.  If it is 404ing now, I don't know where it has gone.

But my experience looking at the PyPlatform code was unpleasant.  It
didn't seem very object-oriented, which is my preference.

In the interests of tooting my own horn, can I suggest you look at
"Scroll, Jump, and Beguile" which is on the Gamelets page?  I was playing
around with it the other week and even though it's been months since I was
developing it, I got back up to speed pretty quickly.

There's some physics implemented.  You can shove the bouncing box and
watch it move in a nice parabola.

-sjbrown

> Of course, ANY help is welcome, i've recently changed my code from:
> 	sprite always asking; I'm on the platform??
> for:
> 	platfom sayig, you are not on me, so start falling
>
> This adds more complexity, but could be used for some games.
> For example, if you want a sprite to always be on the platform, the
> simpler
> version is well, but what happens if a platform just disappear or rapidly
> change it's position?? the sprites on it have to start falling.
> Of course this is ugly for elevators, like in Abuse, when it does not
> matter
> how the elevator falls, the player should always be on it.
>
> Ok, forgive all the above kinda self-notes(i tend to do this). As you
> said,
> generic python list are the best implementation combined with Rects.
> Rects, are, from my humble opinion, THE way to think games in pyGame.
>
> And about groups and lists:
> I was a little nervous when I entered all sprites in order to the group
> that
> would be represented, and I obtained a disordered group overlapping itself
> (as you can confirm in my code)
>
> Also, the official pyGame homepage links to a selfcalled "PyPlatform"
> engine,
> that givesme a fu**ing 404, so what is this about?? I'm really interested.
> I'm from the 'doItYourselfAndBeOriginal' mind, but any abstract code is
> very
> welcome :-)
>
> So sendme your code/notes
>
>> 	I can send you some code/notes if you want. I worked on this and
>> collision
>> detection quite a bit until I really got it right (the two are somewhat
>> correlated), on my own game. In both situations, I saw my code and logic
>> get a bit simpler and cleaner after I had the core functionality well
>> implemented and had achieved a better understanding of just what I was
>> doing. I simply have some generic Python lists for stuff I want to
>> scroll
>> (my Pygame sprite groups are used mostly for precise control over the
>> render order of various types of sprites). By using lists, it's a cinch
>> to
>> keep shuffling sprites around on the virtual world (and even use them in
>> collision detection for off-the-screen bullets etc, if I so choose)
>> while
>> still keeping them out of sprite groups.
>>
>> 	-Matt Bailey
>
>


----
Sent from geeky.net