Why are collision functions bools?

I don’t understand this because if, for example, you are testing a collision between the player and the screen and the player is attached to one said of the screen, you wouldn’t be able to move the player.

I am sorry if this is confusing.

It’s not confusing, just vague. There are several ways to approach
collisions, but commonly you’ll see functions for collision detection and
functions for collision response. Can you be more specific about your
problem?

Jonny DOn Wed, Jun 30, 2010 at 6:27 PM, bijan311 wrote:

I don’t understand this because if, for example, you are testing a
collision between the player and the screen and the player is attached to
one said of the screen, you wouldn’t be able to move the player.

I am sorry if this is confusing.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

even I, the master of non-sense rambling non-questions of the libsdl mail
list have no clue to even begin as to what you are on about, i award you a
medal made of melted jelly beansOn 1 July 2010 02:27, bijan311 wrote:

I don’t understand this because if, for example, you are testing a
collision between the player and the screen and the player is attached to
one said of the screen, you wouldn’t be able to move the player.

I am sorry if this is confusing.
checked for viruses and spam by CanIt.
http://www.canit4.3d.net.uk/


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Jonny D wrote:

It’s not confusing, just vague. ?There are several ways to approach collisions, but commonly you’ll see functions for collision detection and functions for collision response. ?Can you be more specific about your problem?

Jonny D

Well I was looking at tutorials for collisions because I don’t understand how it works, and I saw that the ones that I saw used

Code:

bool collision()

as the function, and I was wondering why the use bool as the return type._______________________________________________
SDL mailing list
SDL at lists.libsdl.org (SDL at lists.libsdl.org)
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org (http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org)

[/quote][/quote]

Take two objects. You want to know if they are overlapping. If they are,
that’s a collision. If not, there’s no collision. There’s either a collision
or there’s not. Hence, a bool.

HTH,
BrendanOn Fri, Jul 2, 2010 at 11:11 AM, bijan311 wrote:

Jonny D wrote:

It’s not confusing, just vague. There are several ways to approach
collisions, but commonly you’ll see functions for collision detection and
functions for collision response. Can you be more specific about your
problem?

Jonny D

Well I was looking at tutorials for collisions because I don’t understand
how it works, and I saw that the ones that I saw used

Code:

bool collision()

as the function, and I was wondering why the use bool as the return type.


SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

[/quote][/quote]


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

That bool will tell you if you need to do further work (the collision
response to move the player away from the wall).

Jonny DOn Fri, Jul 2, 2010 at 11:29 AM, Brendan Luchen wrote:

Take two objects. You want to know if they are overlapping. If they are,
that’s a collision. If not, there’s no collision. There’s either a collision
or there’s not. Hence, a bool.

HTH,
Brendan

On Fri, Jul 2, 2010 at 11:11 AM, bijan311 wrote:

Jonny D wrote:

It’s not confusing, just vague. There are several ways to approach
collisions, but commonly you’ll see functions for collision detection and
functions for collision response. Can you be more specific about your
problem?

Jonny D

Well I was looking at tutorials for collisions because I don’t understand
how it works, and I saw that the ones that I saw used

Code:

bool collision()

as the function, and I was wondering why the use bool as the return type.


SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

[/quote][/quote]


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Thanks

Probably “intersection” is slightly more telling a name than
"collision." Collision suggests things moving toward each other and
crashing. Intersection just means two things occupy the same space.On Wed, Jun 30, 2010 at 9:27 PM, bijan311 wrote:

I don’t understand this because if, for example, you are testing a collision
between the player and the screen and the player is attached to one said of
the screen, you wouldn’t be able to move the player.

I am sorry if this is confusing.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


http://codebad.com/