Skip to main content

#30daydeveloper - Day 7 & 8 - Circular Collisions

Hello! If this is your first time reading about my thirty day developer challenge, click here to go to the first post!

So I had to ditch the old physics engine (Phaser's Arcade) because I think if I want to do collision detection for objects that aren't just rectangles, I need to use an engine that is a bit more powerful. Hence I spent the past two days learning about the P2 physics engine built into Phaser.

With this new engine, I was able to do proper collision detection between two circular objects. Now if you throw the pink ball at the black round corner, it'll detect when the edges of the two circles meet. Before, there was an invisible box that surrounded each circle so collisions would occur even if visually they did not. (Which leads to a bad gaming experience of course).


On a side note, try it out at this link and let me know how smooth the collision detection is!
On a side side note, sorry I didn't publish a post yesterday! I want to say I forgot, but the truth is that I was just too lazy.

Comments

Popular posts from this blog

Jooble

Yesterday, I received an incredibly friendly email from an anonymous person who claimed to have read my blog and "loved it." Of course, because my blog is public and anybody can comment anonymously, I was a bit skeptical of this email. Yet, seeing as how this was the first ever "fan mail" I've ever received, I read the email. It wasn't fan mail, but it was an email from a person who works for a website called " Jooble ." Interested by his genuineness and heartfelt compliments of my blog, I took a quick glance at the website. Here's what he had to say about Jooble: Jooble operates in 45+ countries, so if you would like to find a job in other locations you may try to search jobs in: Argentina , Australia , Austria , Belgium , Belarus , Brazil , Canada , Chile , China Colombia , Czech Republic , Denmark , Spain , Finland , France , Germany , Greece , Hong Kong , Hungary , Italy , India , Indonesia , Ireland , Japan , Kazakhstan , Mexi...

Connect With Me

This is a story about two best friends. They were the grow up like brothers kind of best friends. The chase girls together kind. The never rat the other out kind. The always true to each other thick and thin kind. You know what I mean. They were inseparable. One was named Adam, the other Bill. Adam was an artist. He loved all forms of art--film, paint, photo, everything. If it was created or captured, chances are, he's seen it. He kept a journal of his thoughts and mostly kept to himself--and, of course, Bill. He was what you might call a shy guy. Following his passions, he went to art school and graduated with an excellent education and a renewed passion for his art. Bill was a business man. He loved money, making deals, and shaking hands. If it was profitable or had even the slimmest chance of making money, chances are, he's done it. He rarely stays still and is constantly out and about. At the local bar, the club, restaurant, wherever the new hot spot was. He was what yo...

Hangeul or Hangul

Here's the link for the Wikipedia entry for "Hangeul." Now here's the link for the Wikipedia entry for "Hangul" (Without the "e") Notice anything similar? Of course you do, they both point to the same entry! Now why is that? It's because there is no real set romanization of the Korean language. Or at least one that is universally accepted in South Korea. Why does this matter? Korean is a language with an alphabet, there shouldn't be a need for romanization right? Just learn some 한글 and be done with that! To hell with the Latin script! But that's really not good for foreigners. Are you Korean? Can you read 한글? If not, then those two characters mean nothing to you. Only if I tell you that those two characters are read like "hangeul" or "hangul" can you begin to pronounce the word. Romanization is an essential step for foreigners in learning a foreign language. Take two examples, the Chinese pinyin , and the ...