Posted by: EvilNando | July 24, 2008

Collision system in place!

 

Collision ex

 

I’ve just finished Implementing a very basic collision system

When I say “basic” I mean that it has some imperfections, well it works exactly as I’ve programmed it but I would like other type of functionality.

As you can see, what I do is to find out the near tiles on the map. Since actors can move freely around the map I should make checks for each corner. If not the actor could hit only certain tiles depending on its position on the tile. since the calculation involves a truncated division the compiler gets in charge of the rounding so I have to double check back and forth to see if a tile collision that actually exist is missing.

The downside as you can see in the following video, is that the minimum walkable space is 2 tiles wide, as opposed to 1 tile wide which I had in mind the moment I wrote the design for this.

Hope you like the video.

Tomorrow version 2.3 of the editor will be released (hopefully) which will feature a couple of new features.

I will be taking a loong break now. Cya next update

Advertisements

Responses

  1. There are tons of ways to do collision detection.. if you’re unhappy with the 2 tiles instead of 1, you can always change it later after you have some time to think about it. Its in now, and that can come with the polishing stage, so no worries 🙂

    Whats next for your engine?

  2. I’m really impressed with your progress. Keep up the good work!

  3. Thanks a lot for the comments.

    I think that I would not go any further with this until I get the collision system working as I want.

    so expect many more collision posts 😦


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Categories

%d bloggers like this: