Tuesday, July 17, 2012

Mr. Minkowski what are you doing in here?

So I've been back working on the game these last few days. I'm using Minkowski difference to figure out if two shapes are overlapping. I'm going to use it for collision detection. This should make it easier to do collisions on slopes and with different shapes than just rectangular platforms. I came up with my own algorithm for doing the Minkowski difference. Actually I came up with more than one and wrote it a few times before I settled on this one. I'm not sure this is the best way to do it but I'm quite happy I was able to come up with something that works and I guess I can replace it later or edit it a bit since I have a few ideas to make it more efficient.

I'll make a video showing what it does. I've got a hazy idea of how I'm going to use it for collisions that I'm going to have to flesh out next. Once that's working (this could take me a while though) I'll be able to move on to things like animation and the full range of character movement. Only then will I design the first level. It may be slow but I'm making progress! I still have no intention of giving up on this project.

Now get out of my house Mr. Minkowski! You're a function now and I'm done with you!

Here's my to-do list from last time:

  • Set the camera bounds when loading the level... (Have I done this?) Now I have :)
  • Start work on collision detection before doing anything fancy 
  • Remeber to code it in such a way that the character can change size at any time
  • Find a way to define all solid objects as polygons now i just need some convenient way to load them
  • Figure out how to detect collisions between these polygons and the player and move the player out of them apropriately
  • Decide on how to determine when the character is on the ground
  • Jumping
Here's a silly video about Minkowski difference:

4 comments:

  1. Oh dear, I've introduced you to horrible and terrible and bad and horrible polygon problemz. I'm sorry.

    ReplyDelete
  2. i do programin and my head hurtz i cry erytim!

    ReplyDelete
  3. http://www.kulfoto.com/pic/0001/0013/zzV3012208.jpg

    ReplyDelete