Overview of Simple Collisions Detection Types in 2d games

preview_player
Показать описание


Рекомендации по теме
Комментарии
Автор

I wish i had known about your channel before. I got so much from watching just one of your videos that i did not get from watching entire series. Much respect, sir

damionreid
Автор

BTW. Older game hardware that implemented sprites in hardware had hardware support for detecting "collision" of non-transparent sprite pixels against other sprites and/or a playfield.

FindecanorNotGmail
Автор

It's GDQuest, afaik, Godot based channel, but shows samples of non Godot games and other Game Engines.

igormorgado
Автор

One of my favourite collision detections you didn't mention is circular (I am not sure what most call it). I find it simpler to implement even than AABB. Each object has a center and a radius to indicate it's size (this forms the circle, rather than a box, around the object). The collision is the same distance in all directions from the center (the radius away). When you test two objects, you do some simple math to get the distance the two objects are apart (from the center of one, to the center of the other). You then add up the sum of the two objects' radius you are testing. You then simply compare the sum of the two radius' to the distance the two objects are apart. If the distance they are apart is less than or equal to the sum of the two radius', than you have a collision. It's extremely simple to implement and fast. It's perfect for more rounder objects especially.

This is the collision routine I use in my Deluxe Pacman 2 game (available free online, just search).

Also, using combinations of these collision functions is good too. Use a fast routine like AABB or Circular to test if they collide. If they are, and you need pixel perfect collision, you can then jump to another function to test the areas that overlap to see if any pixels are actually touching, or occupying the same location on screen.

NeilRoy
Автор

Thank you for the video game collision information! I liked this one. I should make an algorithm for collision detection : )

V_Blocky
Автор

nice video! this is a great explanation on how to actually implement collisions

mbrenneman
Автор

that was a good, informative video :)

totalytaco
Автор

Great video!
By the way, What's the name of the game at 0:17 ?

Agzlbert
Автор

I'm made so much fun watching your Video about Collide and not Collide, it is very useful to me, I hope you will continue your good lesson should I say great examples hahaahaha ^^

christianpaulreyes
Автор

I noticed that collisions occur more frequently when a Player collides with an Enemy while the former is moving downwards. My Enemy nodes triggers the Players _update_health(amount: int) function and works fine during horizontal collisions, that is, Enemy hits Player x amount before Player dies. However, when a Player lands on an Enemy's head, it's insta-kill. I have yet to figure how to debug this. I know a raycast is probably the better solution but I'll still try to find out how I can fix it without using one.

carlomontoya
Автор

very informative thanks for sharing :)

jwshohan
Автор

0:46
that wall....
THAT'S A BIT

bigmancozmo
Автор

ok. So the problem i have is not to check if two objects are colliding but rather how they collide. For example I dont know how to check if a player jumps against the wall or on top of it. It would be nice if anyone could help me . (and checking the velocity before is not a good solution)

Skyltn
Автор

0:17 what's the name of this game ?

tanvirkhan
Автор

Hey, you're using Construct 2! Cool!

calebbennetts
Автор

Thanks for all of your videos, they're absolutely fantastic. I was wondering which software you use for 2d animation? I've been learning Synfig Studio, which seems good and powerful but not that often used and lacking in speed and polish. Obviously I'd prefer to hear about FOSS solutions, but it would be good to hear about professional software too.

jayemaye
Автор

What is this game at the beginning (glowing blue guy)? :D

asecave
Автор

To be honest the video only describes the name of collision methods but doesn't offer any practical implementation. If somebody wants to make a game in flash, for example, this video will be useless. Therefore it is hardly a tutorial, more like an overview.

bicben
Автор

Bad title. This video is not about types of _collisions_ but about types of collision _detection_ .

FindecanorNotGmail
Автор

Your vocal delivery seems too robotic, and it feels as if you're reluctantly reading a script.

jacobshirley