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

Re: [pygame] Collisions + tiledtmxloader?



I have done this in the beginnings of an RTS I was attempting to
make... I have not looked at the code in 6 months.

You are welcome to browse my repository and see if any of the
collision code would help you.

The "engine" code is PyBTS (pygame behind the scenes), this code does
all of the heavy lifting such as collisions, tilemaps, scrolling
backgrounds, movement, entities, map loading... etc etc.

You might want to look at the "Terrain" files, specifically
tileengine.py and tilemap.py

http://hg.thadeusb.com/Games/PyBTS/

Also I have two games based off this game engine, a top-down shooter
and a will-be top down rts game. The RTS game uses the tileengine of
course.

http://hg.thadeusb.com/Games/MyRTS/

Hopefully some of the code helps you, Its been forever since I looked
at it, and I will pick the project back up whenever I have free time
to work on this.

-Thadeus





On Fri, Jan 1, 2010 at 8:23 PM, Alex Nordlund <deep.alexander@xxxxxxxxx> wrote:
> On Sat, Jan 2, 2010 at 2:51 AM, Casey Duncan <casey@xxxxxxxxxxx> wrote:
>> It's difficult to give you a specific recommendation, given this information (I'm afraid I'm too lazy to check out your code right now). Is the game 2D or 3D? Is it physics-based, and if so does it use a physics engine to handle collisions? If not, how are you handling collisions?
>
> From the top 2D :-)
> There's no physics and there'll be no fancy physics, think early Final Fantasy.
>
> We're not handling collisions at the moment, that's the problem :-P
>
> At the moment I'm working on the details of (x + w * y) and figuring
> out how to use it.
>
> (The tiles we got are 35x35 or 40x40 incase anyone is interested.)
>
> ---
> //Alex
>